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.

Dependency Surface

Detected Declarations

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

Implementation Notes