arch/powerpc/platforms/85xx/ge_imp3a.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/85xx/ge_imp3a.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/85xx/ge_imp3a.c- Extension
.c- Size
- 4654 bytes
- Lines
- 208
- 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/pci.hlinux/kdev_t.hlinux/delay.hlinux/seq_file.hlinux/interrupt.hlinux/of.hlinux/of_address.hasm/time.hasm/machdep.hasm/pci-bridge.hmm/mmu_decl.hasm/udbg.hasm/mpic.hasm/swiotlb.hasm/nvram.hsysdev/fsl_soc.hsysdev/fsl_pci.hsmp.hmpc85xx.hsysdev/ge/ge_pic.h
Detected Declarations
function ge_imp3a_pic_initfunction ge_imp3a_pci_assign_primaryfunction for_each_node_by_typefunction ge_imp3a_setup_archfunction ge_imp3a_get_pcb_revfunction ge_imp3a_get_board_revfunction ge_imp3a_get_fpga_revfunction ge_imp3a_get_cpci_geo_addrfunction ge_imp3a_get_cpci_is_sysconfunction ge_imp3a_show_cpuinfo
Annotated Snippet
if (of_device_is_compatible(np, "gef,fpga-pic-1.00")) {
cascade_node = np;
break;
}
if (cascade_node == NULL) {
printk(KERN_WARNING "IMP3A: No FPGA PIC\n");
return;
}
gef_pic_init(cascade_node);
of_node_put(cascade_node);
}
static void __init ge_imp3a_pci_assign_primary(void)
{
#ifdef CONFIG_PCI
struct device_node *np;
struct resource rsrc;
for_each_node_by_type(np, "pci") {
if (of_device_is_compatible(np, "fsl,mpc8540-pci") ||
of_device_is_compatible(np, "fsl,mpc8548-pcie") ||
of_device_is_compatible(np, "fsl,p2020-pcie")) {
of_address_to_resource(np, 0, &rsrc);
if ((rsrc.start & 0xfffff) == 0x9000) {
of_node_put(fsl_pci_primary);
fsl_pci_primary = of_node_get(np);
}
}
}
#endif
}
/*
* Setup the architecture
*/
static void __init ge_imp3a_setup_arch(void)
{
struct device_node *regs;
if (ppc_md.progress)
ppc_md.progress("ge_imp3a_setup_arch()", 0);
mpc85xx_smp_init();
ge_imp3a_pci_assign_primary();
swiotlb_detect_4g();
/* Remap basic board registers */
regs = of_find_compatible_node(NULL, NULL, "ge,imp3a-fpga-regs");
if (regs) {
imp3a_regs = of_iomap(regs, 0);
if (imp3a_regs == NULL)
printk(KERN_WARNING "Unable to map board registers\n");
of_node_put(regs);
}
#if defined(CONFIG_MMIO_NVRAM)
mmio_nvram_init();
#endif
printk(KERN_INFO "GE Intelligent Platforms IMP3A 3U cPCI SBC\n");
}
/* Return the PCB revision */
static unsigned int ge_imp3a_get_pcb_rev(void)
{
unsigned int reg;
reg = ioread16(imp3a_regs);
return (reg >> 8) & 0xff;
}
/* Return the board (software) revision */
static unsigned int ge_imp3a_get_board_rev(void)
{
unsigned int reg;
reg = ioread16(imp3a_regs + 0x2);
return reg & 0xff;
}
/* Return the FPGA revision */
static unsigned int ge_imp3a_get_fpga_rev(void)
{
unsigned int reg;
reg = ioread16(imp3a_regs + 0x2);
Annotation
- Immediate include surface: `linux/stddef.h`, `linux/kernel.h`, `linux/pci.h`, `linux/kdev_t.h`, `linux/delay.h`, `linux/seq_file.h`, `linux/interrupt.h`, `linux/of.h`.
- Detected declarations: `function ge_imp3a_pic_init`, `function ge_imp3a_pci_assign_primary`, `function for_each_node_by_type`, `function ge_imp3a_setup_arch`, `function ge_imp3a_get_pcb_rev`, `function ge_imp3a_get_board_rev`, `function ge_imp3a_get_fpga_rev`, `function ge_imp3a_get_cpci_geo_addr`, `function ge_imp3a_get_cpci_is_syscon`, `function ge_imp3a_show_cpuinfo`.
- 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.