[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Patch to xmbserial.c to work with ttyS1 and ttyS2



Hi,
I tried to add some extra uartlite cores to uclinux_auto. When I 
compiled the kernel I got some errors, so here
is the patch to make it work.
I modified also the vendors makefile to add ttyS1, ttyS2 and ttyS3 devices.
I don't know if it's the best way to do it.

Regards,
Claudio Lanconelli
--- xmbserial.c	21 Apr 2005 05:30:05 -0000	1.16
+++ xmbserial.c	14 Jul 2005 11:01:46 -0000
@@ -182,11 +182,11 @@
        CONFIG_XILINX_UARTLITE_0_IRQ , ASYNC_BOOT_AUTOCONF }, /* ttyS0 */
 #ifdef CONFIG_XILINX_UARTLITE_1_INSTANCE
   { 0, CONFIG_XILINX_UARTLITE_1_BASEADDR, 
-       CONFIG_XILINX_UARTLITE_1_IRQ,  ASYNC_BOOT_AUTOCONF } /* ttyS1 */
+       CONFIG_XILINX_UARTLITE_1_IRQ,  ASYNC_BOOT_AUTOCONF }, /* ttyS1 */
 #endif
 #ifdef CONFIG_XILINX_UARTLITE_2_INSTANCE
   { 0, CONFIG_XILINX_UARTLITE_2_BASEADDR, 
-       CONFIG_XILINX_UARTLITE_2_IRQ,  ASYNC_BOOT_AUTOCONF } /* ttyS2 */
+       CONFIG_XILINX_UARTLITE_2_IRQ,  ASYNC_BOOT_AUTOCONF }, /* ttyS2 */
 #endif
 #ifdef CONFIG_XILINX_UARTLITE_3_INSTANCE
   { 0, CONFIG_XILINX_UARTLITE_3_BASEADDR, 
@@ -1486,6 +1486,8 @@
 	switch (info->line) {
 	case 0:
 	case 1:
+	case 2:
+	case 3:
 		break;
 	default:
 		printk("SERIAL: don't know how to handle UART %d interrupt?\n",
--- Makefile	22 Dec 2004 12:00:47 -0000	1.1.1.1
+++ Makefile	14 Jul 2005 11:09:01 -0000
@@ -30,7 +30,7 @@
 DEVICES =								      \
 	tty,c,5,0      console,c,5,1   mem,c,1,1     kmem,c,1,2    null,c,1,3 \
 									      \
-	ttyS0,c,4,64							      \
+	ttyS0,c,4,64   ttyS1,c,4,65    ttyS2,c,4,66  ttyS3,c,4,67             \
 									      \
 	zero,c,1,5     random,c,1,8    urandom,c,1,9			      \
 									      \