[parisc-linux-cvs] Cujo support & Serial cleanups
Matthew Wilcox
willy@ldl.fc.hp.com
Thu, 16 Aug 2001 22:40:10 -0600
Adding cujo is straightforward -- might be the first time some of this
code got tested, but it all seems to work. Amusingly, we found this
while trying to fix a completely different bug.
The first few bits of serial.c are just code cleanup. The last hunk
removes a lot of special cases _which were already covered_ by the
last case. I love simplifying code...
Index: drivers/gsc/dino.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/dino.c,v
retrieving revision 1.34
diff -u -p -r1.34 dino.c
--- dino.c 2001/08/14 16:54:54 1.34
+++ dino.c 2001/08/17 04:28:45
@@ -941,6 +941,7 @@ static struct parisc_device_id dino_tbl[
{ HPHW_A_DMA, 0, 0x004, 0x0009D }, /* A180 card-mode Dino. Ver 3.x */
{ HPHW_A_DMA, 0, 0x444, 0x08080 }, /* Same card in a 715. Bug? */
{ HPHW_BRIDGE, HVERSION_REV_ANY_ID, 0x680, 0xa }, /* Bridge-mode Dino */
+ { HPHW_BRIDGE, HVERSION_REV_ANY_ID, 0x682, 0xa }, /* Bridge-mode Cujo */
{ HPHW_BRIDGE, 0x03, 0x05d, 0xa }, /* Dino in a J2240 */
{ 0, }
};
Index: drivers/gsc/serial.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/serial.c,v
retrieving revision 1.17
diff -u -p -r1.17 serial.c
--- serial.c 2001/08/14 16:54:54 1.17
+++ serial.c 2001/08/17 04:28:45
@@ -41,18 +41,18 @@ static int __init
serial_init_chip(struct parisc_device *dev)
{
struct serial_struct *serial;
- int retval, irq;
+ int irq;
- irq = busdevice_alloc_irq(dev);
+ irq = busdevice_alloc_irq(dev);
if (!irq) {
#ifndef CONFIG_GSC_WAX
- if (serial_line_nr == 1)
- printk(KERN_INFO "This kernel was compiled without WAX support, but apparently you will need to\n"
+ if (serial_line_nr == 1) {
+ printk(KERN_INFO "This kernel was compiled without WAX support, but apparently you will need to\n"
"enable WAX support in order to use the 2nd serial port (ttyS1) on this machine.\n");
- else
+ } else
#endif
- printk(KERN_WARNING "IRQ not found for serial device at 0x%lx\n", dev->hpa);
- return -ENODEV;
+ printk(KERN_WARNING "IRQ not found for serial device at 0x%lx\n", dev->hpa);
+ return -ENODEV;
}
serial = kmalloc(sizeof(*serial), GFP_KERNEL);
@@ -76,8 +76,7 @@ serial_init_chip(struct parisc_device *d
serial->custom_divisor = 0;
serial->baud_base = LASI_BASE_BAUD;
- retval = register_serial(serial);
- if (retval < 0) {
+ if (register_serial(serial) < 0) {
printk(KERN_WARNING "%s:%s: register_serial ret'd %d\n",
__FILE__, __FUNCTION__, retval);
kfree(serial);
@@ -88,27 +87,9 @@ serial_init_chip(struct parisc_device *d
return 0;
}
-static struct parisc_device_id serial_tbl[] = {
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x006, 0x0008C }, /* C1xx/C1xxL */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x019, 0x0008C }, /* B180L+ */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x022, 0x0008C }, /* B132L+ */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03B, 0x0008C }, /* C1xx/C1xxL */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03C, 0x0008C }, /* B132L */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03D, 0x0008C }, /* B160L */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03E, 0x0008C }, /* B132L+ */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03F, 0x0008C }, /* B180L+ */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x040, 0x0008C }, /* B132L */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x041, 0x0008C }, /* B160L */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x046, 0x0008C }, /* Rocky2 120 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x047, 0x0008C }, /* Rocky2 150 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x048, 0x0008C }, /* Rocky2 120 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x049, 0x0008C }, /* Rocky2 150 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x04E, 0x0008C }, /* Kiji L2 132 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x04F, 0x0008C }, /* Kiji L2 132 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x056, 0x0008C }, /* Raven+ */
- { HPHW_FIO, HVERSION_REV_ANY_ID, 0x05F, 0x00081 }, /* A-class 180 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c },/* 715/64 */
- { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 },/* 715/33 */
+static struct parisc_device_id serial_tbl[] = {
+ { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c },
+ { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 },
{ 0 }
};