arch/arm/mach-at91/pm.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-at91/pm.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-at91/pm.c- Extension
.c- Size
- 45415 bytes
- Lines
- 1727
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/genalloc.hlinux/io.hlinux/of_address.hlinux/of.hlinux/of_fdt.hlinux/of_platform.hlinux/platform_device.hlinux/parser.hlinux/suspend.hlinux/clk.hlinux/clk/at91_pmc.hlinux/platform_data/atmel.hasm/cacheflush.hasm/fncpy.hasm/system_misc.hasm/suspend.hgeneric.hpm.hsam_secure.h
Detected Declarations
struct at91_pm_bustruct at91_pm_sfrbu_regsstruct at91_pm_quirk_ethstruct at91_pm_quirksstruct at91_soc_pmstruct wakeup_source_infostruct ramc_infostruct pmc_infoenum at91_pm_eth_clkenum at91_pm_ethenum at91_pm_iomapsfunction at91_pm_valid_statefunction at91_pm_config_wsfunction at91_sama5d2_config_shdwc_wsfunction at91_sama5d2_config_pmc_wsfunction at91_sam9x60_config_pmc_wsfunction at91_pm_eth_quirk_is_validfunction at91_pm_config_quirksfunction for_each_wakeup_sourcefunction at91_pm_beginfunction at91_pm_verify_clocksfunction suspendfunction at91_suspend_finishfunction at91_pm_switch_ba_to_autofunction at91_pm_suspendfunction at91_pm_enterfunction at91_pm_endfunction at91rm9200_standbyfunction at91_ddr_standbyfunction sama5d3_ddr_standbyfunction at91sam9_sdram_standbyfunction sama7g5_standbyfunction at91_dt_ramcfunction for_each_matching_node_and_matchfunction at91rm9200_idlefunction at91sam9_idlefunction at91_pm_sram_initfunction for_each_compatible_node_scopedfunction at91_is_pm_mode_activefunction at91_pm_backup_scan_memcsfunction at91_pm_backup_initfunction at91_pm_secure_initfunction at91_pm_get_eth_clksfunction at91_pm_eth_clks_emptyfunction at91_pm_modes_initfunction at91_pm_modes_validatefunction at91_pm_initfunction at91rm9200_pm_init
Annotated Snippet
struct at91_pm_bu {
int suspended;
unsigned long reserved;
phys_addr_t canary;
phys_addr_t resume;
unsigned long ddr_phy_calibration[BACKUP_DDR_PHY_CALIBRATION];
};
/**
* struct at91_pm_sfrbu_regs - registers mapping for SFRBU
* @pswbu: power switch BU control registers
*/
struct at91_pm_sfrbu_regs {
struct {
u32 key;
u32 ctrl;
u32 state;
u32 softsw;
} pswbu;
};
/**
* enum at91_pm_eth_clk - Ethernet clock indexes
* @AT91_PM_ETH_PCLK: pclk index
* @AT91_PM_ETH_HCLK: hclk index
* @AT91_PM_ETH_MAX_CLK: max index
*/
enum at91_pm_eth_clk {
AT91_PM_ETH_PCLK,
AT91_PM_ETH_HCLK,
AT91_PM_ETH_MAX_CLK,
};
/**
* enum at91_pm_eth - Ethernet controller indexes
* @AT91_PM_G_ETH: gigabit Ethernet controller index
* @AT91_PM_E_ETH: megabit Ethernet controller index
* @AT91_PM_MAX_ETH: max index
*/
enum at91_pm_eth {
AT91_PM_G_ETH,
AT91_PM_E_ETH,
AT91_PM_MAX_ETH,
};
/**
* struct at91_pm_quirk_eth - AT91 PM Ethernet quirks
* @dev: Ethernet device
* @np: Ethernet device node
* @clks: Ethernet clocks
* @modes: power management mode that this quirk applies to
* @dns_modes: do not suspend modes: stop suspending if Ethernet is configured
* as wakeup source but buggy and no other wakeup source is
* available
*/
struct at91_pm_quirk_eth {
struct device *dev;
struct device_node *np;
struct clk_bulk_data clks[AT91_PM_ETH_MAX_CLK];
u32 modes;
u32 dns_modes;
};
/**
* struct at91_pm_quirks - AT91 PM quirks
* @eth: Ethernet quirks
*/
struct at91_pm_quirks {
struct at91_pm_quirk_eth eth[AT91_PM_MAX_ETH];
};
/**
* struct at91_soc_pm - AT91 SoC power management data structure
* @config_shdwc_ws: wakeup sources configuration function for SHDWC
* @config_pmc_ws: wakeup srouces configuration function for PMC
* @ws_ids: wakup sources of_device_id array
* @bu: backup unit mapped data (for backup mode)
* @quirks: PM quirks
* @data: PM data to be used on last phase of suspend
* @sfrbu_regs: SFRBU registers mapping
* @memcs: memory chip select
*/
struct at91_soc_pm {
int (*config_shdwc_ws)(void __iomem *shdwc, u32 *mode, u32 *polarity);
int (*config_pmc_ws)(void __iomem *pmc, u32 mode, u32 polarity);
const struct of_device_id *ws_ids;
struct at91_pm_bu *bu;
struct at91_pm_quirks quirks;
struct at91_pm_data data;
struct at91_pm_sfrbu_regs sfrbu_regs;
Annotation
- Immediate include surface: `linux/genalloc.h`, `linux/io.h`, `linux/of_address.h`, `linux/of.h`, `linux/of_fdt.h`, `linux/of_platform.h`, `linux/platform_device.h`, `linux/parser.h`.
- Detected declarations: `struct at91_pm_bu`, `struct at91_pm_sfrbu_regs`, `struct at91_pm_quirk_eth`, `struct at91_pm_quirks`, `struct at91_soc_pm`, `struct wakeup_source_info`, `struct ramc_info`, `struct pmc_info`, `enum at91_pm_eth_clk`, `enum at91_pm_eth`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: integration 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.