arch/m68k/mvme16x/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/mvme16x/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/mvme16x/config.c- Extension
.c- Size
- 11108 bytes
- Lines
- 445
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kernel.hlinux/mm.hlinux/seq_file.hlinux/tty.hlinux/clocksource.hlinux/console.hlinux/linkage.hlinux/init.hlinux/major.hlinux/interrupt.hlinux/module.hlinux/platform_device.hlinux/rtc/m48t59.hasm/bootinfo.hasm/bootinfo-vme.hasm/byteorder.hasm/setup.hasm/irq.hasm/traps.hasm/machdep.hasm/mvme16xhw.hasm/config.hmvme16x.h
Detected Declarations
function mvme16x_parse_bootinfofunction mvme16x_resetfunction mvme16x_get_modelfunction mvme16x_get_hardware_listfunction mvme16x_init_IRQfunction mvme16x_cons_writefunction config_mvme16xfunction mvme16x_platform_initfunction mvme16x_abort_intfunction mvme16x_timer_intfunction mvme16x_sched_initfunction mvme16x_read_clkexport mvme16x_config
Annotated Snippet
if ((base_addr[CyLICR] >> 2) == port) {
if (i == count) {
/* Last char of string is now output */
base_addr[CyTEOIR] = CyNOTRANS;
break;
}
if (do_lf) {
base_addr[CyTDR] = '\n';
str++;
i++;
do_lf = 0;
}
else if (*str == '\n') {
base_addr[CyTDR] = '\r';
do_lf = 1;
}
else {
base_addr[CyTDR] = *str++;
i++;
}
base_addr[CyTEOIR] = 0;
}
else
base_addr[CyTEOIR] = CyNOTRANS;
}
}
base_addr[CyIER] = ier;
}
#endif
void __init config_mvme16x(void)
{
p_bdid p = &mvme_bdid;
char id[40];
uint16_t brdno = be16_to_cpu(p->brdno);
mach_sched_init = mvme16x_sched_init;
mach_init_IRQ = mvme16x_init_IRQ;
mach_reset = mvme16x_reset;
mach_get_model = mvme16x_get_model;
mach_get_hardware_list = mvme16x_get_hardware_list;
/* Report board revision */
if (strncmp("BDID", p->bdid, 4))
{
pr_crit("Bug call .BRD_ID returned garbage - giving up\n");
while (1)
;
}
/* Board type is only set by newer versions of vmelilo/tftplilo */
if (vme_brdtype == 0)
vme_brdtype = brdno;
mvme16x_get_model(id);
pr_info("BRD_ID: %s BUG %x.%x %02x/%02x/%02x\n", id, p->rev >> 4,
p->rev & 0xf, p->yr, p->mth, p->day);
if (brdno == 0x0162 || brdno == 0x172)
{
unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
mvme16x_config = rev | MVME16x_CONFIG_GOT_SCCA;
pr_info("MVME%x Hardware status:\n", brdno);
pr_info(" CPU Type 68%s040\n",
rev & MVME16x_CONFIG_GOT_FPU ? "" : "LC");
pr_info(" CPU clock %dMHz\n",
rev & MVME16x_CONFIG_SPEED_32 ? 32 : 25);
pr_info(" VMEchip2 %spresent\n",
rev & MVME16x_CONFIG_NO_VMECHIP2 ? "NOT " : "");
pr_info(" SCSI interface %spresent\n",
rev & MVME16x_CONFIG_NO_SCSICHIP ? "NOT " : "");
pr_info(" Ethernet interface %spresent\n",
rev & MVME16x_CONFIG_NO_ETHERNET ? "NOT " : "");
}
else
{
mvme16x_config = MVME16x_CONFIG_GOT_LP | MVME16x_CONFIG_GOT_CD2401;
}
}
static struct resource m48t59_rsrc[] = {
DEFINE_RES_MEM(MVME_RTC_BASE, 0x2000),
};
static struct m48t59_plat_data m48t59_data = {
.type = M48T59RTC_TYPE_M48T08,
.yy_offset = 70,
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/mm.h`, `linux/seq_file.h`, `linux/tty.h`, `linux/clocksource.h`, `linux/console.h`, `linux/linkage.h`.
- Detected declarations: `function mvme16x_parse_bootinfo`, `function mvme16x_reset`, `function mvme16x_get_model`, `function mvme16x_get_hardware_list`, `function mvme16x_init_IRQ`, `function mvme16x_cons_write`, `function config_mvme16x`, `function mvme16x_platform_init`, `function mvme16x_abort_int`, `function mvme16x_timer_int`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.