arch/mips/bcm63xx/setup.c
Source file repositories/reference/linux-study-clean/arch/mips/bcm63xx/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/bcm63xx/setup.c- Extension
.c- Size
- 3957 bytes
- Lines
- 179
- 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.
Dependency Surface
linux/init.hlinux/kernel.hlinux/delay.hlinux/memblock.hlinux/ioport.hlinux/pm.hasm/bmips.hasm/bootinfo.hasm/time.hasm/reboot.hasm/cacheflush.hbcm63xx_board.hbcm63xx_cpu.hbcm63xx_regs.hbcm63xx_io.hbcm63xx_gpio.h
Detected Declarations
function bcm63xx_machine_haltfunction bcm6348_a1_rebootfunction bcm63xx_machine_rebootfunction __bcm63xx_machine_rebootfunction plat_time_initfunction plat_mem_setupfunction bcm63xx_register_devices
Annotated Snippet
if (BCMCPU_IS_6348()) {
reg &= ~EXTIRQ_CFG_MASK_ALL_6348;
reg |= EXTIRQ_CFG_CLEAR_ALL_6348;
} else {
reg &= ~EXTIRQ_CFG_MASK_ALL;
reg |= EXTIRQ_CFG_CLEAR_ALL;
}
bcm_perf_writel(reg, perf_regs[i]);
}
if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
bcm6348_a1_reboot();
pr_info("triggering watchdog soft-reset...\n");
if (BCMCPU_IS_6328()) {
bcm_wdt_writel(1, WDT_SOFTRESET_REG);
} else {
reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG);
reg |= SYS_PLL_SOFT_RESET;
bcm_perf_writel(reg, PERF_SYS_PLL_CTL_REG);
}
while (1)
;
}
static void __bcm63xx_machine_reboot(char *p)
{
bcm63xx_machine_reboot();
}
/*
* return system type in /proc/cpuinfo
*/
const char *get_system_type(void)
{
static char buf[128];
snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%02X)",
board_get_name(),
bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev());
return buf;
}
void __init plat_time_init(void)
{
mips_hpt_frequency = bcm63xx_get_cpu_freq() / 2;
}
void __init plat_mem_setup(void)
{
memblock_add(0, bcm63xx_get_memory_size());
_machine_halt = bcm63xx_machine_halt;
_machine_restart = __bcm63xx_machine_reboot;
pm_power_off = bcm63xx_machine_halt;
set_io_port_base(0);
ioport_resource.start = 0;
ioport_resource.end = ~0;
board_setup();
}
static int __init bcm63xx_register_devices(void)
{
/* register gpiochip */
bcm63xx_gpio_init();
return board_register_devices();
}
arch_initcall(bcm63xx_register_devices);
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/delay.h`, `linux/memblock.h`, `linux/ioport.h`, `linux/pm.h`, `asm/bmips.h`, `asm/bootinfo.h`.
- Detected declarations: `function bcm63xx_machine_halt`, `function bcm6348_a1_reboot`, `function bcm63xx_machine_reboot`, `function __bcm63xx_machine_reboot`, `function plat_time_init`, `function plat_mem_setup`, `function bcm63xx_register_devices`.
- 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.