From: Chris Wedgwood <cw@f00f.org>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix for 8250.c *wrongly* detecting XScale UART(s) on x86 PC
Date: Sun, 6 Mar 2005 01:33:21 -0800 [thread overview]
Message-ID: <20050306093321.GA3040@taniwha.stupidest.org> (raw)
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 */
}
/*
next reply other threads:[~2005-03-06 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 9:33 Chris Wedgwood [this message]
2005-03-06 10:19 ` [PATCH] fix for 8250.c *wrongly* detecting XScale UART(s) on x86 PC Russell King
2005-03-06 10:54 ` Chris Wedgwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050306093321.GA3040@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox