diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-16 23:12:26 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-16 23:13:04 -0400 |
commit | f4936639bc4a75218b5598ff69c52b9a8dd7f23d (patch) | |
tree | 9c08fc81cb3d3e658ca7f8dc20a949496d9e6130 /drivers/tty/serial/m32r_sio.c | |
parent | d1226e8f98f130918265fb5b4dddcb60b783eb34 (diff) | |
parent | 11964f53eb4d9ce59a058be9999d9cfcb1ced878 (diff) |
Merge tag 'omap-devel-am33xx-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
From Tony Lindgren:
From Paul Walmsley <paul@pwsan.com>:
AM33xx hwmod data and miscellaneous clock and hwmod fixes. AM33xx
should now boot on mainline after this is applied, according to
Vaibhav.
(The shortlog makes no sense here since it contains mostly the dependent
cleanups that are part of the preceding branches).
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/tty/serial/m32r_sio.c')
-rw-r--r-- | drivers/tty/serial/m32r_sio.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index a0703624d5e5..b13949ad3408 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c | |||
@@ -44,8 +44,6 @@ | |||
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | 46 | ||
47 | #define PORT_M32R_BASE PORT_M32R_SIO | ||
48 | #define PORT_INDEX(x) (x - PORT_M32R_BASE + 1) | ||
49 | #define BAUD_RATE 115200 | 47 | #define BAUD_RATE 115200 |
50 | 48 | ||
51 | #include <linux/serial_core.h> | 49 | #include <linux/serial_core.h> |
@@ -132,22 +130,6 @@ struct irq_info { | |||
132 | 130 | ||
133 | static struct irq_info irq_lists[NR_IRQS]; | 131 | static struct irq_info irq_lists[NR_IRQS]; |
134 | 132 | ||
135 | /* | ||
136 | * Here we define the default xmit fifo size used for each type of UART. | ||
137 | */ | ||
138 | static const struct serial_uart_config uart_config[] = { | ||
139 | [PORT_UNKNOWN] = { | ||
140 | .name = "unknown", | ||
141 | .dfl_xmit_fifo_size = 1, | ||
142 | .flags = 0, | ||
143 | }, | ||
144 | [PORT_INDEX(PORT_M32R_SIO)] = { | ||
145 | .name = "M32RSIO", | ||
146 | .dfl_xmit_fifo_size = 1, | ||
147 | .flags = 0, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 133 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
152 | 134 | ||
153 | #define __sio_in(x) inw((unsigned long)(x)) | 135 | #define __sio_in(x) inw((unsigned long)(x)) |
@@ -907,8 +889,7 @@ static void m32r_sio_config_port(struct uart_port *port, int unused) | |||
907 | 889 | ||
908 | spin_lock_irqsave(&up->port.lock, flags); | 890 | spin_lock_irqsave(&up->port.lock, flags); |
909 | 891 | ||
910 | up->port.type = (PORT_M32R_SIO - PORT_M32R_BASE + 1); | 892 | up->port.fifosize = 1; |
911 | up->port.fifosize = uart_config[up->port.type].dfl_xmit_fifo_size; | ||
912 | 893 | ||
913 | spin_unlock_irqrestore(&up->port.lock, flags); | 894 | spin_unlock_irqrestore(&up->port.lock, flags); |
914 | } | 895 | } |
@@ -916,23 +897,11 @@ static void m32r_sio_config_port(struct uart_port *port, int unused) | |||
916 | static int | 897 | static int |
917 | m32r_sio_verify_port(struct uart_port *port, struct serial_struct *ser) | 898 | m32r_sio_verify_port(struct uart_port *port, struct serial_struct *ser) |
918 | { | 899 | { |
919 | if (ser->irq >= nr_irqs || ser->irq < 0 || | 900 | if (ser->irq >= nr_irqs || ser->irq < 0 || ser->baud_base < 9600) |
920 | ser->baud_base < 9600 || ser->type < PORT_UNKNOWN || | ||
921 | ser->type >= ARRAY_SIZE(uart_config)) | ||
922 | return -EINVAL; | 901 | return -EINVAL; |
923 | return 0; | 902 | return 0; |
924 | } | 903 | } |
925 | 904 | ||
926 | static const char * | ||
927 | m32r_sio_type(struct uart_port *port) | ||
928 | { | ||
929 | int type = port->type; | ||
930 | |||
931 | if (type >= ARRAY_SIZE(uart_config)) | ||
932 | type = 0; | ||
933 | return uart_config[type].name; | ||
934 | } | ||
935 | |||
936 | static struct uart_ops m32r_sio_pops = { | 905 | static struct uart_ops m32r_sio_pops = { |
937 | .tx_empty = m32r_sio_tx_empty, | 906 | .tx_empty = m32r_sio_tx_empty, |
938 | .set_mctrl = m32r_sio_set_mctrl, | 907 | .set_mctrl = m32r_sio_set_mctrl, |
@@ -946,7 +915,6 @@ static struct uart_ops m32r_sio_pops = { | |||
946 | .shutdown = m32r_sio_shutdown, | 915 | .shutdown = m32r_sio_shutdown, |
947 | .set_termios = m32r_sio_set_termios, | 916 | .set_termios = m32r_sio_set_termios, |
948 | .pm = m32r_sio_pm, | 917 | .pm = m32r_sio_pm, |
949 | .type = m32r_sio_type, | ||
950 | .release_port = m32r_sio_release_port, | 918 | .release_port = m32r_sio_release_port, |
951 | .request_port = m32r_sio_request_port, | 919 | .request_port = m32r_sio_request_port, |
952 | .config_port = m32r_sio_config_port, | 920 | .config_port = m32r_sio_config_port, |