Created
April 13, 2023 12:15
-
-
Save tsutsui/1f92e2722009949f63585dcc2fd1a70b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: dev/spc.c | |
=================================================================== | |
RCS file: /cvsroot/src/sys/arch/luna68k/dev/spc.c,v | |
retrieving revision 1.10 | |
diff -u -p -d -r1.10 spc.c | |
--- dev/spc.c 22 Jan 2013 15:44:25 -0000 1.10 | |
+++ dev/spc.c 13 Apr 2023 12:13:17 -0000 | |
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: spc.c,v 1.10 | |
#include <machine/bus.h> | |
#include <machine/cpu.h> | |
#include <machine/autoconf.h> | |
+#include <machine/board.h> | |
#include <dev/scsipi/scsi_all.h> | |
#include <dev/scsipi/scsipi_all.h> | |
@@ -66,11 +67,17 @@ spc_mainbus_match(device_t parent, cfdat | |
if (strcmp(ma->ma_name, spc_cd.cd_name)) | |
return 0; | |
-#if 0 | |
- if (badaddr((void *)ma->ma_addr, 4)) | |
+ | |
+ /* | |
+ * LUNA-I doesn't have the secondary SCSI. | |
+ * However we cannot check it by badaddr() at the address range | |
+ * of the secondary SCSI on LUNA-II because the address bus lines | |
+ * are not fully decoded on LUNA-I and the primary SCSI registers | |
+ * are also accessible at the seconadary address range. | |
+ */ | |
+ if (machtype == LUNA_I && ma->ma_addr != SCSI_ADDR) | |
return 0; | |
- /* Experiments proved 2nd SPC address does NOT make a buserror. */ | |
-#endif | |
+ | |
return 1; | |
} | |
Index: luna68k/mainbus.c | |
=================================================================== | |
RCS file: /cvsroot/src/sys/arch/luna68k/luna68k/mainbus.c,v | |
retrieving revision 1.20 | |
diff -u -p -d -r1.20 mainbus.c | |
--- luna68k/mainbus.c 13 Apr 2023 11:44:10 -0000 1.20 | |
+++ luna68k/mainbus.c 13 Apr 2023 12:13:17 -0000 | |
@@ -39,26 +39,17 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v | |
#include <machine/cpu.h> | |
#include <machine/autoconf.h> | |
+#include <machine/board.h> | |
static const struct mainbus_attach_args luna_devs[] = { | |
- { "clock", 0x45000000, -1 }, /* Mostek TimeKeeper */ | |
- { "lcd", 0x4d000000, -1 }, /* Sharp LM16X212 LCD module */ | |
- { "le", 0xf1000000, 3 }, /* Am7990 */ | |
- { "sio", 0x51000000, 6 }, /* uPD7201A */ | |
- { "xpbus", 0x71000000, -1 }, /* HD647180XP */ | |
- { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */ | |
- { "spc", 0xe1000000, 2 }, /* MB89352 */ | |
-}; | |
- | |
-static const struct mainbus_attach_args luna2_devs[] = { | |
- { "clock", 0x45000000, -1 }, /* Dallas TimeKeeper */ | |
- { "lcd", 0x4d000000, -1 }, /* Sharp LM16X212 LCD module */ | |
- { "le", 0xf1000000, 3 }, /* Am7990 */ | |
- { "sio", 0x51000000, 6 }, /* uPD7201A */ | |
- { "xpbus", 0x71000000, -1 }, /* HD647180XP */ | |
+ { "clock", NVRAM_ADDR, -1 }, /* Mostek/Dallas TimeKeeper */ | |
+ { "lcd", OBIO_PIO1A, -1 }, /* Sharp LM16X212 LCD module */ | |
+ { "le", LANCE_ADDR, 3 }, /* Am7990 */ | |
+ { "sio", OBIO_SIO, 6 }, /* uPD7201A */ | |
+ { "xpbus", TRI_PORT_RAM, -1 }, /* HD647180XP */ | |
{ "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */ | |
- { "spc", 0xe1000000, 2 }, /* internal MB89352 */ | |
- { "spc", 0xe1000040, 2 }, /* external MB89352 */ | |
+ { "spc", SCSI_ADDR, 2 }, /* internal MB89352 */ | |
+ { "spc", SCSI_2_ADDR, 2 }, /* external MB89352 (on LUNA-II) */ | |
}; | |
static void mainbus_attach(device_t, device_t, void *); | |
@@ -87,13 +78,9 @@ mainbus_attach(device_t parent, device_t | |
const struct mainbus_attach_args *devs; | |
struct mainbus_attach_args ma; | |
- if (machtype == LUNA_II) { | |
- devs = luna2_devs; | |
- ndevs = __arraycount(luna2_devs); | |
- } else { | |
- devs = luna_devs; | |
- ndevs = __arraycount(luna_devs); | |
- } | |
+ devs = luna_devs; | |
+ ndevs = __arraycount(luna_devs); | |
+ | |
aprint_normal("\n"); | |
for (i = 0; i < ndevs; i++) { | |
ma = devs[i]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment