diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
commit | 59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch) | |
tree | f1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /drivers/serial | |
parent | 825f9075d74028d11d7f5932f04e1b5db3022b51 (diff) | |
parent | d834c16516d1ebec4766fc58c059bf01311e6045 (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250_acorn.c | 9 | ||||
-rw-r--r-- | drivers/serial/8250_gsc.c | 1 | ||||
-rw-r--r-- | drivers/serial/Kconfig | 2 | ||||
-rw-r--r-- | drivers/serial/at91_serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/ioc4_serial.c | 3 | ||||
-rw-r--r-- | drivers/serial/ip22zilog.c | 16 | ||||
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 11 | ||||
-rw-r--r-- | drivers/serial/mpsc.c | 12 | ||||
-rw-r--r-- | drivers/serial/mux.c | 2 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 3 | ||||
-rw-r--r-- | drivers/serial/sunzilog.c | 2 |
11 files changed, 54 insertions, 9 deletions
diff --git a/drivers/serial/8250_acorn.c b/drivers/serial/8250_acorn.c index 32af3650e8b..ef8cc8a70c6 100644 --- a/drivers/serial/8250_acorn.c +++ b/drivers/serial/8250_acorn.c @@ -35,6 +35,7 @@ struct serial_card_type { struct serial_card_info { unsigned int num_ports; int ports[MAX_PORTS]; + void __iomem *vaddr; }; static int __devinit @@ -44,7 +45,6 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id) struct serial_card_type *type = id->data; struct uart_port port; unsigned long bus_addr; - unsigned char __iomem *virt_addr; unsigned int i; info = kmalloc(sizeof(struct serial_card_info), GFP_KERNEL); @@ -55,8 +55,8 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id) info->num_ports = type->num_ports; bus_addr = ecard_resource_start(ec, type->type); - virt_addr = ioremap(bus_addr, ecard_resource_len(ec, type->type)); - if (!virt_addr) { + info->vaddr = ioremap(bus_addr, ecard_resource_len(ec, type->type)); + if (!info->vaddr) { kfree(info); return -ENOMEM; } @@ -72,7 +72,7 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id) port.dev = &ec->dev; for (i = 0; i < info->num_ports; i ++) { - port.membase = virt_addr + type->offset[i]; + port.membase = info->vaddr + type->offset[i]; port.mapbase = bus_addr + type->offset[i]; info->ports[i] = serial8250_register_port(&port); @@ -92,6 +92,7 @@ static void __devexit serial_card_remove(struct expansion_card *ec) if (info->ports[i] > 0) serial8250_unregister_port(info->ports[i]); + iounmap(info->vaddr); kfree(info); } diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c index 913c71cc056..1ebe6b585d2 100644 --- a/drivers/serial/8250_gsc.c +++ b/drivers/serial/8250_gsc.c @@ -64,6 +64,7 @@ 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); + iounmap(port.membase); return err; } diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 261eaa44295..d926272a40d 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -295,7 +295,7 @@ config SERIAL_AMBA_PL011_CONSOLE Even if you say Y here, the currently visible framebuffer console (/dev/tty0) will still be used as the system console by default, but you can alter that using a kernel command line option such as - "console=ttyAM0". (Try "man bootparam" or see the documentation of + "console=ttyAMA0". (Try "man bootparam" or see the documentation of your boot loader (lilo or loadlin) about how to pass options to the kernel at boot time.) diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c index 54c6b2adf7b..bf4bf103e5a 100644 --- a/drivers/serial/at91_serial.c +++ b/drivers/serial/at91_serial.c @@ -139,7 +139,7 @@ static void at91_set_mctrl(struct uart_port *port, u_int mctrl) * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. * We need to drive the pin manually. */ - if (port->mapbase == AT91_BASE_US0) { + if (port->mapbase == AT91RM9200_BASE_US0) { if (mctrl & TIOCM_RTS) at91_set_gpio_value(AT91_PIN_PA21, 0); else diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 576ca1eaa2b..5ec4716c99b 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c @@ -2685,6 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd) if (soft) { free_irq(control->ic_irq, soft); if (soft->is_ioc4_serial_addr) { + iounmap(soft->is_ioc4_serial_addr); release_region((unsigned long) soft->is_ioc4_serial_addr, sizeof(struct ioc4_serial)); @@ -2887,6 +2888,8 @@ out4: out3: kfree(control); out2: + if (serial) + iounmap(serial); release_region(tmp_addr1, sizeof(struct ioc4_serial)); out1: diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 5ff269fb604..dbf13c03a1b 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c @@ -1229,13 +1229,27 @@ static int __init ip22zilog_init(void) static void __exit ip22zilog_exit(void) { int i; + struct uart_ip22zilog_port *up; for (i = 0; i < NUM_CHANNELS; i++) { - struct uart_ip22zilog_port *up = &ip22zilog_port_table[i]; + up = &ip22zilog_port_table[i]; uart_remove_one_port(&ip22zilog_reg, &up->port); } + /* Free IO mem */ + up = &ip22zilog_port_table[0]; + for (i = 0; i < NUM_IP22ZILOG; i++) { + if (up[(i * 2) + 0].port.mapbase) { + iounmap((void*)up[(i * 2) + 0].port.mapbase); + up[(i * 2) + 0].port.mapbase = 0; + } + if (up[(i * 2) + 1].port.mapbase) { + iounmap((void*)up[(i * 2) + 1].port.mapbase); + up[(i * 2) + 1].port.mapbase = 0; + } + } + uart_unregister_driver(&ip22zilog_reg); } diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 7708e5dd365..dbad0e31e00 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -338,14 +338,23 @@ mpc52xx_uart_release_port(struct uart_port *port) static int mpc52xx_uart_request_port(struct uart_port *port) { + int err; + if (port->flags & UPF_IOREMAP) /* Need to remap ? */ port->membase = ioremap(port->mapbase, MPC52xx_PSC_SIZE); if (!port->membase) return -EINVAL; - return request_mem_region(port->mapbase, MPC52xx_PSC_SIZE, + err = request_mem_region(port->mapbase, MPC52xx_PSC_SIZE, "mpc52xx_psc_uart") != NULL ? 0 : -EBUSY; + + if (err && (port->flags & UPF_IOREMAP)) { + iounmap(port->membase); + port->membase = NULL; + } + + return err; } static void diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index 63d2a66e563..704243c9f78 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c @@ -1893,6 +1893,10 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd) } else { mpsc_resource_err("SDMA base"); + if (pi->mpsc_base) { + iounmap(pi->mpsc_base); + pi->mpsc_base = NULL; + } return -ENOMEM; } @@ -1905,6 +1909,14 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd) } else { mpsc_resource_err("BRG base"); + if (pi->mpsc_base) { + iounmap(pi->mpsc_base); + pi->mpsc_base = NULL; + } + if (pi->sdma_base) { + iounmap(pi->sdma_base); + pi->sdma_base = NULL; + } return -ENOMEM; } diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 4a1c9983f38..aa819d3f8ee 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c @@ -521,6 +521,8 @@ static void __exit mux_exit(void) for (i = 0; i < port_cnt; i++) { uart_remove_one_port(&mux_driver, &mux_ports[i]); + if (mux_ports[i].membase) + iounmap(mux_ports[i].membase); } uart_unregister_driver(&mux_driver); diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index d3a5aeee73a..9b3b9aaa6b9 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1499,6 +1499,9 @@ static int __devexit su_remove(struct of_device *dev) uart_remove_one_port(&sunsu_reg, &up->port); } + if (up->port.membase) + of_iounmap(up->port.membase, up->reg_size); + dev_set_drvdata(&dev->dev, NULL); return 0; diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index d34f336d53d..0da3ebfff82 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c @@ -1270,7 +1270,7 @@ static void __init sunzilog_register_serio(struct uart_sunzilog_port *up) } #endif -static void __init sunzilog_init_hw(struct uart_sunzilog_port *up) +static void __devinit sunzilog_init_hw(struct uart_sunzilog_port *up) { struct zilog_channel __iomem *channel; unsigned long flags; |