arch/arm/mach-omap2/omap4-common.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-omap2/omap4-common.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-omap2/omap4-common.c- Extension
.c- Size
- 8718 bytes
- Lines
- 328
- 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/kernel.hlinux/init.hlinux/io.hlinux/irq.hlinux/irqchip.hlinux/memblock.hlinux/of.hlinux/of_irq.hlinux/export.hlinux/irqchip/arm-gic.hlinux/of_address.hlinux/reboot.hlinux/genalloc.hasm/hardware/cache-l2x0.hasm/mach/map.hasm/memblock.hasm/smp_twd.homap-wakeupgen.hsoc.hiomap.hcommon.hprminst44xx.hprcm_mpu44xx.homap4-sar-layout.homap-secure.hsram.h
Detected Declarations
function mbfunction Disconnectionfunction omap4_sram_initfunction omap_barrier_reserve_memblockfunction omap_barriers_initfunction gic_dist_disablefunction gic_dist_enablefunction gic_dist_disabledfunction gic_timer_retriggerfunction omap4_l2c310_write_secfunction omap_l2_cache_initfunction omap4_mpuss_early_initfunction omap_gic_of_init
Annotated Snippet
if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) {
writel_relaxed(1, twd_base + TWD_TIMER_COUNTER);
twd_ctrl |= TWD_TIMER_CONTROL_ENABLE;
writel_relaxed(twd_ctrl, twd_base + TWD_TIMER_CONTROL);
}
}
}
#ifdef CONFIG_CACHE_L2X0
void __iomem *omap4_get_l2cache_base(void)
{
return l2cache_base;
}
void omap4_l2c310_write_sec(unsigned long val, unsigned reg)
{
unsigned smc_op;
switch (reg) {
case L2X0_CTRL:
smc_op = OMAP4_MON_L2X0_CTRL_INDEX;
break;
case L2X0_AUX_CTRL:
smc_op = OMAP4_MON_L2X0_AUXCTRL_INDEX;
break;
case L2X0_DEBUG_CTRL:
smc_op = OMAP4_MON_L2X0_DBG_CTRL_INDEX;
break;
case L310_PREFETCH_CTRL:
smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX;
break;
case L310_POWER_CTRL:
pr_info_once("OMAP L2C310: ROM does not support power control setting\n");
return;
default:
WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg);
return;
}
omap_smc1(smc_op, val);
}
int __init omap_l2_cache_init(void)
{
/* Static mapping, never released */
l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
if (WARN_ON(!l2cache_base))
return -ENOMEM;
return 0;
}
#endif
void __iomem *omap4_get_sar_ram_base(void)
{
return sar_ram_base;
}
/*
* SAR RAM used to save and restore the HW context in low power modes.
* Note that we need to initialize this very early for kexec. See
* omap4_mpuss_early_init().
*/
void __init omap4_sar_ram_init(void)
{
unsigned long sar_base;
/*
* To avoid code running on other OMAPs in
* multi-omap builds
*/
if (cpu_is_omap44xx())
sar_base = OMAP44XX_SAR_RAM_BASE;
else if (soc_is_omap54xx())
sar_base = OMAP54XX_SAR_RAM_BASE;
else
return;
/* Static mapping, never released */
sar_ram_base = ioremap(sar_base, SZ_16K);
if (WARN_ON(!sar_ram_base))
return;
}
static const struct of_device_id intc_match[] = {
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/io.h`, `linux/irq.h`, `linux/irqchip.h`, `linux/memblock.h`, `linux/of.h`, `linux/of_irq.h`.
- Detected declarations: `function mb`, `function Disconnection`, `function omap4_sram_init`, `function omap_barrier_reserve_memblock`, `function omap_barriers_init`, `function gic_dist_disable`, `function gic_dist_enable`, `function gic_dist_disabled`, `function gic_timer_retrigger`, `function omap4_l2c310_write_sec`.
- 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.