diff options
author | Paul Mackerras <paulus@samba.org> | 2007-02-06 22:05:13 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-06 22:05:13 -0500 |
commit | 8423200553113cc031caa9b147f6150a8e26545c (patch) | |
tree | 752c93a200c9ba056c7469c96f7e27d02c99291d /drivers/serial | |
parent | f03e64f2ca6ee3d0b7824536b1940497701fe766 (diff) | |
parent | 62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/amba-pl010.c | 2 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 2 | ||||
-rw-r--r-- | drivers/serial/atmel_serial.c | 7 | ||||
-rw-r--r-- | drivers/serial/atmel_serial.h | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 61db6973755a..f69bd097166e 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options) | |||
589 | */ | 589 | */ |
590 | if (co->index >= UART_NR) | 590 | if (co->index >= UART_NR) |
591 | co->index = 0; | 591 | co->index = 0; |
592 | if (!amba_ports[co->index]) | ||
593 | return -ENODEV; | ||
592 | port = &amba_ports[co->index]->port; | 594 | port = &amba_ports[co->index]->port; |
593 | 595 | ||
594 | if (options) | 596 | if (options) |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 9a3b374b2a08..44639e71372a 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options) | |||
661 | if (co->index >= UART_NR) | 661 | if (co->index >= UART_NR) |
662 | co->index = 0; | 662 | co->index = 0; |
663 | uap = amba_ports[co->index]; | 663 | uap = amba_ports[co->index]; |
664 | if (!uap) | ||
665 | return -ENODEV; | ||
664 | 666 | ||
665 | uap->port.uartclk = clk_get_rate(uap->clk); | 667 | uap->port.uartclk = clk_get_rate(uap->clk); |
666 | 668 | ||
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index ed7f7209ea59..881f886b91c6 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -689,9 +689,9 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct | |||
689 | struct atmel_uart_data *data = pdev->dev.platform_data; | 689 | struct atmel_uart_data *data = pdev->dev.platform_data; |
690 | 690 | ||
691 | port->iotype = UPIO_MEM; | 691 | port->iotype = UPIO_MEM; |
692 | port->flags = UPF_BOOT_AUTOCONF; | 692 | port->flags = UPF_BOOT_AUTOCONF; |
693 | port->ops = &atmel_pops; | 693 | port->ops = &atmel_pops; |
694 | port->fifosize = 1; | 694 | port->fifosize = 1; |
695 | port->line = pdev->id; | 695 | port->line = pdev->id; |
696 | port->dev = &pdev->dev; | 696 | port->dev = &pdev->dev; |
697 | 697 | ||
@@ -890,7 +890,6 @@ static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state | |||
890 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) | 890 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) |
891 | enable_irq_wake(port->irq); | 891 | enable_irq_wake(port->irq); |
892 | else { | 892 | else { |
893 | disable_irq_wake(port->irq); | ||
894 | uart_suspend_port(&atmel_uart, port); | 893 | uart_suspend_port(&atmel_uart, port); |
895 | atmel_port->suspended = 1; | 894 | atmel_port->suspended = 1; |
896 | } | 895 | } |
@@ -907,6 +906,8 @@ static int atmel_serial_resume(struct platform_device *pdev) | |||
907 | uart_resume_port(&atmel_uart, port); | 906 | uart_resume_port(&atmel_uart, port); |
908 | atmel_port->suspended = 0; | 907 | atmel_port->suspended = 0; |
909 | } | 908 | } |
909 | else | ||
910 | disable_irq_wake(port->irq); | ||
910 | 911 | ||
911 | return 0; | 912 | return 0; |
912 | } | 913 | } |
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h index fe1763b2a6d5..11b44360e108 100644 --- a/drivers/serial/atmel_serial.h +++ b/drivers/serial/atmel_serial.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ | 106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ |
107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ | 107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ |
108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ | 108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ |
109 | #define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [SAM9 only] */ | 109 | #define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [AT91SAM9261 only] */ |
110 | 110 | ||
111 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ | 111 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ |
112 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ | 112 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ |