Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/stand/boot Remove hp300 specific select cod...
details: https://anonhg.NetBSD.org/src/rev/023a99c5fe6e
branches: trunk
changeset: 783990:023a99c5fe6e
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon Jan 14 12:17:17 2013 +0000
description:
Remove hp300 specific select code and use proper hw address to match device.
diffstat:
sys/arch/luna68k/stand/boot/autoconf.c | 29 ++++++++++++++---------------
sys/arch/luna68k/stand/boot/device.h | 3 +--
2 files changed, 15 insertions(+), 17 deletions(-)
diffs (122 lines):
diff -r f5839253d6e8 -r 023a99c5fe6e sys/arch/luna68k/stand/boot/autoconf.c
--- a/sys/arch/luna68k/stand/boot/autoconf.c Mon Jan 14 12:12:19 2013 +0000
+++ b/sys/arch/luna68k/stand/boot/autoconf.c Mon Jan 14 12:17:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.4 2013/01/14 11:59:18 tsutsui Exp $ */
+/* $NetBSD: autoconf.c,v 1.5 2013/01/14 12:17:17 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -137,14 +137,14 @@
struct hp_ctlr *hc;
struct hp_ctlr *match_c;
uint8_t *oaddr;
- int sc;
+ char *addr;
#ifdef DEBUG
if (acdebug)
printf("find_controller: hw: %s at sc%d (%x), type %x...",
hw->hw_name, hw->hw_sc, (u_int)hw->hw_addr, hw->hw_type);
#endif
- sc = hw->hw_sc;
+ addr = hw->hw_addr;
match_c = NULL;
for (hc = hp_cinit; hc->hp_driver; hc++) {
if (hc->hp_alive)
@@ -158,7 +158,7 @@
/*
* Exact match; all done
*/
- if ((int)hc->hp_addr == sc) {
+ if (hc->hp_addr == addr) {
match_c = hc;
break;
}
@@ -212,7 +212,7 @@
struct hp_device *hd;
struct hp_device *match_d;
uint8_t *oaddr;
- int sc;
+ char *addr;
#ifdef DEBUG
if (acdebug)
@@ -226,11 +226,11 @@
/* Must not be a slave */
if (hd->hp_cdriver)
continue;
- sc = (int) hd->hp_addr;
+ addr = hd->hp_addr;
/*
* Exact match; all done.
*/
- if (sc > 0 && sc == hw->hw_sc) {
+ if (addr != NULL && addr == hw->hw_addr) {
match_d = hd;
break;
}
@@ -238,7 +238,7 @@
* Wildcard; possible match so remember first instance
* but continue looking for exact match.
*/
- if (sc == 0 && same_hw_device(hw, hd) && match_d == NULL)
+ if (addr == NULL && same_hw_device(hw, hd) && match_d == NULL)
match_d = hd;
}
#ifdef DEBUG
@@ -479,9 +479,8 @@
return(found);
}
-#define setup_hw(hw, addr, sc, type, name) \
+#define setup_hw(hw, addr, type, name) \
(hw)->hw_addr = addr; \
- (hw)->hw_sc = sc; \
(hw)->hw_type = type; \
(hw)->hw_name = name
@@ -490,21 +489,21 @@
{
struct hp_hw *hw = sc_table;
- setup_hw(hw, (char *) 0x51000000, 0x5, SIO, "uPD7201A (SIO)");
+ setup_hw(hw, (char *) 0x51000000, SIO, "uPD7201A (SIO)");
hw++;
- setup_hw(hw, (char *) 0x51000004, 0x5, KEYBOARD, "uPD7201A (KBD)");
+ setup_hw(hw, (char *) 0x51000004, KEYBOARD, "uPD7201A (KBD)");
hw++;
- setup_hw(hw, (char *) 0xe1000000, 0xe, SCSI, "MB89352 (SPC)");
+ setup_hw(hw, (char *) 0xe1000000, SCSI, "MB89352 (SPC)");
hw++;
if (machtype == LUNA_II && !badaddr((void *) 0xe1000040)) {
- setup_hw(hw, (char *) 0xe1000040, 0xe, SCSI, "MB89352 (SPC)");
+ setup_hw(hw, (char *) 0xe1000040, SCSI, "MB89352 (SPC)");
hw++;
}
if (!badaddr((void *) 0xf1000000)) {
- setup_hw(hw, (char *) 0xf1000000, 0xf, NET, "Am7990 (LANCE)");
+ setup_hw(hw, (char *) 0xf1000000, NET, "Am7990 (LANCE)");
hw++;
}
}
diff -r f5839253d6e8 -r 023a99c5fe6e sys/arch/luna68k/stand/boot/device.h
--- a/sys/arch/luna68k/stand/boot/device.h Mon Jan 14 12:12:19 2013 +0000
+++ b/sys/arch/luna68k/stand/boot/device.h Mon Jan 14 12:17:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.3 2013/01/14 11:59:18 tsutsui Exp $ */
+/* $NetBSD: device.h,v 1.4 2013/01/14 12:17:17 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -109,7 +109,6 @@
struct hp_hw {
char *hw_addr; /* physical address of registers */
- short hw_sc; /* select code (if applicable) */
short hw_type; /* type (defined below) */
char *hw_name; /* HP product name */
};
Home |
Main Index |
Thread Index |
Old Index