arch/m68k/q40/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/q40/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/q40/config.c- Extension
.c- Size
- 6549 bytes
- Lines
- 297
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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/errno.hlinux/types.hlinux/kernel.hlinux/mm.hlinux/console.hlinux/linkage.hlinux/init.hlinux/major.hlinux/serial_reg.hlinux/rtc.hlinux/bcd.hlinux/platform_device.hasm/io.hasm/bootinfo.hasm/setup.hasm/irq.hasm/traps.hasm/machdep.hasm/q40_master.hasm/config.hq40.h
Detected Declarations
function q40_mem_console_writefunction q40_debug_setupfunction q40_heartbeatfunction q40_resetfunction q40_haltfunction q40_get_modelfunction q40_disable_irqsfunction config_q40function q40_parse_bootinfofunction q40_hwclkfunction q40_get_rtc_pllfunction q40_set_rtc_pllfunction q40_platform_init
Annotated Snippet
while (count-- > 0) {
*q40_mem_cptr = *p++;
q40_mem_cptr += 4;
_cpleft--;
}
}
}
static int __init q40_debug_setup(char *arg)
{
/* useful for early debugging stages - writes kernel messages into SRAM */
if (MACH_IS_Q40 && !strncmp(arg, "mem", 3)) {
_cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4;
register_console(&q40_console_driver);
}
return 0;
}
early_param("debug", q40_debug_setup);
static int halted;
#ifdef CONFIG_HEARTBEAT
static void q40_heartbeat(int on)
{
if (halted)
return;
if (on)
Q40_LED_ON();
else
Q40_LED_OFF();
}
#endif
static void q40_reset(void)
{
halted = 1;
pr_info("*******************************************\n"
"Called q40_reset : press the RESET button!!\n"
"*******************************************\n");
Q40_LED_ON();
while (1)
;
}
static void q40_halt(void)
{
halted = 1;
pr_info("*******************\n"
" Called q40_halt\n"
"*******************\n");
Q40_LED_ON();
while (1)
;
}
static void q40_get_model(char *model)
{
sprintf(model, "Q40");
}
static unsigned int serports[] =
{
0x3f8,0x2f8,0x3e8,0x2e8,0
};
static void __init q40_disable_irqs(void)
{
unsigned i, j;
j = 0;
while ((i = serports[j++]))
outb(0, i + UART_IER);
master_outb(0, EXT_ENABLE_REG);
master_outb(0, KEY_IRQ_ENABLE_REG);
}
void __init config_q40(void)
{
mach_sched_init = q40_sched_init;
mach_init_IRQ = q40_init_IRQ;
mach_hwclk = q40_hwclk;
mach_get_rtc_pll = q40_get_rtc_pll;
mach_set_rtc_pll = q40_set_rtc_pll;
mach_reset = q40_reset;
mach_get_model = q40_get_model;
Annotation
- Immediate include surface: `linux/errno.h`, `linux/types.h`, `linux/kernel.h`, `linux/mm.h`, `linux/console.h`, `linux/linkage.h`, `linux/init.h`, `linux/major.h`.
- Detected declarations: `function q40_mem_console_write`, `function q40_debug_setup`, `function q40_heartbeat`, `function q40_reset`, `function q40_halt`, `function q40_get_model`, `function q40_disable_irqs`, `function config_q40`, `function q40_parse_bootinfo`, `function q40_hwclk`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.