arch/arm/mach-pxa/pxa25x.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-pxa/pxa25x.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-pxa/pxa25x.c- Extension
.c- Size
- 6209 bytes
- Lines
- 256
- 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/platform_device.hlinux/suspend.hlinux/syscore_ops.hlinux/irq.hlinux/irqchip.hlinux/platform_data/mmp_dma.hlinux/soc/pxa/cpu.hlinux/soc/pxa/smemc.hasm/mach/map.hasm/suspend.hirqs.hpxa25x.hreset.hpm.haddr-map.hsmemc.hgeneric.hdevices.h
Detected Declarations
function pxa25x_cpu_pm_savefunction pxa25x_cpu_pm_restorefunction pxa25x_cpu_pm_enterfunction pxa25x_cpu_pm_preparefunction pxa25x_cpu_pm_finishfunction pxa25x_init_pmfunction pxa25x_init_pmfunction pxa25x_init_irqfunction pxa25x_dt_init_irqfunction pxa25x_map_iofunction pxa25x_init
Annotated Snippet
static inline void pxa25x_init_pm(void) {}
#endif
/* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm
*/
static int pxa25x_set_wake(struct irq_data *d, unsigned int on)
{
int gpio = pxa_irq_to_gpio(d->irq);
uint32_t mask = 0;
if (gpio >= 0 && gpio < 85)
return gpio_set_wake(gpio, on);
if (d->irq == IRQ_RTCAlrm) {
mask = PWER_RTC;
goto set_pwer;
}
return -EINVAL;
set_pwer:
if (on)
PWER |= mask;
else
PWER &=~mask;
return 0;
}
void __init pxa25x_init_irq(void)
{
pxa_init_irq(32, pxa25x_set_wake);
set_handle_irq(pxa25x_handle_irq);
}
static int __init __init
pxa25x_dt_init_irq(struct device_node *node, struct device_node *parent)
{
pxa_dt_irq_init(pxa25x_set_wake);
set_handle_irq(icip_handle_irq);
return 0;
}
IRQCHIP_DECLARE(pxa25x_intc, "marvell,pxa-intc", pxa25x_dt_init_irq);
static struct map_desc pxa25x_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 pxa25x_map_io(void)
{
pxa_map_io();
iotable_init(ARRAY_AND_SIZE(pxa25x_io_desc));
pxa25x_get_clk_frequency_khz(1);
}
static struct platform_device *pxa25x_devices[] __initdata = {
&pxa25x_device_gpio,
&pxa25x_device_udc,
&pxa_device_pmu,
&pxa_device_i2s,
&sa1100_device_rtc,
&pxa25x_device_ssp,
&pxa25x_device_nssp,
&pxa25x_device_assp,
&pxa25x_device_pwm0,
&pxa25x_device_pwm1,
&pxa_device_asoc_platform,
};
static const struct dma_slave_map pxa25x_slave_map[] = {
/* PXA25x, PXA27x and PXA3xx common entries */
{ "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) },
{ "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) },
{ "pxa2xx-ac97", "pcm_pcm_aux_mono_out",
PDMA_FILTER_PARAM(LOWEST, 10) },
{ "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) },
{ "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) },
{ "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 13) },
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/platform_device.h`.
- Detected declarations: `function pxa25x_cpu_pm_save`, `function pxa25x_cpu_pm_restore`, `function pxa25x_cpu_pm_enter`, `function pxa25x_cpu_pm_prepare`, `function pxa25x_cpu_pm_finish`, `function pxa25x_init_pm`, `function pxa25x_init_pm`, `function pxa25x_init_irq`, `function pxa25x_dt_init_irq`, `function pxa25x_map_io`.
- 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.