arch/arm/mach-pxa/devices.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-pxa/devices.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-pxa/devices.c- Extension
.c- Size
- 15318 bytes
- Lines
- 729
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/init.hlinux/platform_device.hlinux/clkdev.hlinux/clk-provider.hlinux/dma-mapping.hlinux/dmaengine.hlinux/gpio-pxa.hlinux/platform_data/i2c-pxa.hlinux/soc/pxa/cpu.hudc.hlinux/platform_data/video-pxafb.hlinux/platform_data/mmc-pxamci.hirqs.hlinux/platform_data/usb-ohci-pxa27x.hlinux/platform_data/mmp_dma.hmfp-pxa2xx.hregs-ost.hreset.hdevices.hgeneric.h
Detected Declarations
function pxa_register_devicefunction pxa_set_mci_infofunction pxa_set_fb_infofunction pxa_set_ffuart_infofunction pxa_set_btuart_infofunction pxa_set_stuart_infofunction pxa_set_hwuart_infofunction pxa_set_i2c_infofunction pxa_set_ohci_infofunction pxa2xx_set_dmac_infofunction pxa_register_wdt
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/gpio-pxa.h>
#include <linux/platform_data/i2c-pxa.h>
#include <linux/soc/pxa/cpu.h>
#include "udc.h"
#include <linux/platform_data/video-pxafb.h>
#include <linux/platform_data/mmc-pxamci.h>
#include "irqs.h"
#include <linux/platform_data/usb-ohci-pxa27x.h>
#include <linux/platform_data/mmp_dma.h>
#include "mfp-pxa2xx.h"
#include "regs-ost.h"
#include "reset.h"
#include "devices.h"
#include "generic.h"
void __init pxa_register_device(struct platform_device *dev, void *data)
{
int ret;
dev->dev.platform_data = data;
ret = platform_device_register(dev);
if (ret)
dev_err(&dev->dev, "unable to register device: %d\n", ret);
}
static struct resource pxa_resource_pmu = {
.start = IRQ_PMU,
.end = IRQ_PMU,
.flags = IORESOURCE_IRQ,
};
struct platform_device pxa_device_pmu = {
.name = "xscale-pmu",
.id = -1,
.resource = &pxa_resource_pmu,
.num_resources = 1,
};
static const struct resource pxamci_resources[] = {
[0] = {
.start = 0x41100000,
.end = 0x41100fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_MMC,
.end = IRQ_MMC,
.flags = IORESOURCE_IRQ,
},
};
void __init pxa_set_mci_info(const struct pxamci_platform_data *info,
const struct property_entry *props)
{
const struct platform_device_info mci_info = {
.name = "pxa2xx-mci",
.id = 0,
.res = pxamci_resources,
.num_res = ARRAY_SIZE(pxamci_resources),
.data = info,
.size_data = sizeof(*info),
.dma_mask = 0xffffffffUL,
.properties = props,
};
struct platform_device *mci_dev;
int err;
mci_dev = platform_device_register_full(&mci_info);
err = PTR_ERR_OR_ZERO(mci_dev);
if (err)
pr_err("Unable to create mci device: %d\n", err);
}
static struct pxa2xx_udc_mach_info pxa_udc_info = {
.gpio_pullup = -1,
};
static struct resource pxa2xx_udc_resources[] = {
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/init.h`, `linux/platform_device.h`, `linux/clkdev.h`, `linux/clk-provider.h`, `linux/dma-mapping.h`, `linux/dmaengine.h`.
- Detected declarations: `function pxa_register_device`, `function pxa_set_mci_info`, `function pxa_set_fb_info`, `function pxa_set_ffuart_info`, `function pxa_set_btuart_info`, `function pxa_set_stuart_info`, `function pxa_set_hwuart_info`, `function pxa_set_i2c_info`, `function pxa_set_ohci_info`, `function pxa2xx_set_dmac_info`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: source 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.