aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-12-20 10:40:51 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-12-20 10:40:51 -0500
commit8bcee1832d23869c2cdb6886ae5210b0143256f0 (patch)
tree9fac190248ed9ed10fe4e6f7b1b4cda8eaef7ddd /drivers/serial
parent5ce2a2ddb5d75d5e2371e58011fc21351bf278cb (diff)
parent1cf215a5b43950d1a304373037828158057ff9fc (diff)
Merge branch 'rmobile/urgent' into rmobile-latest
Conflicts: arch/arm/mach-shmobile/include/mach/entry-macro.S Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c2
-rw-r--r--drivers/serial/kgdboc.c3
-rw-r--r--drivers/serial/mfd.c24
3 files changed, 11 insertions, 18 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 4d8e14b7aa93..09a550860dcf 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2872,7 +2872,7 @@ static struct console serial8250_console = {
2872 .device = uart_console_device, 2872 .device = uart_console_device,
2873 .setup = serial8250_console_setup, 2873 .setup = serial8250_console_setup,
2874 .early_setup = serial8250_console_early_setup, 2874 .early_setup = serial8250_console_early_setup,
2875 .flags = CON_PRINTBUFFER, 2875 .flags = CON_PRINTBUFFER | CON_ANYTIME,
2876 .index = -1, 2876 .index = -1,
2877 .data = &serial8250_reg, 2877 .data = &serial8250_reg,
2878}; 2878};
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index 3374618300af..25a8bc565f40 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -90,7 +90,8 @@ static DECLARE_WORK(kgdboc_restore_input_work, kgdboc_restore_input_helper);
90 90
91static void kgdboc_restore_input(void) 91static void kgdboc_restore_input(void)
92{ 92{
93 schedule_work(&kgdboc_restore_input_work); 93 if (likely(system_state == SYSTEM_RUNNING))
94 schedule_work(&kgdboc_restore_input_work);
94} 95}
95 96
96static int kgdboc_register_kbd(char **cptr) 97static int kgdboc_register_kbd(char **cptr)
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c
index 5fc699e929dc..d40010a22ecd 100644
--- a/drivers/serial/mfd.c
+++ b/drivers/serial/mfd.c
@@ -900,8 +900,7 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios,
900 unsigned char cval, fcr = 0; 900 unsigned char cval, fcr = 0;
901 unsigned long flags; 901 unsigned long flags;
902 unsigned int baud, quot; 902 unsigned int baud, quot;
903 u32 mul = 0x3600; 903 u32 ps, mul;
904 u32 ps = 0x10;
905 904
906 switch (termios->c_cflag & CSIZE) { 905 switch (termios->c_cflag & CSIZE) {
907 case CS5: 906 case CS5:
@@ -943,31 +942,24 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios,
943 baud = uart_get_baud_rate(port, termios, old, 0, 4000000); 942 baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
944 943
945 quot = 1; 944 quot = 1;
945 ps = 0x10;
946 mul = 0x3600;
946 switch (baud) { 947 switch (baud) {
947 case 3500000: 948 case 3500000:
948 mul = 0x3345; 949 mul = 0x3345;
949 ps = 0xC; 950 ps = 0xC;
950 break; 951 break;
951 case 3000000:
952 mul = 0x2EE0;
953 break;
954 case 2500000:
955 mul = 0x2710;
956 break;
957 case 2000000:
958 mul = 0x1F40;
959 break;
960 case 1843200: 952 case 1843200:
961 mul = 0x2400; 953 mul = 0x2400;
962 break; 954 break;
955 case 3000000:
956 case 2500000:
957 case 2000000:
963 case 1500000: 958 case 1500000:
964 mul = 0x1770;
965 break;
966 case 1000000: 959 case 1000000:
967 mul = 0xFA0;
968 break;
969 case 500000: 960 case 500000:
970 mul = 0x7D0; 961 /* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */
962 mul = baud / 500000 * 0x9C4;
971 break; 963 break;
972 default: 964 default:
973 /* Use uart_get_divisor to get quot for other baud rates */ 965 /* Use uart_get_divisor to get quot for other baud rates */