From 46f6e4b1643f5ce8a8799d86b3481ed2c78c687a Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Wed, 30 Jan 2002 21:24:35 +0000 Subject: [PATCH] fixed some silly bugs. --- src/arch/i386/lib/hardwaremain.c | 2 +- src/lib/newpci.c | 6 ++++-- src/superio/winbond/w83877tf/superio.c | 6 ++++-- src/superio/winbond/w83977ef/superio.c | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/arch/i386/lib/hardwaremain.c b/src/arch/i386/lib/hardwaremain.c index 828430443b..b62a90d737 100644 --- a/src/arch/i386/lib/hardwaremain.c +++ b/src/arch/i386/lib/hardwaremain.c @@ -205,7 +205,7 @@ void hardwaremain(int boot_complete) * for now -- rgm. */ #ifdef USE_NEW_SUPERIO_INTERFACE - extern struct superio all_superio[]; + extern struct superio *all_superio[]; extern int nsuperio; extern void handle_superio(int pass, struct superio *s, int nsuperio); #endif diff --git a/src/lib/newpci.c b/src/lib/newpci.c index 581f864f87..b7f968a637 100644 --- a/src/lib/newpci.c +++ b/src/lib/newpci.c @@ -835,12 +835,14 @@ void pci_zero_irq_settings(void) } void -handle_superio(int pass, struct superio *s, int nsuperio) +handle_superio(int pass, struct superio *all_superio[], int nsuperio) { int i; + struct superio *s; printk_debug("handle_superio start, s %p nsuperio %d s->super %p\n", s, nsuperio, s->super); - for(i = 0; i < nsuperio; i++, s++){ + for(i = 0; i < nsuperio; i++){ + s = all_superio[i]; printk_debug(__FUNCTION__ " Pass %d, check #%d, s %p s->super %p\n", pass, i, s, s->super); if (!s->super) { diff --git a/src/superio/winbond/w83877tf/superio.c b/src/superio/winbond/w83877tf/superio.c index 0311c284ab..14ce6025ea 100644 --- a/src/superio/winbond/w83877tf/superio.c +++ b/src/superio/winbond/w83877tf/superio.c @@ -107,13 +107,15 @@ static void setup_com(struct superio *sio, { // set baud, default to 115200 if not set. int divisor = 115200/(com->baud ? com->baud : 1); - printk_debug("Enabling com device: %02x\n", device); - printk_debug(" iobase = 0x%04x irq=%d\n", com->base, com->irq); + printk_debug("%s com device: %02x\n", + com->enable? "Enabling" : "Disabling", device); /* Select the device */ set_logical_device(sio, device); /* Disable it while it is initialized */ set_enable(sio, 0); if (com->enable) { + printk_debug(" iobase = 0x%04x irq=%d\n", + com->base, com->irq); set_iobase0(sio, com->base); set_irq0(sio, com->irq); /* We are initialized so enable the device */ diff --git a/src/superio/winbond/w83977ef/superio.c b/src/superio/winbond/w83977ef/superio.c index 7c64be72de..46f76c1b4f 100644 --- a/src/superio/winbond/w83977ef/superio.c +++ b/src/superio/winbond/w83977ef/superio.c @@ -135,13 +135,15 @@ static void setup_com(struct superio *sio, { // set baud, default to 115200 if not set. int divisor = 115200/(com->baud ? com->baud : 1); - printk_debug("Enabling com device: %02x\n", device); - printk_debug(" iobase = 0x%04x irq=%d\n", com->base, com->irq); + printk_debug("%s com device: %02x\n", + com->enable? "Enabling" : "Disabling", device); /* Select the device */ set_logical_device(sio, device); /* Disable it while it is initialized */ set_enable(sio, 0); if (com->enable) { + printk_debug(" iobase = 0x%04x irq=%d\n", + com->base, com->irq); set_iobase0(sio, com->base); set_irq0(sio, com->irq); /* We are initialized so enable the device */