aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/8250/8250.c70
-rw-r--r--drivers/tty/serial/8250/Kconfig9
-rw-r--r--include/linux/serial_core.h1
3 files changed, 1 insertions, 79 deletions
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index d085e3a8ec06..5fb6577b94dc 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -239,13 +239,6 @@ static const struct serial8250_config uart_config[] = {
239 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, 239 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
240 .flags = UART_CAP_FIFO | UART_CAP_UUE | UART_CAP_RTOIE, 240 .flags = UART_CAP_FIFO | UART_CAP_UUE | UART_CAP_RTOIE,
241 }, 241 },
242 [PORT_RM9000] = {
243 .name = "RM9000",
244 .fifo_size = 16,
245 .tx_loadsz = 16,
246 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
247 .flags = UART_CAP_FIFO,
248 },
249 [PORT_OCTEON] = { 242 [PORT_OCTEON] = {
250 .name = "OCTEON", 243 .name = "OCTEON",
251 .fifo_size = 64, 244 .fifo_size = 64,
@@ -364,56 +357,6 @@ static void au_serial_dl_write(struct uart_8250_port *up, int value)
364 357
365#endif 358#endif
366 359
367#ifdef CONFIG_SERIAL_8250_RM9K
368
369static const u8
370 regmap_in[8] = {
371 [UART_RX] = 0x00,
372 [UART_IER] = 0x0c,
373 [UART_IIR] = 0x14,
374 [UART_LCR] = 0x1c,
375 [UART_MCR] = 0x20,
376 [UART_LSR] = 0x24,
377 [UART_MSR] = 0x28,
378 [UART_SCR] = 0x2c
379 },
380 regmap_out[8] = {
381 [UART_TX] = 0x04,
382 [UART_IER] = 0x0c,
383 [UART_FCR] = 0x18,
384 [UART_LCR] = 0x1c,
385 [UART_MCR] = 0x20,
386 [UART_LSR] = 0x24,
387 [UART_MSR] = 0x28,
388 [UART_SCR] = 0x2c
389 };
390
391static unsigned int rm9k_serial_in(struct uart_port *p, int offset)
392{
393 offset = regmap_in[offset] << p->regshift;
394 return readl(p->membase + offset);
395}
396
397static void rm9k_serial_out(struct uart_port *p, int offset, int value)
398{
399 offset = regmap_out[offset] << p->regshift;
400 writel(value, p->membase + offset);
401}
402
403static int rm9k_serial_dl_read(struct uart_8250_port *up)
404{
405 return ((__raw_readl(up->port.membase + 0x10) << 8) |
406 (__raw_readl(up->port.membase + 0x08) & 0xff)) & 0xffff;
407}
408
409static void rm9k_serial_dl_write(struct uart_8250_port *up, int value)
410{
411 __raw_writel(value, up->port.membase + 0x08);
412 __raw_writel(value >> 8, up->port.membase + 0x10);
413}
414
415#endif
416
417static unsigned int hub6_serial_in(struct uart_port *p, int offset) 360static unsigned int hub6_serial_in(struct uart_port *p, int offset)
418{ 361{
419 offset = offset << p->regshift; 362 offset = offset << p->regshift;
@@ -491,15 +434,6 @@ static void set_io_from_upio(struct uart_port *p)
491 p->serial_out = mem32_serial_out; 434 p->serial_out = mem32_serial_out;
492 break; 435 break;
493 436
494#ifdef CONFIG_SERIAL_8250_RM9K
495 case UPIO_RM9000:
496 p->serial_in = rm9k_serial_in;
497 p->serial_out = rm9k_serial_out;
498 up->dl_read = rm9k_serial_dl_read;
499 up->dl_write = rm9k_serial_dl_write;
500 break;
501#endif
502
503#ifdef CONFIG_MIPS_ALCHEMY 437#ifdef CONFIG_MIPS_ALCHEMY
504 case UPIO_AU: 438 case UPIO_AU:
505 p->serial_in = au_serial_in; 439 p->serial_in = au_serial_in;
@@ -1343,9 +1277,7 @@ static void serial8250_start_tx(struct uart_port *port)
1343 unsigned char lsr; 1277 unsigned char lsr;
1344 lsr = serial_in(up, UART_LSR); 1278 lsr = serial_in(up, UART_LSR);
1345 up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; 1279 up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
1346 if ((port->type == PORT_RM9000) ? 1280 if (lsr & UART_LSR_TEMT)
1347 (lsr & UART_LSR_THRE) :
1348 (lsr & UART_LSR_TEMT))
1349 serial8250_tx_chars(up); 1281 serial8250_tx_chars(up);
1350 } 1282 }
1351 } 1283 }
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
index c31133a6ea8e..d79208f47237 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -249,15 +249,6 @@ config SERIAL_8250_ACORN
249 system, say Y to this option. The driver can handle 1, 2, or 3 port 249 system, say Y to this option. The driver can handle 1, 2, or 3 port
250 cards. If unsure, say N. 250 cards. If unsure, say N.
251 251
252config SERIAL_8250_RM9K
253 bool "Support for MIPS RM9xxx integrated serial port"
254 depends on SERIAL_8250 != n && SERIAL_RM9000
255 select SERIAL_8250_SHARE_IRQ
256 help
257 Selecting this option will add support for the integrated serial
258 port hardware found on MIPS RM9122 and similar processors.
259 If unsure, say N.
260
261config SERIAL_8250_FSL 252config SERIAL_8250_FSL
262 bool 253 bool
263 depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550 254 depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a116daa13113..ec5df74c4506 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -136,7 +136,6 @@ struct uart_port {
136#define UPIO_MEM32 (3) 136#define UPIO_MEM32 (3)
137#define UPIO_AU (4) /* Au1x00 type IO */ 137#define UPIO_AU (4) /* Au1x00 type IO */
138#define UPIO_TSI (5) /* Tsi108/109 type IO */ 138#define UPIO_TSI (5) /* Tsi108/109 type IO */
139#define UPIO_RM9000 (6) /* RM9000 type IO */
140 139
141 unsigned int read_status_mask; /* driver specific */ 140 unsigned int read_status_mask; /* driver specific */
142 unsigned int ignore_status_mask; /* driver specific */ 141 unsigned int ignore_status_mask; /* driver specific */