Russell,

> 1.2073.10.1 05/03/04 21:19:20 [EMAIL PROTECTED](none)[rmk] +1 -0
> [ARM PATCH] 2472/1: Updates 8250.c to correctly detect XScale UARTs
>
> Patch from George Joseph
>
> Modifications to autoconfig_16550a to add a testcase
> to detect XScale UARTS.
>
> Signed-off-by: George Joseph
> Signed-off-by: Russell King

Breaks my UARTS.

I'm not thrilled with this patch but 8250.c has similar warts so I
guess it's not too bad.  Ideally we could refactor this a bit so if
this isn't acceptable let me know and I'll do that instead.



===== drivers/serial/8250.c 1.96 vs edited =====
Index: kernel-taniwha-2.6.11post-cw3/drivers/serial/8250.c
===================================================================
--- kernel-taniwha-2.6.11post-cw3.orig/drivers/serial/8250.c    2005-03-06 
01:10:38.677251721 -0800
+++ kernel-taniwha-2.6.11post-cw3/drivers/serial/8250.c 2005-03-06 
01:13:26.288802003 -0800
@@ -642,7 +642,9 @@
 static void autoconfig_16550a(struct uart_8250_port *up)
 {
        unsigned char status1, status2;
+#ifdef CONFIG_ARM
        unsigned int iersave;
+#endif /* CONFIG_ARM */
 
        up->port.type = PORT_16550A;
        up->capabilities |= UART_CAP_FIFO;
@@ -738,6 +740,11 @@
                return;
        }
 
+       /* We only do this check for ARM build because it seems to
+        * falsely trigger on (some) PCs which breaks things.
+        * Besides, if this is XScale specific why do all platforms
+        * need this code and why is it here? */
+#ifdef CONFIG_ARM
        /*
         * Try writing and reading the UART_IER_UUE bit (b6).
         * If it works, this is probably one of the Xscale platform's
@@ -771,6 +778,7 @@
                DEBUG_AUTOCONF("Couldn't force IER_UUE to 0 ");
        }
        serial_outp(up, UART_IER, iersave);
+#endif /* CONFIG_ARM */
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to