diff options
Diffstat (limited to 'arch/mips/jmr3927/rbhma3100/setup.c')
-rw-r--r-- | arch/mips/jmr3927/rbhma3100/setup.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 32039bb2f440..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> |
@@ -193,7 +198,7 @@ static void jmr3927_board_init(void); | |||
193 | extern struct resource pci_io_resource; | 198 | extern struct resource pci_io_resource; |
194 | extern struct resource pci_mem_resource; | 199 | extern struct resource pci_mem_resource; |
195 | 200 | ||
196 | static void __init jmr3927_setup(void) | 201 | void __init plat_setup(void) |
197 | { | 202 | { |
198 | char *argptr; | 203 | char *argptr; |
199 | 204 | ||
@@ -211,8 +216,8 @@ static void __init jmr3927_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,18 +270,35 @@ static void __init jmr3927_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 | ||
277 | early_initcall(jmr3927_setup); | ||
278 | |||
279 | |||
280 | static void tx3927_setup(void); | 302 | static void tx3927_setup(void); |
281 | 303 | ||
282 | #ifdef CONFIG_PCI | 304 | #ifdef CONFIG_PCI |
@@ -335,7 +357,7 @@ static void __init jmr3927_board_init(void) | |||
335 | jmr3927_io_dipsw()); | 357 | jmr3927_io_dipsw()); |
336 | } | 358 | } |
337 | 359 | ||
338 | static void __init tx3927_setup(void) | 360 | void __init plat_setup(void) |
339 | { | 361 | { |
340 | int i; | 362 | int i; |
341 | 363 | ||