arch/m68k/hp300/config.c
Source file repositories/reference/linux-study-clean/arch/m68k/hp300/config.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/hp300/config.c- Extension
.c- Size
- 6475 bytes
- Lines
- 266
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/init.hlinux/serial_8250.hlinux/string.hlinux/kernel.hlinux/console.hlinux/rtc.hasm/bootinfo.hasm/bootinfo-hp300.hasm/byteorder.hasm/machdep.hasm/blinken.hasm/io.hasm/hp300hw.hasm/config.htime.h
Detected Declarations
function hp300_parse_bootinfofunction hp300_pulsefunction hp300_get_modelfunction hp300_rtc_readfunction hp300_rtc_writefunction hp300_hwclkfunction hp300_init_IRQexport hp300_ledstate
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* linux/arch/m68k/hp300/config.c
*
* Copyright (C) 1998 Philip Blundell <philb@gnu.org>
*
* This file contains the HP300-specific initialisation code. It gets
* called by setup.c.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serial_8250.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/rtc.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-hp300.h>
#include <asm/byteorder.h>
#include <asm/machdep.h>
#include <asm/blinken.h>
#include <asm/io.h> /* readb() and writeb() */
#include <asm/hp300hw.h>
#include <asm/config.h>
#include "time.h"
unsigned long hp300_model;
unsigned long hp300_uart_scode = -1;
unsigned char hp300_ledstate;
EXPORT_SYMBOL(hp300_ledstate);
static char s_hp330[] __initdata = "330";
static char s_hp340[] __initdata = "340";
static char s_hp345[] __initdata = "345";
static char s_hp360[] __initdata = "360";
static char s_hp370[] __initdata = "370";
static char s_hp375[] __initdata = "375";
static char s_hp380[] __initdata = "380";
static char s_hp385[] __initdata = "385";
static char s_hp400[] __initdata = "400";
static char s_hp425t[] __initdata = "425t";
static char s_hp425s[] __initdata = "425s";
static char s_hp425e[] __initdata = "425e";
static char s_hp433t[] __initdata = "433t";
static char s_hp433s[] __initdata = "433s";
static char *hp300_models[] __initdata = {
[HP_320] = NULL,
[HP_330] = s_hp330,
[HP_340] = s_hp340,
[HP_345] = s_hp345,
[HP_350] = NULL,
[HP_360] = s_hp360,
[HP_370] = s_hp370,
[HP_375] = s_hp375,
[HP_380] = s_hp380,
[HP_385] = s_hp385,
[HP_400] = s_hp400,
[HP_425T] = s_hp425t,
[HP_425S] = s_hp425s,
[HP_425E] = s_hp425e,
[HP_433T] = s_hp433t,
[HP_433S] = s_hp433s,
};
static char hp300_model_name[13] = "HP9000/";
extern void hp300_reset(void);
int __init hp300_parse_bootinfo(const struct bi_record *record)
{
int unknown = 0;
const void *data = record->data;
switch (be16_to_cpu(record->tag)) {
case BI_HP300_MODEL:
hp300_model = be32_to_cpup(data);
break;
case BI_HP300_UART_SCODE:
hp300_uart_scode = be32_to_cpup(data);
break;
case BI_HP300_UART_ADDR:
/* serial port address: ignored here */
break;
default:
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/serial_8250.h`, `linux/string.h`, `linux/kernel.h`, `linux/console.h`, `linux/rtc.h`, `asm/bootinfo.h`.
- Detected declarations: `function hp300_parse_bootinfo`, `function hp300_pulse`, `function hp300_get_model`, `function hp300_rtc_read`, `function hp300_rtc_write`, `function hp300_hwclk`, `function hp300_init_IRQ`, `export hp300_ledstate`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: integration 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.