arch/mips/pic32/pic32mzda/init.c
Source file repositories/reference/linux-study-clean/arch/mips/pic32/pic32mzda/init.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/pic32/pic32mzda/init.c- Extension
.c- Size
- 2750 bytes
- Lines
- 128
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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/init.hlinux/kernel.hlinux/of_address.hlinux/of_fdt.hlinux/of_platform.hlinux/platform_data/sdhci-pic32.hasm/fw/fw.hasm/mips-boards/generic.hasm/prom.hpic32mzda.h
Detected Declarations
function Copyrightfunction plat_mem_setupfunction pic32_init_cmdlinefunction prom_initfunction pic32_of_prepare_platform_datafunction plat_of_setup
Annotated Snippet
while (*src && count) {
*dst++ = *src++;
--count;
}
*dst++ = ' ';
}
if (i > 1)
--dst;
*dst = 0;
}
void __init prom_init(void)
{
pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1);
}
static struct pic32_sdhci_platform_data sdhci_data = {
.setup_dma = pic32_set_sdhci_adma_fifo_threshold,
};
static struct of_dev_auxdata pic32_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("microchip,pic32mzda-sdhci", 0, "sdhci", &sdhci_data),
{ /* sentinel */}
};
static int __init pic32_of_prepare_platform_data(struct of_dev_auxdata *lookup)
{
struct device_node *root, *np;
struct resource res;
root = of_find_node_by_path("/");
for (; lookup->compatible; lookup++) {
np = of_find_compatible_node(NULL, NULL, lookup->compatible);
if (np) {
lookup->name = (char *)np->name;
if (lookup->phys_addr) {
of_node_put(np);
continue;
}
if (!of_address_to_resource(np, 0, &res))
lookup->phys_addr = res.start;
of_node_put(np);
}
}
of_node_put(root);
return 0;
}
static int __init plat_of_setup(void)
{
if (!of_have_populated_dt())
panic("Device tree not present");
pic32_of_prepare_platform_data(pic32_auxdata_lookup);
if (of_platform_default_populate(NULL, pic32_auxdata_lookup, NULL))
panic("Failed to populate DT");
return 0;
}
arch_initcall(plat_of_setup);
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/of_address.h`, `linux/of_fdt.h`, `linux/of_platform.h`, `linux/platform_data/sdhci-pic32.h`, `asm/fw/fw.h`, `asm/mips-boards/generic.h`.
- Detected declarations: `function Copyright`, `function plat_mem_setup`, `function pic32_init_cmdline`, `function prom_init`, `function pic32_of_prepare_platform_data`, `function plat_of_setup`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.