X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fserial%2F8250_gsc.c;h=4eb7437a404a5fa5e4c4d8087d040a55891a2eb8;hb=ad19dbdb4b224deabbf6080e238256ffbc9be485;hp=913c71cc056939b0295a78c1a6f3a644fb9aa2b3;hpb=3e8e7c93d7eb091463839b5212789c4aae09459e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c index 913c71cc056..4eb7437a404 100644 --- a/drivers/serial/8250_gsc.c +++ b/drivers/serial/8250_gsc.c @@ -22,12 +22,10 @@ #include #include #include -#include /* for LASI_BASE_BAUD */ #include "8250.h" -static int __init -serial_init_chip(struct parisc_device *dev) +static int __init serial_init_chip(struct parisc_device *dev) { struct uart_port port; unsigned long address; @@ -39,22 +37,22 @@ serial_init_chip(struct parisc_device *dev) * what we have here is a missing parent device, so tell * the user what they're missing. */ - if (parisc_parent(dev)->id.hw_type != HPHW_IOA) { - printk(KERN_INFO "Serial: device 0x%lx not configured.\n" + if (parisc_parent(dev)->id.hw_type != HPHW_IOA) + printk(KERN_INFO + "Serial: device 0x%lx not configured.\n" "Enable support for Wax, Lasi, Asp or Dino.\n", dev->hpa.start); - } return -ENODEV; } address = dev->hpa.start; - if (dev->id.sversion != 0x8d) { + if (dev->id.sversion != 0x8d) address += 0x800; - } memset(&port, 0, sizeof(port)); port.iotype = UPIO_MEM; - port.uartclk = LASI_BASE_BAUD * 16; + /* 7.272727MHz on Lasi. Assumed the same for Dino, Wax and Timi. */ + port.uartclk = 7272727; port.mapbase = address; port.membase = ioremap_nocache(address, 16); port.irq = dev->irq; @@ -63,10 +61,12 @@ serial_init_chip(struct parisc_device *dev) err = serial8250_register_port(&port); if (err < 0) { - printk(KERN_WARNING "serial8250_register_port returned error %d\n", err); + printk(KERN_WARNING + "serial8250_register_port returned error %d\n", err); + iounmap(port.membase); return err; } - + return 0; }