Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Use new txx9 serial driver.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+53 -29
+2
arch/mips/Kconfig
··· 635 635 select OWN_DMA 636 636 select DMA_IP32 637 637 select DMA_NONCOHERENT 638 + select HAS_TXX9_SERIAL 638 639 select HW_HAS_PCI 639 640 select R5000_CPU_SCACHE 640 641 select RM7000_CPU_SCACHE ··· 815 814 816 815 config RWSEM_XCHGADD_ALGORITHM 817 816 bool 817 + select HAS_TXX9_SERIAL 818 818 819 819 config GENERIC_CALIBRATE_DELAY 820 820 bool
+28 -3
arch/mips/jmr3927/rbhma3100/setup.c
··· 44 44 #include <linux/ioport.h> 45 45 #include <linux/param.h> /* for HZ */ 46 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 53 #include <asm/addrspace.h> 49 54 #include <asm/time.h> ··· 216 211 */ 217 212 ioport_resource.start = pci_io_resource.start; 218 213 ioport_resource.end = pci_io_resource.end; 219 - iomem_resource.start = pci_mem_resource.start; 220 - iomem_resource.end = pci_mem_resource.end; 214 + iomem_resource.start = 0; 215 + iomem_resource.end = 0xffffffff; 221 216 222 217 /* Reboot on panic */ 223 218 panic_timeout = 180; ··· 270 265 strcat(argptr, " ip=bootp"); 271 266 } 272 267 273 - #ifdef CONFIG_TXX927_SERIAL_CONSOLE 268 + #ifdef CONFIG_SERIAL_TXX9 269 + { 270 + extern int early_serial_txx9_setup(struct uart_port *port); 271 + int i; 272 + struct uart_port req; 273 + for(i = 0; i < 2; i++) { 274 + memset(&req, 0, sizeof(req)); 275 + req.line = i; 276 + req.iotype = UPIO_MEM; 277 + req.membase = (char *)TX3927_SIO_REG(i); 278 + req.mapbase = TX3927_SIO_REG(i); 279 + req.irq = i == 0 ? 280 + JMR3927_IRQ_IRC_SIO0 : JMR3927_IRQ_IRC_SIO1; 281 + if (i == 0) 282 + req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/; 283 + req.uartclk = JMR3927_IMCLK; 284 + early_serial_txx9_setup(&req); 285 + } 286 + } 287 + #ifdef CONFIG_SERIAL_TXX9_CONSOLE 274 288 argptr = prom_getcmdline(); 275 289 if ((argptr = strstr(argptr, "console=")) == NULL) { 276 290 argptr = prom_getcmdline(); 277 291 strcat(argptr, " console=ttyS1,115200"); 278 292 } 293 + #endif 279 294 #endif 280 295 } 281 296
+23
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
··· 77 77 #include <linux/hdreg.h> 78 78 #include <linux/ide.h> 79 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 86 #undef TOSHIBA_RBTX4927_SETUP_DEBUG 82 87 ··· 925 920 926 921 #endif /* CONFIG_PCI */ 927 922 923 + #ifdef CONFIG_SERIAL_TXX9 924 + { 925 + extern int early_serial_txx9_setup(struct uart_port *port); 926 + int i; 927 + struct uart_port req; 928 + for(i = 0; i < 2; i++) { 929 + memset(&req, 0, sizeof(req)); 930 + req.line = i; 931 + req.iotype = UPIO_MEM; 932 + req.membase = (char *)(0xff1ff300 + i * 0x100); 933 + req.mapbase = 0xff1ff300 + i * 0x100; 934 + req.irq = 32 + i; 935 + req.flags |= UPF_BUGGY_UART /*HAVE_CTS_LINE*/; 936 + req.uartclk = 50000000; 937 + early_serial_txx9_setup(&req); 938 + } 939 + } 928 940 #ifdef CONFIG_SERIAL_TXX9_CONSOLE 929 941 argptr = prom_getcmdline(); 930 942 if (strstr(argptr, "console=") == NULL) { 931 943 strcat(argptr, " console=ttyS0,38400"); 932 944 } 945 + #endif 933 946 #endif 934 947 935 948 #ifdef CONFIG_ROOT_NFS
-14
include/asm-mips/jmr3927/jmr3927.h
··· 202 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 205 * IRQ mappings 220 206 */ 221 207
-12
include/asm-mips/serial.h
··· 103 103 #define IVR_SERIAL_PORT_DEFNS 104 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 106 #ifdef CONFIG_SERIAL_AU1X00 118 107 #include <asm/mach-au1x00/au1000.h> 119 108 #ifdef CONFIG_SOC_AU1000 ··· 332 343 MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \ 333 344 MOMENCO_OCELOT_SERIAL_PORT_DEFNS \ 334 345 MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \ 335 - TXX927_SERIAL_PORT_DEFNS \ 336 346 AU1000_SERIAL_PORT_DEFNS 337 347 338 348 #endif /* _ASM_SERIAL_H */