arch/arm/mach-pxa/pxa3xx.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-pxa/pxa3xx.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-pxa/pxa3xx.c- Extension
.c- Size
- 9503 bytes
- Lines
- 435
- 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/module.hlinux/kernel.hlinux/init.hlinux/gpio-pxa.hlinux/pm.hlinux/platform_device.hlinux/irq.hlinux/irqchip.hlinux/io.hlinux/of.hlinux/syscore_ops.hlinux/platform_data/i2c-pxa.hlinux/platform_data/mmp_dma.hlinux/soc/pxa/cpu.hlinux/clk/pxa.hasm/mach/map.hasm/suspend.hpxa3xx-regs.hreset.hlinux/platform_data/usb-ohci-pxa27x.hpm.haddr-map.hsmemc.hirqs.hgeneric.hdevices.h
Detected Declarations
function modefunction pxa3xx_cpu_pm_suspendfunction pxa3xx_cpu_pm_enterfunction pxa3xx_cpu_pm_validfunction pxa3xx_init_pmfunction pxa3xx_set_wakefunction pxa3xx_init_pmfunction pxa_mask_ext_wakeupfunction pxa_unmask_ext_wakeupfunction pxa_set_ext_wakeup_typefunction pxa_init_ext_wakeup_irqfunction __pxa3xx_init_irqfunction pxa3xx_dt_init_irqfunction pxa3xx_map_iofunction pxa3xx_init
Annotated Snippet
static inline void pxa3xx_init_pm(void) {}
#define pxa3xx_set_wake NULL
#endif
static void pxa_ack_ext_wakeup(struct irq_data *d)
{
PECR |= PECR_IS(d->irq - IRQ_WAKEUP0);
}
static void pxa_mask_ext_wakeup(struct irq_data *d)
{
pxa_mask_irq(d);
PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0);
}
static void pxa_unmask_ext_wakeup(struct irq_data *d)
{
pxa_unmask_irq(d);
PECR |= PECR_IE(d->irq - IRQ_WAKEUP0);
}
static int pxa_set_ext_wakeup_type(struct irq_data *d, unsigned int flow_type)
{
if (flow_type & IRQ_TYPE_EDGE_RISING)
PWER |= 1 << (d->irq - IRQ_WAKEUP0);
if (flow_type & IRQ_TYPE_EDGE_FALLING)
PWER |= 1 << (d->irq - IRQ_WAKEUP0 + 2);
return 0;
}
static struct irq_chip pxa_ext_wakeup_chip = {
.name = "WAKEUP",
.irq_ack = pxa_ack_ext_wakeup,
.irq_mask = pxa_mask_ext_wakeup,
.irq_unmask = pxa_unmask_ext_wakeup,
.irq_set_type = pxa_set_ext_wakeup_type,
};
static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *,
unsigned int))
{
int irq;
for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
irq_set_chip_and_handler(irq, &pxa_ext_wakeup_chip,
handle_edge_irq);
irq_clear_status_flags(irq, IRQ_NOREQUEST);
}
pxa_ext_wakeup_chip.irq_set_wake = fn;
}
static void __init __pxa3xx_init_irq(void)
{
/* enable CP6 access */
u32 value;
__asm__ __volatile__("mrc p15, 0, %0, c15, c1, 0\n": "=r"(value));
value |= (1 << 6);
__asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value));
pxa_init_ext_wakeup_irq(pxa3xx_set_wake);
}
static int __init __init
pxa3xx_dt_init_irq(struct device_node *node, struct device_node *parent)
{
__pxa3xx_init_irq();
pxa_dt_irq_init(pxa3xx_set_wake);
set_handle_irq(ichp_handle_irq);
return 0;
}
IRQCHIP_DECLARE(pxa3xx_intc, "marvell,pxa-intc", pxa3xx_dt_init_irq);
static struct map_desc pxa3xx_io_desc[] __initdata = {
{ /* Mem Ctl */
.virtual = (unsigned long)SMEMC_VIRT,
.pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE),
.length = SMEMC_SIZE,
.type = MT_DEVICE
}, {
.virtual = (unsigned long)NAND_VIRT,
.pfn = __phys_to_pfn(NAND_PHYS),
.length = NAND_SIZE,
.type = MT_DEVICE
},
};
Annotation
- Immediate include surface: `linux/dmaengine.h`, `linux/dma/pxa-dma.h`, `linux/module.h`, `linux/kernel.h`, `linux/init.h`, `linux/gpio-pxa.h`, `linux/pm.h`, `linux/platform_device.h`.
- Detected declarations: `function mode`, `function pxa3xx_cpu_pm_suspend`, `function pxa3xx_cpu_pm_enter`, `function pxa3xx_cpu_pm_valid`, `function pxa3xx_init_pm`, `function pxa3xx_set_wake`, `function pxa3xx_init_pm`, `function pxa_mask_ext_wakeup`, `function pxa_unmask_ext_wakeup`, `function pxa_set_ext_wakeup_type`.
- 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.