summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-26 00:07:44 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-26 00:07:44 +0000
commit38f0dc890f23f8de14abe63f60a9f9bf3be40271 (patch)
tree99c5b1e021cc51f059d55c7efa4b74f3f4d8a80d /drivers/char
parent07ebee0bea931f0d373e40205c932cae6b00a86d (diff)
Support for the NEC DDB Vrc-5074 evaluation board. Patches by
Geert Uytterhoeven (geert@linux-m68k.org).
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/serial.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/drivers/char/serial.c b/drivers/char/serial.c
index 24cc9ee27..b4bb6865f 100644
--- a/drivers/char/serial.c
+++ b/drivers/char/serial.c
@@ -196,6 +196,10 @@ static char *serial_version = "4.30";
#include <asm/irq.h>
#include <asm/bitops.h>
+#ifdef CONFIG_DDB5074
+#include <asm/nile4.h>
+#endif
+
#ifdef CONFIG_MAC_SERIAL
#define SERIAL_DEV_OFFSET 2
#else
@@ -412,6 +416,11 @@ static inline unsigned int serial_in(struct async_struct *info, int offset)
return *((volatile u8 *)info->port + offset);
} else
#endif
+#ifdef CONFIG_DDB5074
+ if (info->port == 0) /* FIXME: kludge */
+ return nile4_in8(NILE4_UART_BASE+offset*8);
+ else
+#endif
#ifdef CONFIG_HUB6
if (info->hub6) {
outb(info->hub6 - 1 + offset, info->port);
@@ -433,6 +442,11 @@ static inline unsigned int serial_inp(struct async_struct *info, int offset)
return *((volatile u8 *)info->port + offset);
} else
#endif
+#ifdef CONFIG_DDB5074
+ if (info->port == 0) /* FIXME: kludge */
+ return nile4_in8(NILE4_UART_BASE+offset*8);
+ else
+#endif
#ifdef CONFIG_HUB6
if (info->hub6) {
outb(info->hub6 - 1 + offset, info->port);
@@ -458,6 +472,11 @@ static inline void serial_out(struct async_struct *info, int offset, int value)
*((volatile u8 *)info->port + offset) = value;
} else
#endif
+#ifdef CONFIG_DDB5074
+ if (info->port == 0) /* FIXME: kludge */
+ nile4_out8(NILE4_UART_BASE+offset*8, value);
+ else
+#endif
#ifdef CONFIG_HUB6
if (info->hub6) {
outb(info->hub6 - 1 + offset, info->port);
@@ -480,6 +499,11 @@ static inline void serial_outp(struct async_struct *info, int offset,
*((volatile u8 *)info->port + offset) = value;
} else
#endif
+#ifdef CONFIG_DDB5074
+ if (info->port == 0) /* FIXME: kludge */
+ nile4_out8(NILE4_UART_BASE+offset*8, value);
+ else
+#endif
#ifdef CONFIG_HUB6
if (info->hub6) {
outb(info->hub6 - 1 + offset, info->port);
@@ -3427,7 +3451,9 @@ static void autoconfig(struct serial_state * state)
scratch = serial_inp(info, UART_IER);
serial_outp(info, UART_IER, 0);
/* inb / outb don't work properly yet on IP27. */
+#ifdef CONFIG_SGI_IP27
if (!(state->flags & ASYNC_IOC3))
+#endif
outb(0xff, 0x080);
scratch2 = serial_inp(info, UART_IER);
serial_outp(info, UART_IER, scratch);
@@ -3718,6 +3744,13 @@ static struct pci_board pci_boards[] = {
PCI_ANY_ID, PCI_ANY_ID,
SPCI_FL_BASE2 | SPCI_FL_IOMEM, 2, 921600,
0x400, 7, pci_plx9050_fn },
+#if 0 /* FIXME: This doesn't work because the NILE4 registers are not
+ visible in the PCI device structure :-( */
+ { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NILE4,
+ PCI_ANY_ID, PCI_ANY_ID,
+ SPCI_FL_BASE0 | SPCI_FL_IOMEM, 1, 520833,
+ 0x300, 3 },
+#endif
{ 0, }
};
@@ -4356,7 +4389,11 @@ static int __init serial_console_setup(struct console *co, char *options)
scr_info.port = ser->port;
scr_info.flags = ser->flags;
#ifdef CONFIG_HUB6
- scr_info.hub6 = state->hub6;
+ scr_info.hub6 = ser->hub6;
+#endif
+#ifdef CONFIG_SERIAL_PCI_MEMMAPPED
+ scr_info.iomem_base = ser->iomem_base;
+ scr_info.iomem_reg_shift = ser->iomem_reg_shift;
#endif
quot = ser->baud_base / baud;
cval = cflag & (CSIZE | CSTOPB);