arch/m68k/mvme147/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/mvme147/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/mvme147/config.c- Extension
.c- Size
- 4741 bytes
- Lines
- 211
- 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.
- 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/tty.hlinux/clocksource.hlinux/console.hlinux/linkage.hlinux/init.hlinux/major.hlinux/interrupt.hlinux/platform_device.hlinux/rtc/m48t59.hasm/bootinfo.hasm/bootinfo-vme.hasm/byteorder.hasm/setup.hasm/irq.hasm/traps.hasm/machdep.hasm/mvme147hw.hasm/config.hmvme147.h
Detected Declarations
function mvme147_parse_bootinfofunction mvme147_resetfunction mvme147_get_modelfunction mvme147_init_IRQfunction config_mvme147function mvme147_platform_initfunction mvme147_timer_intfunction mvme147_sched_initfunction mvme147_read_clkfunction scc_delayfunction scc_writefunction mvme147_scc_write
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* arch/m68k/mvme147/config.c
*
* Copyright (C) 1996 Dave Frascone [chaos@mindspring.com]
* Cloned from Richard Hirst [richard@sleepie.demon.co.uk]
*
* Based on:
*
* Copyright (C) 1993 Hamish Macdonald
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/tty.h>
#include <linux/clocksource.h>
#include <linux/console.h>
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/major.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/rtc/m48t59.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-vme.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/mvme147hw.h>
#include <asm/config.h>
#include "mvme147.h"
static void mvme147_get_model(char *model);
static void __init mvme147_sched_init(void);
extern void mvme147_reset (void);
int __init mvme147_parse_bootinfo(const struct bi_record *bi)
{
uint16_t tag = be16_to_cpu(bi->tag);
if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)
return 0;
else
return 1;
}
void mvme147_reset(void)
{
pr_info("\r\n\nCalled mvme147_reset\r\n");
m147_pcc->watchdog = 0x0a; /* Clear timer */
m147_pcc->watchdog = 0xa5; /* Enable watchdog - 100ms to reset */
while (1)
;
}
static void mvme147_get_model(char *model)
{
sprintf(model, "Motorola MVME147");
}
/*
* This function is called during kernel startup to initialize
* the mvme147 IRQ handling routines.
*/
static void __init mvme147_init_IRQ(void)
{
m68k_setup_user_interrupt(VEC_USER, 192);
}
void __init config_mvme147(void)
{
mach_sched_init = mvme147_sched_init;
mach_init_IRQ = mvme147_init_IRQ;
mach_reset = mvme147_reset;
mach_get_model = mvme147_get_model;
/* Board type is only set by newer versions of vmelilo/tftplilo */
if (!vme_brdtype)
vme_brdtype = VME_TYPE_MVME147;
}
static struct resource m48t59_rsrc[] = {
DEFINE_RES_MEM(MVME147_RTC_BASE, 0x800),
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/mm.h`, `linux/tty.h`, `linux/clocksource.h`, `linux/console.h`, `linux/linkage.h`, `linux/init.h`.
- Detected declarations: `function mvme147_parse_bootinfo`, `function mvme147_reset`, `function mvme147_get_model`, `function mvme147_init_IRQ`, `function config_mvme147`, `function mvme147_platform_init`, `function mvme147_timer_int`, `function mvme147_sched_init`, `function mvme147_read_clk`, `function scc_delay`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: source 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.