[parisc-linux-cvs] Serial Diva change
Matthew Wilcox
willy@ldl.fc.hp.com
Thu, 14 Feb 2002 17:24:41 -0700 (MST)
Index: drivers/char/serial.c
===================================================================
RCS file: /var/cvs/linux/drivers/char/serial.c,v
retrieving revision 1.31
diff -u -p -r1.31 serial.c
--- drivers/char/serial.c 2002/02/05 19:53:54 1.31
+++ drivers/char/serial.c 2002/02/15 00:21:12
@@ -427,11 +427,7 @@ static _INLINE_ unsigned int serial_in(s
return readb((unsigned long) info->iomem_base +
(offset<<info->iomem_reg_shift));
default:
-#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
return inb(info->port + offset);
-#else
- BUG();
-#endif
}
}
@@ -450,11 +446,7 @@ static _INLINE_ void serial_out(struct a
(offset<<info->iomem_reg_shift));
break;
default:
-#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
outb(value, info->port+offset);
-#else
- BUG();
-#endif
}
}
@@ -3919,6 +3911,14 @@ static _INLINE_ int get_pci_port(struct
}
+ /* And HP's Diva chip puts the 4th/5th serial port further out */
+ if (dev->vendor == PCI_VENDOR_ID_HP &&
+ dev->device == PCI_DEVICE_ID_HP_SAS) {
+ if (idx > 2) {
+ offset = 0x18;
+ }
+ }
+
port = pci_resource_start(dev, base_idx) + offset;
if ((board->flags & SPCI_FL_BASE_TABLE) == 0)