arch/arm/mach-omap2/prm44xx.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-omap2/prm44xx.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-omap2/prm44xx.c- Extension
.c- Size
- 24309 bytes
- Lines
- 860
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cpu_pm.hlinux/kernel.hlinux/delay.hlinux/errno.hlinux/err.hlinux/io.hlinux/of_irq.hlinux/of.hsoc.hiomap.hcommon.hvp.hprm44xx.hprcm43xx.hprm-regbits-44xx.hprcm44xx.hprminst44xx.hpowerdomain.hpm.h
Detected Declarations
struct omap_prm_irq_contextstruct omap4_vpfunction omap4_prm_read_inst_regfunction omap4_prm_write_inst_regfunction omap4_prm_rmw_inst_reg_bitsfunction omap4_prm_vp_check_txdonefunction omap4_prm_vp_clear_txdonefunction omap4_prm_vcvp_readfunction omap4_prm_vcvp_writefunction omap4_prm_vcvp_rmwfunction _read_pending_irq_regfunction omap44xx_prm_read_pending_irqsfunction omap44xx_prm_ocp_barrierfunction omap44xx_prm_save_and_clear_irqenfunction omap44xx_prm_restore_irqenfunction omap44xx_prm_reconfigure_io_chainfunction omap44xx_prm_reconfigure_io_chainfunction omap44xx_prm_read_reset_sourcesfunction omap44xx_prm_was_any_context_lost_oldfunction omap44xx_prm_clear_context_loss_flags_oldfunction omap4_pwrdm_set_next_pwrstfunction omap4_pwrdm_read_next_pwrstfunction omap4_pwrdm_read_pwrstfunction omap4_pwrdm_read_prev_pwrstfunction omap4_pwrdm_set_lowpwrstchangefunction omap4_pwrdm_clear_all_prev_pwrstfunction omap4_pwrdm_set_logic_retstfunction omap4_pwrdm_set_mem_onstfunction omap4_pwrdm_set_mem_retstfunction omap4_pwrdm_read_logic_pwrstfunction omap4_pwrdm_read_logic_retstfunction omap4_pwrdm_read_prev_logic_pwrstfunction omap4_pwrdm_read_mem_pwrstfunction omap4_pwrdm_read_mem_retstfunction omap4_pwrdm_read_prev_mem_pwrstfunction omap4_pwrdm_wait_transitionfunction omap4_check_vcvpfunction omap4_pwrdm_save_contextfunction omap4_pwrdm_restore_contextfunction prm_save_contextfunction prm_restore_contextfunction cpu_notifierfunction omap44xx_prm_initfunction omap44xx_prm_late_initfunction omap44xx_prm_exit
Annotated Snippet
struct omap_prm_irq_context {
unsigned long irq_enable;
unsigned long pm_ctrl;
};
static struct omap_prm_irq_context omap_prm_context;
/*
* omap44xx_prm_reset_src_map - map from bits in the PRM_RSTST
* hardware register (which are specific to OMAP44xx SoCs) to reset
* source ID bit shifts (which is an OMAP SoC-independent
* enumeration)
*/
static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
{ OMAP4430_GLOBAL_WARM_SW_RST_SHIFT,
OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT },
{ OMAP4430_GLOBAL_COLD_RST_SHIFT,
OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT },
{ OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT,
OMAP_SECU_VIOL_RST_SRC_ID_SHIFT },
{ OMAP4430_MPU_WDT_RST_SHIFT, OMAP_MPU_WD_RST_SRC_ID_SHIFT },
{ OMAP4430_SECURE_WDT_RST_SHIFT, OMAP_SECU_WD_RST_SRC_ID_SHIFT },
{ OMAP4430_EXTERNAL_WARM_RST_SHIFT, OMAP_EXTWARM_RST_SRC_ID_SHIFT },
{ OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT,
OMAP_VDD_MPU_VM_RST_SRC_ID_SHIFT },
{ OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT,
OMAP_VDD_IVA_VM_RST_SRC_ID_SHIFT },
{ OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT,
OMAP_VDD_CORE_VM_RST_SRC_ID_SHIFT },
{ OMAP4430_ICEPICK_RST_SHIFT, OMAP_ICEPICK_RST_SRC_ID_SHIFT },
{ OMAP4430_C2C_RST_SHIFT, OMAP_C2C_RST_SRC_ID_SHIFT },
{ -1, -1 },
};
/* PRM low-level functions */
/* Read a register in a CM/PRM instance in the PRM module */
static u32 omap4_prm_read_inst_reg(s16 inst, u16 reg)
{
return readl_relaxed(prm_base.va + inst + reg);
}
/* Write into a register in a CM/PRM instance in the PRM module */
static void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg)
{
writel_relaxed(val, prm_base.va + inst + reg);
}
/* Read-modify-write a register in a PRM module. Caller must lock */
static u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
{
u32 v;
v = omap4_prm_read_inst_reg(inst, reg);
v &= ~mask;
v |= bits;
omap4_prm_write_inst_reg(v, inst, reg);
return v;
}
/* PRM VP */
/*
* struct omap4_vp - OMAP4 VP register access description.
* @irqstatus_mpu: offset to IRQSTATUS_MPU register for VP
* @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
*/
struct omap4_vp {
u32 irqstatus_mpu;
u32 tranxdone_status;
};
static struct omap4_vp omap4_vp[] = {
[OMAP4_VP_VDD_MPU_ID] = {
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET,
.tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK,
},
[OMAP4_VP_VDD_IVA_ID] = {
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
.tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK,
},
[OMAP4_VP_VDD_CORE_ID] = {
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
.tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK,
},
};
static u32 omap4_prm_vp_check_txdone(u8 vp_id)
{
Annotation
- Immediate include surface: `linux/cpu_pm.h`, `linux/kernel.h`, `linux/delay.h`, `linux/errno.h`, `linux/err.h`, `linux/io.h`, `linux/of_irq.h`, `linux/of.h`.
- Detected declarations: `struct omap_prm_irq_context`, `struct omap4_vp`, `function omap4_prm_read_inst_reg`, `function omap4_prm_write_inst_reg`, `function omap4_prm_rmw_inst_reg_bits`, `function omap4_prm_vp_check_txdone`, `function omap4_prm_vp_clear_txdone`, `function omap4_prm_vcvp_read`, `function omap4_prm_vcvp_write`, `function omap4_prm_vcvp_rmw`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.