All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix for 8250.c *wrongly* detecting XScale UART(s) on x86 PC
@ 2005-03-06  9:33 Chris Wedgwood
  2005-03-06 10:19 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wedgwood @ 2005-03-06  9:33 UTC (permalink / raw)
  To: Russell King; +Cc: linux-serial, LKML

Russell,

> 1.2073.10.1 05/03/04 21:19:20 gtj.member@com.rmk.(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 */
 }
 
 /*

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-06 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06  9:33 [PATCH] fix for 8250.c *wrongly* detecting XScale UART(s) on x86 PC Chris Wedgwood
2005-03-06 10:19 ` Russell King
2005-03-06 10:54   ` Chris Wedgwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.