aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-14 17:24:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-14 17:24:42 -0400
commitb6825d2df55aa7d7341c715b577b73a6a03dc944 (patch)
treeae4f0f52f4c2ad4e501dd323318486ccdd7fcd93 /drivers/serial
parent6defd90433729c2d795865165cb34d938d8ff07c (diff)
parentaa59e19d05114f9fb7718d6bc8398255476fb4f5 (diff)
Merge branch 'omap-all' into devel
Conflicts: arch/arm/mach-omap2/gpmc.c arch/arm/mach-omap2/irq.c
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 9ccc563d8730..8058533f8418 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2211,9 +2211,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
2211 serial_outp(up, UART_EFR, efr); 2211 serial_outp(up, UART_EFR, efr);
2212 } 2212 }
2213 2213
2214#ifdef CONFIG_ARCH_OMAP15XX 2214#ifdef CONFIG_ARCH_OMAP
2215 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ 2215 /* Workaround to enable 115200 baud on OMAP1510 internal ports */
2216 if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) { 2216 if (cpu_is_omap1510() && is_omap_port(up)) {
2217 if (baud == 115200) { 2217 if (baud == 115200) {
2218 quot = 1; 2218 quot = 1;
2219 serial_out(up, UART_OMAP_OSC_12M_SEL, 1); 2219 serial_out(up, UART_OMAP_OSC_12M_SEL, 1);
@@ -2266,18 +2266,27 @@ serial8250_pm(struct uart_port *port, unsigned int state,
2266 p->pm(port, state, oldstate); 2266 p->pm(port, state, oldstate);
2267} 2267}
2268 2268
2269static unsigned int serial8250_port_size(struct uart_8250_port *pt)
2270{
2271 if (pt->port.iotype == UPIO_AU)
2272 return 0x100000;
2273#ifdef CONFIG_ARCH_OMAP
2274 if (is_omap_port(pt))
2275 return 0x16 << pt->port.regshift;
2276#endif
2277 return 8 << pt->port.regshift;
2278}
2279
2269/* 2280/*
2270 * Resource handling. 2281 * Resource handling.
2271 */ 2282 */
2272static int serial8250_request_std_resource(struct uart_8250_port *up) 2283static int serial8250_request_std_resource(struct uart_8250_port *up)
2273{ 2284{
2274 unsigned int size = 8 << up->port.regshift; 2285 unsigned int size = serial8250_port_size(up);
2275 int ret = 0; 2286 int ret = 0;
2276 2287
2277 switch (up->port.iotype) { 2288 switch (up->port.iotype) {
2278 case UPIO_AU: 2289 case UPIO_AU:
2279 size = 0x100000;
2280 /* fall thru */
2281 case UPIO_TSI: 2290 case UPIO_TSI:
2282 case UPIO_MEM32: 2291 case UPIO_MEM32:
2283 case UPIO_MEM: 2292 case UPIO_MEM:
@@ -2311,12 +2320,10 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)
2311 2320
2312static void serial8250_release_std_resource(struct uart_8250_port *up) 2321static void serial8250_release_std_resource(struct uart_8250_port *up)
2313{ 2322{
2314 unsigned int size = 8 << up->port.regshift; 2323 unsigned int size = serial8250_port_size(up);
2315 2324
2316 switch (up->port.iotype) { 2325 switch (up->port.iotype) {
2317 case UPIO_AU: 2326 case UPIO_AU:
2318 size = 0x100000;
2319 /* fall thru */
2320 case UPIO_TSI: 2327 case UPIO_TSI:
2321 case UPIO_MEM32: 2328 case UPIO_MEM32:
2322 case UPIO_MEM: 2329 case UPIO_MEM: