arch/arm/mach-pxa/pxa27x.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-pxa/pxa27x.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-pxa/pxa27x.c- Extension
.c- Size
- 8883 bytes
- Lines
- 365
- 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/dmaengine.hlinux/dma/pxa-dma.hlinux/gpio.hlinux/gpio-pxa.hlinux/module.hlinux/kernel.hlinux/init.hlinux/irqchip.hlinux/suspend.hlinux/platform_device.hlinux/syscore_ops.hlinux/io.hlinux/irq.hlinux/platform_data/i2c-pxa.hlinux/platform_data/mmp_dma.hlinux/soc/pxa/cpu.hlinux/soc/pxa/smemc.hasm/mach/map.hasm/irq.hasm/suspend.hirqs.hpxa27x.hreset.hlinux/platform_data/pxa2xx_udc.hlinux/platform_data/usb-ohci-pxa27x.hlinux/platform_data/asoc-pxa.hpm.haddr-map.hsmemc.hgeneric.hdevices.hlinux/clk-provider.h
Detected Declarations
function pxa27x_clear_otgphfunction pxa27x_configure_ac97resetfunction pxa27x_cpu_pm_savefunction pxa27x_cpu_pm_restorefunction pxa27x_cpu_pm_enterfunction pxa27x_cpu_pm_validfunction pxa27x_cpu_pm_preparefunction pxa27x_cpu_pm_finishfunction pxa27x_init_pmfunction pxa27x_init_pmfunction pxa27x_init_irqfunction pxa27x_dt_init_irqfunction pxa27x_map_iofunction pxa27x_set_i2c_power_infofunction pxa27x_initexport pxa27x_clear_otgphexport pxa27x_configure_ac97reset
Annotated Snippet
static inline void pxa27x_init_pm(void) {}
#endif
/* PXA27x: Various gpios can issue wakeup events. This logic only
* handles the simple cases, not the WEMUX2 and WEMUX3 options
*/
static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
{
int gpio = pxa_irq_to_gpio(d->irq);
uint32_t mask;
if (gpio >= 0 && gpio < 128)
return gpio_set_wake(gpio, on);
if (d->irq == IRQ_KEYPAD)
return keypad_set_wake(on);
switch (d->irq) {
case IRQ_RTCAlrm:
mask = PWER_RTC;
break;
case IRQ_USB:
mask = 1u << 26;
break;
default:
return -EINVAL;
}
if (on)
PWER |= mask;
else
PWER &=~mask;
return 0;
}
void __init pxa27x_init_irq(void)
{
pxa_init_irq(34, pxa27x_set_wake);
set_handle_irq(pxa27x_handle_irq);
}
static int __init
pxa27x_dt_init_irq(struct device_node *node, struct device_node *parent)
{
pxa_dt_irq_init(pxa27x_set_wake);
set_handle_irq(ichp_handle_irq);
return 0;
}
IRQCHIP_DECLARE(pxa27x_intc, "marvell,pxa-intc", pxa27x_dt_init_irq);
static struct map_desc pxa27x_io_desc[] __initdata = {
{ /* Mem Ctl */
.virtual = (unsigned long)SMEMC_VIRT,
.pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
.length = SMEMC_SIZE,
.type = MT_DEVICE
}, { /* UNCACHED_PHYS_0 */
.virtual = UNCACHED_PHYS_0,
.pfn = __phys_to_pfn(0x00000000),
.length = UNCACHED_PHYS_0_SIZE,
.type = MT_DEVICE
},
};
void __init pxa27x_map_io(void)
{
pxa_map_io();
iotable_init(ARRAY_AND_SIZE(pxa27x_io_desc));
pxa27x_get_clk_frequency_khz(1);
}
/*
* device registration specific to PXA27x.
*/
void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
{
local_irq_disable();
PCFR |= PCFR_PI2CEN;
local_irq_enable();
pxa_register_device(&pxa27x_device_i2c_power, info);
}
static struct platform_device *devices[] __initdata = {
&pxa27x_device_gpio,
&pxa27x_device_udc,
&pxa_device_pmu,
&pxa_device_i2s,
&pxa_device_asoc_ssp1,
Annotation
- Immediate include surface: `linux/dmaengine.h`, `linux/dma/pxa-dma.h`, `linux/gpio.h`, `linux/gpio-pxa.h`, `linux/module.h`, `linux/kernel.h`, `linux/init.h`, `linux/irqchip.h`.
- Detected declarations: `function pxa27x_clear_otgph`, `function pxa27x_configure_ac97reset`, `function pxa27x_cpu_pm_save`, `function pxa27x_cpu_pm_restore`, `function pxa27x_cpu_pm_enter`, `function pxa27x_cpu_pm_valid`, `function pxa27x_cpu_pm_prepare`, `function pxa27x_cpu_pm_finish`, `function pxa27x_init_pm`, `function pxa27x_init_pm`.
- 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.