arch/powerpc/platforms/86xx/gef_sbc310.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/86xx/gef_sbc310.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/86xx/gef_sbc310.c- Extension
.c- Size
- 4086 bytes
- Lines
- 180
- 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/of.hlinux/of_address.hasm/time.hasm/machdep.hasm/pci-bridge.hmm/mmu_decl.hasm/udbg.hasm/mpic.hasm/nvram.hsysdev/fsl_pci.hsysdev/fsl_soc.hsysdev/ge/ge_pic.hmpc86xx.h
Detected Declarations
function gef_sbc310_init_irqfunction gef_sbc310_setup_archfunction gef_sbc310_get_board_idfunction gef_sbc310_get_pcb_revfunction gef_sbc310_get_board_revfunction gef_sbc310_get_fpga_revfunction gef_sbc310_show_cpuinfofunction gef_sbc310_nec_fixup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* GE SBC310 board support
*
* Author: Martyn Welch <martyn.welch@ge.com>
*
* Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.
*
* Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
* Copyright 2006 Freescale Semiconductor Inc.
*
* NEC fixup adapted from arch/mips/pci/fixup-lm2e.c
*/
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <asm/time.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <mm/mmu_decl.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <asm/nvram.h>
#include <sysdev/fsl_pci.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/ge/ge_pic.h>
#include "mpc86xx.h"
#undef DEBUG
#ifdef DEBUG
#define DBG (fmt...) do { printk(KERN_ERR "SBC310: " fmt); } while (0)
#else
#define DBG (fmt...) do { } while (0)
#endif
void __iomem *sbc310_regs;
static void __init gef_sbc310_init_irq(void)
{
struct device_node *cascade_node = NULL;
mpc86xx_init_irq();
/*
* There is a simple interrupt handler in the main FPGA, this needs
* to be cascaded into the MPIC
*/
cascade_node = of_find_compatible_node(NULL, NULL, "gef,fpga-pic");
if (!cascade_node) {
printk(KERN_WARNING "SBC310: No FPGA PIC\n");
return;
}
gef_pic_init(cascade_node);
of_node_put(cascade_node);
}
static void __init gef_sbc310_setup_arch(void)
{
struct device_node *regs;
printk(KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n");
#ifdef CONFIG_SMP
mpc86xx_smp_init();
#endif
fsl_pci_assign_primary();
/* Remap basic board registers */
regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs");
if (regs) {
sbc310_regs = of_iomap(regs, 0);
if (sbc310_regs == NULL)
printk(KERN_WARNING "Unable to map board registers\n");
of_node_put(regs);
}
#if defined(CONFIG_MMIO_NVRAM)
mmio_nvram_init();
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/of.h`, `linux/of_address.h`.
- Detected declarations: `function gef_sbc310_init_irq`, `function gef_sbc310_setup_arch`, `function gef_sbc310_get_board_id`, `function gef_sbc310_get_pcb_rev`, `function gef_sbc310_get_board_rev`, `function gef_sbc310_get_fpga_rev`, `function gef_sbc310_show_cpuinfo`, `function gef_sbc310_nec_fixup`.
- 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.