diff options
Diffstat (limited to 'drivers/serial/mfd.c')
-rw-r--r-- | drivers/serial/mfd.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index 5dff45c76d32..f083f7c90c29 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c | |||
@@ -892,8 +892,7 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios, | |||
892 | unsigned char cval, fcr = 0; | 892 | unsigned char cval, fcr = 0; |
893 | unsigned long flags; | 893 | unsigned long flags; |
894 | unsigned int baud, quot; | 894 | unsigned int baud, quot; |
895 | u32 mul = 0x3600; | 895 | u32 ps, mul; |
896 | u32 ps = 0x10; | ||
897 | 896 | ||
898 | switch (termios->c_cflag & CSIZE) { | 897 | switch (termios->c_cflag & CSIZE) { |
899 | case CS5: | 898 | case CS5: |
@@ -937,20 +936,19 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios, | |||
937 | ps = 0xC; | 936 | ps = 0xC; |
938 | quot = 1; | 937 | quot = 1; |
939 | break; | 938 | break; |
940 | case 2500000: | ||
941 | mul = 0x2710; | ||
942 | ps = 0x10; | ||
943 | quot = 1; | ||
944 | break; | ||
945 | case 18432000: | 939 | case 18432000: |
946 | mul = 0x2400; | 940 | mul = 0x2400; |
947 | ps = 0x10; | 941 | ps = 0x10; |
948 | quot = 1; | 942 | quot = 1; |
949 | break; | 943 | break; |
944 | case 3000000: | ||
945 | case 2500000: | ||
946 | case 2000000: | ||
950 | case 1500000: | 947 | case 1500000: |
951 | mul = 0x1D4C; | 948 | case 1000000: |
952 | ps = 0xc; | 949 | case 500000: |
953 | quot = 1; | 950 | /* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */ |
951 | mul = baud / 500000 * 0x9C4; | ||
954 | break; | 952 | break; |
955 | default: | 953 | default: |
956 | ; | 954 | ; |