arch/powerpc/platforms/85xx/ppa8548.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/85xx/ppa8548.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/85xx/ppa8548.c- Extension
.c- Size
- 1887 bytes
- Lines
- 84
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/stddef.hlinux/kernel.hlinux/init.hlinux/reboot.hlinux/seq_file.hlinux/of_fdt.hlinux/of_platform.hasm/machdep.hasm/udbg.hasm/mpic.hsysdev/fsl_soc.h
Detected Declarations
function Osfunction ppa8548_setup_archfunction ppa8548_show_cpuinfofunction declare_of_platform_devices
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* ppa8548 setup and early boot code.
*
* Copyright 2009 Prodrive B.V..
*
* By Stef van Os (see MAINTAINERS for contact information)
*
* Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.
* Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.
*/
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/reboot.h>
#include <linux/seq_file.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <asm/machdep.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <sysdev/fsl_soc.h>
static void __init ppa8548_pic_init(void)
{
struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
0, 256, " OpenPIC ");
BUG_ON(mpic == NULL);
mpic_init(mpic);
}
/*
* Setup the architecture
*/
static void __init ppa8548_setup_arch(void)
{
if (ppc_md.progress)
ppc_md.progress("ppa8548_setup_arch()", 0);
}
static void ppa8548_show_cpuinfo(struct seq_file *m)
{
uint32_t svid, phid1;
svid = mfspr(SPRN_SVR);
seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
seq_printf(m, "SVR\t\t: 0x%x\n", svid);
/* Display cpu Pll setting */
phid1 = mfspr(SPRN_HID1);
seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
}
static const struct of_device_id of_bus_ids[] __initconst = {
{ .name = "soc", },
{ .type = "soc", },
{ .compatible = "simple-bus", },
{ .compatible = "gianfar", },
{ .compatible = "fsl,srio", },
{},
};
static int __init declare_of_platform_devices(void)
{
of_platform_bus_probe(NULL, of_bus_ids, NULL);
return 0;
}
machine_device_initcall(ppa8548, declare_of_platform_devices);
define_machine(ppa8548) {
.name = "ppa8548",
.compatible = "ppa8548",
.setup_arch = ppa8548_setup_arch,
.init_IRQ = ppa8548_pic_init,
.show_cpuinfo = ppa8548_show_cpuinfo,
.get_irq = mpic_get_irq,
.progress = udbg_progress,
};
Annotation
- Immediate include surface: `linux/stddef.h`, `linux/kernel.h`, `linux/init.h`, `linux/reboot.h`, `linux/seq_file.h`, `linux/of_fdt.h`, `linux/of_platform.h`, `asm/machdep.h`.
- Detected declarations: `function Os`, `function ppa8548_setup_arch`, `function ppa8548_show_cpuinfo`, `function declare_of_platform_devices`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.