aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c31
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c23
-rw-r--r--include/asm-mips/jmr3927/jmr3927.h14
-rw-r--r--include/asm-mips/serial.h12
5 files changed, 53 insertions, 29 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 455de42db7c9..41d782e207c3 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -635,6 +635,7 @@ config SGI_IP32
635 select OWN_DMA 635 select OWN_DMA
636 select DMA_IP32 636 select DMA_IP32
637 select DMA_NONCOHERENT 637 select DMA_NONCOHERENT
638 select HAS_TXX9_SERIAL
638 select HW_HAS_PCI 639 select HW_HAS_PCI
639 select R5000_CPU_SCACHE 640 select R5000_CPU_SCACHE
640 select RM7000_CPU_SCACHE 641 select RM7000_CPU_SCACHE
@@ -814,6 +815,7 @@ config RWSEM_GENERIC_SPINLOCK
814 815
815config RWSEM_XCHGADD_ALGORITHM 816config RWSEM_XCHGADD_ALGORITHM
816 bool 817 bool
818 select HAS_TXX9_SERIAL
817 819
818config GENERIC_CALIBRATE_DELAY 820config GENERIC_CALIBRATE_DELAY
819 bool 821 bool
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index d9f7a9989de5..3e2fbdc66097 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -44,6 +44,11 @@
44#include <linux/ioport.h> 44#include <linux/ioport.h>
45#include <linux/param.h> /* for HZ */ 45#include <linux/param.h> /* for HZ */
46#include <linux/delay.h> 46#include <linux/delay.h>
47#ifdef CONFIG_SERIAL_TXX9
48#include <linux/tty.h>
49#include <linux/serial.h>
50#include <linux/serial_core.h>
51#endif
47 52
48#include <asm/addrspace.h> 53#include <asm/addrspace.h>
49#include <asm/time.h> 54#include <asm/time.h>
@@ -211,8 +216,8 @@ void __init plat_setup(void)
211 */ 216 */
212 ioport_resource.start = pci_io_resource.start; 217 ioport_resource.start = pci_io_resource.start;
213 ioport_resource.end = pci_io_resource.end; 218 ioport_resource.end = pci_io_resource.end;
214 iomem_resource.start = pci_mem_resource.start; 219 iomem_resource.start = 0;
215 iomem_resource.end = pci_mem_resource.end; 220 iomem_resource.end = 0xffffffff;
216 221
217 /* Reboot on panic */ 222 /* Reboot on panic */
218 panic_timeout = 180; 223 panic_timeout = 180;
@@ -265,13 +270,33 @@ void __init plat_setup(void)
265 strcat(argptr, " ip=bootp"); 270 strcat(argptr, " ip=bootp");
266 } 271 }
267 272
268#ifdef CONFIG_TXX927_SERIAL_CONSOLE 273#ifdef CONFIG_SERIAL_TXX9
274 {
275 extern int early_serial_txx9_setup(struct uart_port *port);
276 int i;
277 struct uart_port req;
278 for(i = 0; i < 2; i++) {
279 memset(&req, 0, sizeof(req));
280 req.line = i;
281 req.iotype = UPIO_MEM;
282 req.membase = (char *)TX3927_SIO_REG(i);
283 req.mapbase = TX3927_SIO_REG(i);
284 req.irq = i == 0 ?
285 JMR3927_IRQ_IRC_SIO0 : JMR3927_IRQ_IRC_SIO1;
286 if (i == 0)
287 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
288 req.uartclk = JMR3927_IMCLK;
289 early_serial_txx9_setup(&req);
290 }
291 }
292#ifdef CONFIG_SERIAL_TXX9_CONSOLE
269 argptr = prom_getcmdline(); 293 argptr = prom_getcmdline();
270 if ((argptr = strstr(argptr, "console=")) == NULL) { 294 if ((argptr = strstr(argptr, "console=")) == NULL) {
271 argptr = prom_getcmdline(); 295 argptr = prom_getcmdline();
272 strcat(argptr, " console=ttyS1,115200"); 296 strcat(argptr, " console=ttyS1,115200");
273 } 297 }
274#endif 298#endif
299#endif
275} 300}
276 301
277static void tx3927_setup(void); 302static void tx3927_setup(void);
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index fc0720599fd9..990fcb294bab 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -77,6 +77,11 @@
77#include <linux/hdreg.h> 77#include <linux/hdreg.h>
78#include <linux/ide.h> 78#include <linux/ide.h>
79#endif 79#endif
80#ifdef CONFIG_SERIAL_TXX9
81#include <linux/tty.h>
82#include <linux/serial.h>
83#include <linux/serial_core.h>
84#endif
80 85
81#undef TOSHIBA_RBTX4927_SETUP_DEBUG 86#undef TOSHIBA_RBTX4927_SETUP_DEBUG
82 87
@@ -920,12 +925,30 @@ void __init toshiba_rbtx4927_setup(void)
920 925
921#endif /* CONFIG_PCI */ 926#endif /* CONFIG_PCI */
922 927
928#ifdef CONFIG_SERIAL_TXX9
929 {
930 extern int early_serial_txx9_setup(struct uart_port *port);
931 int i;
932 struct uart_port req;
933 for(i = 0; i < 2; i++) {
934 memset(&req, 0, sizeof(req));
935 req.line = i;
936 req.iotype = UPIO_MEM;
937 req.membase = (char *)(0xff1ff300 + i * 0x100);
938 req.mapbase = 0xff1ff300 + i * 0x100;
939 req.irq = 32 + i;
940 req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
941 req.uartclk = 50000000;
942 early_serial_txx9_setup(&req);
943 }
944 }
923#ifdef CONFIG_SERIAL_TXX9_CONSOLE 945#ifdef CONFIG_SERIAL_TXX9_CONSOLE
924 argptr = prom_getcmdline(); 946 argptr = prom_getcmdline();
925 if (strstr(argptr, "console=") == NULL) { 947 if (strstr(argptr, "console=") == NULL) {
926 strcat(argptr, " console=ttyS0,38400"); 948 strcat(argptr, " console=ttyS0,38400");
927 } 949 }
928#endif 950#endif
951#endif
929 952
930#ifdef CONFIG_ROOT_NFS 953#ifdef CONFIG_ROOT_NFS
931 argptr = prom_getcmdline(); 954 argptr = prom_getcmdline();
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h
index 86df317b4078..baf412967afa 100644
--- a/include/asm-mips/jmr3927/jmr3927.h
+++ b/include/asm-mips/jmr3927/jmr3927.h
@@ -202,20 +202,6 @@ static inline int jmr3927_have_isac(void)
202#endif /* !__ASSEMBLY__ */ 202#endif /* !__ASSEMBLY__ */
203 203
204/* 204/*
205 * UART defines for serial.h
206 */
207
208/* use Pre-scaler T0 (1/2) */
209#define JMR3927_BASE_BAUD (JMR3927_IMCLK / 2 / 16)
210
211#define UART0_ADDR 0xfffef300
212#define UART1_ADDR 0xfffef400
213#define UART0_INT JMR3927_IRQ_IRC_SIO0
214#define UART1_INT JMR3927_IRQ_IRC_SIO1
215#define UART0_FLAGS ASYNC_BOOT_AUTOCONF
216#define UART1_FLAGS 0
217
218/*
219 * IRQ mappings 205 * IRQ mappings
220 */ 206 */
221 207
diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h
index ce1043530e59..e796d75f027e 100644
--- a/include/asm-mips/serial.h
+++ b/include/asm-mips/serial.h
@@ -103,17 +103,6 @@
103#define IVR_SERIAL_PORT_DEFNS 103#define IVR_SERIAL_PORT_DEFNS
104#endif 104#endif
105 105
106#ifdef CONFIG_TOSHIBA_JMR3927
107#include <asm/jmr3927/jmr3927.h>
108#define TXX927_SERIAL_PORT_DEFNS \
109 { .baud_base = JMR3927_BASE_BAUD, .port = UART0_ADDR, .irq = UART0_INT, \
110 .flags = UART0_FLAGS, .type = 1 }, \
111 { .baud_base = JMR3927_BASE_BAUD, .port = UART1_ADDR, .irq = UART1_INT, \
112 .flags = UART1_FLAGS, .type = 1 },
113#else
114#define TXX927_SERIAL_PORT_DEFNS
115#endif
116
117#ifdef CONFIG_SERIAL_AU1X00 106#ifdef CONFIG_SERIAL_AU1X00
118#include <asm/mach-au1x00/au1000.h> 107#include <asm/mach-au1x00/au1000.h>
119#ifdef CONFIG_SOC_AU1000 108#ifdef CONFIG_SOC_AU1000
@@ -343,7 +332,6 @@
343 MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \ 332 MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \
344 MOMENCO_OCELOT_SERIAL_PORT_DEFNS \ 333 MOMENCO_OCELOT_SERIAL_PORT_DEFNS \
345 MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \ 334 MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \
346 TXX927_SERIAL_PORT_DEFNS \
347 AU1000_SERIAL_PORT_DEFNS 335 AU1000_SERIAL_PORT_DEFNS
348 336
349#endif /* _ASM_SERIAL_H */ 337#endif /* _ASM_SERIAL_H */