From 6639ab4db505566bd2f18325bf822bbe5c141bd6 Mon Sep 17 00:00:00 2001 From: Kenji Aoyama Date: Tue, 10 Aug 2004 17:07:21 +0000 Subject: The second spc is missing on original LUNA-88K, so add and check the machine type field in the internal device lists. ok miod@ --- sys/arch/luna88k/include/autoconf.h | 3 ++- sys/arch/luna88k/include/board.h | 6 +++--- sys/arch/luna88k/luna88k/mainbus.c | 21 ++++++++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) (limited to 'sys') diff --git a/sys/arch/luna88k/include/autoconf.h b/sys/arch/luna88k/include/autoconf.h index ee8fde1fd50..1050fce29be 100644 --- a/sys/arch/luna88k/include/autoconf.h +++ b/sys/arch/luna88k/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.2 2004/07/23 15:31:34 miod Exp $ */ +/* $OpenBSD: autoconf.h,v 1.3 2004/08/10 17:07:20 aoyama Exp $ */ /* * Copyright (c) 1999, Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -73,5 +73,6 @@ struct mainbus_attach_args { const char *ma_name; paddr_t ma_addr; int ma_ilvl; + int ma_machine; }; #endif diff --git a/sys/arch/luna88k/include/board.h b/sys/arch/luna88k/include/board.h index 87c502b95d2..7659f931850 100644 --- a/sys/arch/luna88k/include/board.h +++ b/sys/arch/luna88k/include/board.h @@ -1,4 +1,4 @@ -/* $OpenBSD: board.h,v 1.4 2004/08/02 08:33:29 miod Exp $ */ +/* $OpenBSD: board.h,v 1.5 2004/08/10 17:07:20 aoyama Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -47,8 +47,8 @@ #define UDEFINED /* machtype values */ -#define LUNA_88K 1 -#define LUNA_88K2 2 +#define LUNA_88K 0x1 +#define LUNA_88K2 0x2 #define SYSV_BASE U(0x00000000) /* system virtual base */ #define VEQR_ADDR U(0x00000000) diff --git a/sys/arch/luna88k/luna88k/mainbus.c b/sys/arch/luna88k/luna88k/mainbus.c index 23b3a699e6b..0b8c0eb8f6d 100644 --- a/sys/arch/luna88k/luna88k/mainbus.c +++ b/sys/arch/luna88k/luna88k/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.2 2004/08/06 14:22:43 aoyama Exp $ */ +/* $OpenBSD: mainbus.c,v 1.3 2004/08/10 17:07:20 aoyama Exp $ */ /* $NetBSD: mainbus.c,v 1.2 2000/01/07 05:13:08 nisimura Exp $ */ /*- @@ -42,18 +42,19 @@ #include #include +#include #include #include static const struct mainbus_attach_args devs[] = { - { "clock", 0x45000000, -1 }, /* Mostek/Dallas TimeKeeper */ - { "le", 0xf1000000, 4 }, /* Am7990 */ - { "sio", 0x51000000, 5 }, /* uPD7201A */ - { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */ - { "spc", 0xe1000000, 3 }, /* MB89352 */ - { "spc", 0xe1000040, 3 }, /* ditto */ + { "clock", 0x45000000, -1, LUNA_88K|LUNA_88K2 }, /* Mostek/Dallas TimeKeeper */ + { "le", 0xf1000000, 4, LUNA_88K|LUNA_88K2 }, /* Am7990 */ + { "sio", 0x51000000, 5, LUNA_88K|LUNA_88K2 }, /* uPD7201A */ + { "fb", 0xc1100000, -1, LUNA_88K|LUNA_88K2 }, /* BrookTree RAMDAC */ + { "spc", 0xe1000000, 3, LUNA_88K|LUNA_88K2 }, /* MB89352 */ + { "spc", 0xe1000040, 3, LUNA_88K2 }, /* ditto, LUNA-88K2 only */ #if NPCM > 0 - { "pcm", 0x91000000, 4 }, /* NEC-9801-86 Sound board (under testing) */ + { "pcm", 0x91000000, 4, LUNA_88K|LUNA_88K2 }, /* NEC-9801-86 Sound board (under testing) */ #endif }; @@ -88,6 +89,7 @@ mainbus_attach(parent, self, args) void *args; { int i; + extern int machtype; extern char cpu_model[]; printf(": %s\n", cpu_model); @@ -98,7 +100,8 @@ mainbus_attach(parent, self, args) cpu_configuration_print(1); for (i = 0; i < sizeof(devs)/sizeof(devs[0]); i++) - config_found(self, (void *)&devs[i], mainbus_print); + if (devs[i].ma_machine & machtype) + config_found(self, (void *)&devs[i], mainbus_print); } int -- cgit v1.2.3