arch/powerpc/platforms/85xx/mpc85xx_mds.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/85xx/mpc85xx_mds.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/85xx/mpc85xx_mds.c- Extension
.c- Size
- 8295 bytes
- Lines
- 373
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/stddef.hlinux/kernel.hlinux/init.hlinux/errno.hlinux/reboot.hlinux/pci.hlinux/kdev_t.hlinux/major.hlinux/console.hlinux/delay.hlinux/seq_file.hlinux/initrd.hlinux/fsl_devices.hlinux/of.hlinux/of_address.hlinux/phy.hlinux/memblock.hlinux/fsl/guts.hlinux/atomic.hasm/time.hasm/io.hasm/machdep.hasm/pci-bridge.hasm/irq.hmm/mmu_decl.hasm/udbg.hsysdev/fsl_soc.hsysdev/fsl_pci.hsoc/fsl/qe/qe.hasm/mpic.hasm/swiotlb.hsmp.h
Detected Declarations
function Copyrightfunction mpc8568_mds_phy_fixupsfunction mpc85xx_mds_reset_ucc_physfunction for_each_compatible_nodefunction mpc85xx_mds_qe_initfunction mpc85xx_mds_qe_initfunction board_fixupsfunction mpc85xx_publish_devicesfunction mpc85xx_mds_pic_init
Annotated Snippet
for_each_compatible_node(np, "network", "ucc_geth") {
const unsigned int *prop;
int ucc_num;
prop = of_get_property(np, "cell-index", NULL);
if (prop == NULL)
continue;
ucc_num = *prop - 1;
prop = of_get_property(np, "phy-connection-type", NULL);
if (prop == NULL)
continue;
if (strcmp("rtbi", (const char *)prop) == 0)
clrsetbits_8(&bcsr_regs[7 + ucc_num],
BCSR_UCC_RGMII, BCSR_UCC_RTBI);
}
} else if (machine_is(p1021_mds)) {
#define BCSR11_ENET_MICRST (0x1 << 5)
/* Reset Micrel PHY */
clrbits8(&bcsr_regs[11], BCSR11_ENET_MICRST);
setbits8(&bcsr_regs[11], BCSR11_ENET_MICRST);
}
iounmap(bcsr_regs);
}
static void __init mpc85xx_mds_qe_init(void)
{
struct device_node *np;
mpc85xx_qe_par_io_init();
mpc85xx_mds_reset_ucc_phys();
if (machine_is(p1021_mds)) {
struct ccsr_guts __iomem *guts;
np = of_find_node_by_name(NULL, "global-utilities");
if (np) {
guts = of_iomap(np, 0);
if (!guts)
pr_err("mpc85xx-rdb: could not map global utilities register\n");
else{
/* P1021 has pins muxed for QE and other functions. To
* enable QE UEC mode, we need to set bit QE0 for UCC1
* in Eth mode, QE0 and QE3 for UCC5 in Eth mode, QE9
* and QE12 for QE MII management signals in PMUXCR
* register.
*/
setbits32(&guts->pmuxcr, MPC85xx_PMUXCR_QE(0) |
MPC85xx_PMUXCR_QE(3) |
MPC85xx_PMUXCR_QE(9) |
MPC85xx_PMUXCR_QE(12));
iounmap(guts);
}
of_node_put(np);
}
}
}
#else
static void __init mpc85xx_mds_qe_init(void) { }
#endif /* CONFIG_QUICC_ENGINE */
static void __init mpc85xx_mds_setup_arch(void)
{
if (ppc_md.progress)
ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
mpc85xx_smp_init();
mpc85xx_mds_qe_init();
fsl_pci_assign_primary();
swiotlb_detect_4g();
}
#if IS_BUILTIN(CONFIG_PHYLIB)
static int __init board_fixups(void)
{
char phy_id[20];
char *compstrs[2] = {"fsl,gianfar-mdio", "fsl,ucc-mdio"};
struct device_node *mdio;
struct resource res;
int i;
Annotation
- Immediate include surface: `linux/stddef.h`, `linux/kernel.h`, `linux/init.h`, `linux/errno.h`, `linux/reboot.h`, `linux/pci.h`, `linux/kdev_t.h`, `linux/major.h`.
- Detected declarations: `function Copyright`, `function mpc8568_mds_phy_fixups`, `function mpc85xx_mds_reset_ucc_phys`, `function for_each_compatible_node`, `function mpc85xx_mds_qe_init`, `function mpc85xx_mds_qe_init`, `function board_fixups`, `function mpc85xx_publish_devices`, `function mpc85xx_mds_pic_init`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.