Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
prm44xx.c File Reference
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <plat/prcm.h>
#include "soc.h"
#include "iomap.h"
#include "common.h"
#include "vp.h"
#include "prm44xx.h"
#include "prm-regbits-44xx.h"
#include "prcm44xx.h"
#include "prminst44xx.h"

Go to the source code of this file.

Data Structures

struct  omap4_vp
 

Functions

u32 omap4_prm_read_inst_reg (s16 inst, u16 reg)
 
void omap4_prm_write_inst_reg (u32 val, s16 inst, u16 reg)
 
u32 omap4_prm_rmw_inst_reg_bits (u32 mask, u32 bits, s16 inst, s16 reg)
 
u32 omap4_prm_vp_check_txdone (u8 vp_id)
 
void omap4_prm_vp_clear_txdone (u8 vp_id)
 
u32 omap4_prm_vcvp_read (u8 offset)
 
void omap4_prm_vcvp_write (u32 val, u8 offset)
 
u32 omap4_prm_vcvp_rmw (u32 mask, u32 bits, u8 offset)
 
void omap44xx_prm_read_pending_irqs (unsigned long *events)
 
void omap44xx_prm_ocp_barrier (void)
 
void omap44xx_prm_save_and_clear_irqen (u32 *saved_mask)
 
void omap44xx_prm_restore_irqen (u32 *saved_mask)
 
void omap44xx_prm_reconfigure_io_chain (void)
 
 subsys_initcall (omap4xxx_prcm_init)
 

Function Documentation

void omap44xx_prm_ocp_barrier ( void  )

omap44xx_prm_ocp_barrier - force buffered MPU writes to the PRM to complete

Force any buffered writes to the PRM IP block to complete. Needed by the PRM IRQ handler, which reads and writes directly to the IP block, to avoid race conditions after acknowledging or clearing IRQ bits. No return value.

Definition at line 181 of file prm44xx.c.

void omap44xx_prm_read_pending_irqs ( unsigned long events)

omap44xx_prm_read_pending_irqs - read pending PRM MPU IRQs into : ptr to two consecutive u32s, preallocated by caller

Read PRM_IRQSTATUS_MPU* bits, AND'ed with the currently-enabled PRM MPU IRQs, and store the result into the two u32s pointed to by . No return value.

Definition at line 164 of file prm44xx.c.

void omap44xx_prm_reconfigure_io_chain ( void  )

omap44xx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain

Clear any previously-latched I/O wakeup events and ensure that the I/O wakeup gates are aligned with the current mux settings. Works by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then deasserting WUCLKIN and waiting for WUCLKOUT to be deasserted. No return value. XXX Are the final two steps necessary?

Definition at line 244 of file prm44xx.c.

void omap44xx_prm_restore_irqen ( u32 saved_mask)

omap44xx_prm_restore_irqen - set PRM_IRQENABLE_MPU* registers from args : ptr to a u32 array of IRQENABLE bits saved previously

Restore the PRM_IRQENABLE_MPU and PRM_IRQENABLE_MPU_2 registers from . Intended to be used in the PRM interrupt handler resume callback to restore values saved by omap44xx_prm_save_and_clear_irqen(). No OCP barrier should be needed here; any pending PRM interrupts will fire once the writes reach the PRM. No return value.

Definition at line 227 of file prm44xx.c.

void omap44xx_prm_save_and_clear_irqen ( u32 saved_mask)

omap44xx_prm_save_and_clear_irqen - save/clear PRM_IRQENABLE_MPU* regs : ptr to a u32 array to save IRQENABLE bits

Save the PRM_IRQENABLE_MPU and PRM_IRQENABLE_MPU_2 registers to . must be allocated by the caller. Intended to be used in the PRM interrupt handler suspend callback. The OCP barrier is needed to ensure the write to disable PRM interrupts reaches the PRM before returning; otherwise, spurious interrupts might occur. No return value.

Definition at line 198 of file prm44xx.c.

u32 omap4_prm_read_inst_reg ( s16  inst,
u16  reg 
)

Definition at line 52 of file prm44xx.c.

u32 omap4_prm_rmw_inst_reg_bits ( u32  mask,
u32  bits,
s16  inst,
s16  reg 
)

Definition at line 64 of file prm44xx.c.

u32 omap4_prm_vcvp_read ( u8  offset)

Definition at line 124 of file prm44xx.c.

u32 omap4_prm_vcvp_rmw ( u32  mask,
u32  bits,
u8  offset 
)

Definition at line 136 of file prm44xx.c.

void omap4_prm_vcvp_write ( u32  val,
u8  offset 
)

Definition at line 130 of file prm44xx.c.

u32 omap4_prm_vp_check_txdone ( u8  vp_id)

Definition at line 103 of file prm44xx.c.

void omap4_prm_vp_clear_txdone ( u8  vp_id)

Definition at line 114 of file prm44xx.c.

void omap4_prm_write_inst_reg ( u32  val,
s16  inst,
u16  reg 
)

Definition at line 58 of file prm44xx.c.

subsys_initcall ( omap4xxx_prcm_init  )