arch/arm/mach-omap1/pm.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-omap1/pm.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-omap1/pm.c- Extension
.c- Size
- 17265 bytes
- Lines
- 645
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/suspend.hlinux/sched.hlinux/debugfs.hlinux/seq_file.hlinux/interrupt.hlinux/sysfs.hlinux/module.hlinux/io.hlinux/atomic.hlinux/cpu.hasm/fncpy.hasm/system_misc.hasm/irq.hasm/mach/time.hasm/mach/irq.hlinux/soc/ti/omap1-io.htc.hlinux/omap-dma.hclocksource/timer-ti-dm.hhardware.hmux.hirqs.hiomap.hclock.hpm.hsoc.hsram.h
Detected Declarations
function idle_showfunction idle_storefunction omap1_pm_idlefunction omap_pm_wakeup_setupfunction omap1_pm_suspendfunction omap_pm_debug_showfunction omap_pm_init_debugfsfunction omap_pm_preparefunction omap_pm_enterfunction upfunction omap_wakeup_interruptfunction omap_pm_init
Annotated Snippet
IS_ENABLED(CONFIG_OMAP_DM_TIMER)) {
/* OMAP16xx only */
pr_info("OMAP1 PM: sleep states in idle enabled\n");
enable_dyn_sleep = 1;
}
/*
* We copy the assembler sleep/wakeup routines to SRAM.
* These routines need to be in SRAM as that's the only
* memory the MPU can see when it wakes up.
*/
if (cpu_is_omap15xx()) {
omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
omap1510_cpu_suspend_sz);
} else if (cpu_is_omap16xx()) {
omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend,
omap1610_cpu_suspend_sz);
}
if (omap_sram_suspend == NULL) {
printk(KERN_ERR "PM not initialized: Missing SRAM support\n");
return -ENODEV;
}
arm_pm_idle = omap1_pm_idle;
if (cpu_is_omap16xx())
irq = INT_1610_WAKE_UP_REQ;
else
irq = -1;
if (irq >= 0) {
if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", NULL))
pr_err("Failed to request irq %d (peripheral wakeup)\n", irq);
}
/* Program new power ramp-up time
* (0 for most boards since we don't lower voltage when in deep sleep)
*/
omap_writew(ULPD_SETUP_ANALOG_CELL_3_VAL, ULPD_SETUP_ANALOG_CELL_3);
/* Setup ULPD POWER_CTRL_REG - enter deep sleep whenever possible */
omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL);
/* Configure IDLECT3 */
if (cpu_is_omap16xx())
omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3);
suspend_set_ops(&omap_pm_ops);
#ifdef CONFIG_DEBUG_FS
omap_pm_init_debugfs();
#endif
error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr);
if (error)
pr_err("sysfs_create_file failed: %d\n", error);
if (cpu_is_omap16xx()) {
/* configure LOW_PWR pin */
omap_cfg_reg(T20_1610_LOW_PWR);
}
return error;
}
__initcall(omap_pm_init);
Annotation
- Immediate include surface: `linux/suspend.h`, `linux/sched.h`, `linux/debugfs.h`, `linux/seq_file.h`, `linux/interrupt.h`, `linux/sysfs.h`, `linux/module.h`, `linux/io.h`.
- Detected declarations: `function idle_show`, `function idle_store`, `function omap1_pm_idle`, `function omap_pm_wakeup_setup`, `function omap1_pm_suspend`, `function omap_pm_debug_show`, `function omap_pm_init_debugfs`, `function omap_pm_prepare`, `function omap_pm_enter`, `function up`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.