diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-07-15 15:45:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 08:26:07 -0400 |
commit | 12bf3f24e07d18ab6c42619be604e269f6738614 (patch) | |
tree | f53827aa06fbc8aef78ddc58b4b03fa762f41e95 | |
parent | 42a4f17dc356689075263d7c2bd68456676fa62e (diff) |
SERIAL: 8250: Remove SERIAL_8250_AU1X00
Remove the SERIAL_8250_AU1X00 config symbol. Instead, use the MIPS_ALCHEMY
one which is always defined when building an Au1x00-based platform.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Linux-serial <linux-serial@vger.kernel.org>
Patchwork: https://patchwork.linux-mips.org/patch/1461/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This one depends on a previous patch (which removes SOC_AU1X00 and changes
MACH_ALCHEMY) to apply cleanly (and then actually work), so I'd love for
this to go in via the mips tree.
-rw-r--r-- | arch/mips/alchemy/common/platform.c | 2 | ||||
-rw-r--r-- | drivers/serial/8250.c | 13 | ||||
-rw-r--r-- | drivers/serial/Kconfig | 8 |
3 files changed, 3 insertions, 20 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index f9e5622ebc95..c233d64a0d60 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c | |||
@@ -33,7 +33,6 @@ | |||
33 | } | 33 | } |
34 | 34 | ||
35 | static struct plat_serial8250_port au1x00_uart_data[] = { | 35 | static struct plat_serial8250_port au1x00_uart_data[] = { |
36 | #if defined(CONFIG_SERIAL_8250_AU1X00) | ||
37 | #if defined(CONFIG_SOC_AU1000) | 36 | #if defined(CONFIG_SOC_AU1000) |
38 | PORT(UART0_PHYS_ADDR, AU1000_UART0_INT), | 37 | PORT(UART0_PHYS_ADDR, AU1000_UART0_INT), |
39 | PORT(UART1_PHYS_ADDR, AU1000_UART1_INT), | 38 | PORT(UART1_PHYS_ADDR, AU1000_UART1_INT), |
@@ -54,7 +53,6 @@ static struct plat_serial8250_port au1x00_uart_data[] = { | |||
54 | PORT(UART0_PHYS_ADDR, AU1200_UART0_INT), | 53 | PORT(UART0_PHYS_ADDR, AU1200_UART0_INT), |
55 | PORT(UART1_PHYS_ADDR, AU1200_UART1_INT), | 54 | PORT(UART1_PHYS_ADDR, AU1200_UART1_INT), |
56 | #endif | 55 | #endif |
57 | #endif /* CONFIG_SERIAL_8250_AU1X00 */ | ||
58 | { }, | 56 | { }, |
59 | }; | 57 | }; |
60 | 58 | ||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 891e1dd65f24..09ef57034c9c 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -302,7 +302,7 @@ static const struct serial8250_config uart_config[] = { | |||
302 | }, | 302 | }, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | #if defined (CONFIG_SERIAL_8250_AU1X00) | 305 | #if defined(CONFIG_MIPS_ALCHEMY) |
306 | 306 | ||
307 | /* Au1x00 UART hardware has a weird register layout */ | 307 | /* Au1x00 UART hardware has a weird register layout */ |
308 | static const u8 au_io_in_map[] = { | 308 | static const u8 au_io_in_map[] = { |
@@ -422,7 +422,6 @@ static unsigned int mem32_serial_in(struct uart_port *p, int offset) | |||
422 | return readl(p->membase + offset); | 422 | return readl(p->membase + offset); |
423 | } | 423 | } |
424 | 424 | ||
425 | #ifdef CONFIG_SERIAL_8250_AU1X00 | ||
426 | static unsigned int au_serial_in(struct uart_port *p, int offset) | 425 | static unsigned int au_serial_in(struct uart_port *p, int offset) |
427 | { | 426 | { |
428 | offset = map_8250_in_reg(p, offset) << p->regshift; | 427 | offset = map_8250_in_reg(p, offset) << p->regshift; |
@@ -434,7 +433,6 @@ static void au_serial_out(struct uart_port *p, int offset, int value) | |||
434 | offset = map_8250_out_reg(p, offset) << p->regshift; | 433 | offset = map_8250_out_reg(p, offset) << p->regshift; |
435 | __raw_writel(value, p->membase + offset); | 434 | __raw_writel(value, p->membase + offset); |
436 | } | 435 | } |
437 | #endif | ||
438 | 436 | ||
439 | static unsigned int tsi_serial_in(struct uart_port *p, int offset) | 437 | static unsigned int tsi_serial_in(struct uart_port *p, int offset) |
440 | { | 438 | { |
@@ -503,12 +501,11 @@ static void set_io_from_upio(struct uart_port *p) | |||
503 | p->serial_out = mem32_serial_out; | 501 | p->serial_out = mem32_serial_out; |
504 | break; | 502 | break; |
505 | 503 | ||
506 | #ifdef CONFIG_SERIAL_8250_AU1X00 | ||
507 | case UPIO_AU: | 504 | case UPIO_AU: |
508 | p->serial_in = au_serial_in; | 505 | p->serial_in = au_serial_in; |
509 | p->serial_out = au_serial_out; | 506 | p->serial_out = au_serial_out; |
510 | break; | 507 | break; |
511 | #endif | 508 | |
512 | case UPIO_TSI: | 509 | case UPIO_TSI: |
513 | p->serial_in = tsi_serial_in; | 510 | p->serial_in = tsi_serial_in; |
514 | p->serial_out = tsi_serial_out; | 511 | p->serial_out = tsi_serial_out; |
@@ -535,9 +532,7 @@ serial_out_sync(struct uart_8250_port *up, int offset, int value) | |||
535 | switch (p->iotype) { | 532 | switch (p->iotype) { |
536 | case UPIO_MEM: | 533 | case UPIO_MEM: |
537 | case UPIO_MEM32: | 534 | case UPIO_MEM32: |
538 | #ifdef CONFIG_SERIAL_8250_AU1X00 | ||
539 | case UPIO_AU: | 535 | case UPIO_AU: |
540 | #endif | ||
541 | case UPIO_DWAPB: | 536 | case UPIO_DWAPB: |
542 | p->serial_out(p, offset, value); | 537 | p->serial_out(p, offset, value); |
543 | p->serial_in(p, UART_LCR); /* safe, no side-effects */ | 538 | p->serial_in(p, UART_LCR); /* safe, no side-effects */ |
@@ -573,7 +568,7 @@ static inline void _serial_dl_write(struct uart_8250_port *up, int value) | |||
573 | serial_outp(up, UART_DLM, value >> 8 & 0xff); | 568 | serial_outp(up, UART_DLM, value >> 8 & 0xff); |
574 | } | 569 | } |
575 | 570 | ||
576 | #if defined(CONFIG_SERIAL_8250_AU1X00) | 571 | #if defined(CONFIG_MIPS_ALCHEMY) |
577 | /* Au1x00 haven't got a standard divisor latch */ | 572 | /* Au1x00 haven't got a standard divisor latch */ |
578 | static int serial_dl_read(struct uart_8250_port *up) | 573 | static int serial_dl_read(struct uart_8250_port *up) |
579 | { | 574 | { |
@@ -2596,11 +2591,9 @@ static void serial8250_config_port(struct uart_port *port, int flags) | |||
2596 | if (flags & UART_CONFIG_TYPE) | 2591 | if (flags & UART_CONFIG_TYPE) |
2597 | autoconfig(up, probeflags); | 2592 | autoconfig(up, probeflags); |
2598 | 2593 | ||
2599 | #ifdef CONFIG_SERIAL_8250_AU1X00 | ||
2600 | /* if access method is AU, it is a 16550 with a quirk */ | 2594 | /* if access method is AU, it is a 16550 with a quirk */ |
2601 | if (up->port.type == PORT_16550A && up->port.iotype == UPIO_AU) | 2595 | if (up->port.type == PORT_16550A && up->port.iotype == UPIO_AU) |
2602 | up->bugs |= UART_BUG_NOMSR; | 2596 | up->bugs |= UART_BUG_NOMSR; |
2603 | #endif | ||
2604 | 2597 | ||
2605 | if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ) | 2598 | if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ) |
2606 | autoconfig_irq(up); | 2599 | autoconfig_irq(up); |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 1acc7b3c437e..e437ce8c1748 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -258,14 +258,6 @@ config SERIAL_8250_ACORN | |||
258 | system, say Y to this option. The driver can handle 1, 2, or 3 port | 258 | system, say Y to this option. The driver can handle 1, 2, or 3 port |
259 | cards. If unsure, say N. | 259 | cards. If unsure, say N. |
260 | 260 | ||
261 | config SERIAL_8250_AU1X00 | ||
262 | bool "Au1x00 serial port support" | ||
263 | depends on SERIAL_8250 != n && MIPS_ALCHEMY | ||
264 | help | ||
265 | If you have an Au1x00 SOC based board and want to use the serial port, | ||
266 | say Y to this option. The driver can handle up to 4 serial ports, | ||
267 | depending on the SOC. If unsure, say N. | ||
268 | |||
269 | config SERIAL_8250_RM9K | 261 | config SERIAL_8250_RM9K |
270 | bool "Support for MIPS RM9xxx integrated serial port" | 262 | bool "Support for MIPS RM9xxx integrated serial port" |
271 | depends on SERIAL_8250 != n && SERIAL_RM9000 | 263 | depends on SERIAL_8250 != n && SERIAL_RM9000 |