From: Kevin Hilman <khilman@deeprootsystems.com>
To: Alexander Shishkin <virtuoso@slind.org>
Cc: Tony Lindgren <tony@atomide.com>,
linux-omap@vger.kernel.org,
Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Subject: Re: [PATCH] omap: make serial_in_override() address the right uart port
Date: Wed, 06 Jan 2010 16:05:16 -0800 [thread overview]
Message-ID: <87r5q293ur.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1262710660-25376-1-git-send-email-virtuoso@slind.org> (Alexander Shishkin's message of "Tue\, 5 Jan 2010 18\:57\:40 +0200")
Alexander Shishkin <virtuoso@slind.org> writes:
> Commit f62349ee9788b1d94c55eb6c291d74a1f69bdd9e makes it possible to
> have some other than first uart port as ttyS0, which breaks the workaround
> serial_in_override() function which will try to address the first uart
> port (for ttyS0) and not the one that was initialized.
>
> Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
> CC: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
> CC: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/serial.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 19805a7..8c964be 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = {
> }
> };
> #endif
> +static inline unsigned int __serial_read_reg(struct uart_port *up,
> + int offset)
> +{
> + offset <<= up->regshift;
> + return (unsigned int)__raw_readb(up->membase + offset);
> +}
> +
> static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
> int offset)
> {
> @@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset)
> {
> if (UART_RX == offset) {
> unsigned int lsr;
> - lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
> + lsr = __serial_read_reg(up, UART_LSR);
> if (!(lsr & UART_LSR_DR))
> return -EPERM;
> }
> - return serial_read_reg(omap_uart[up->line].p, offset);
> +
> + return __serial_read_reg(up, offset);
> }
>
> void __init omap_serial_early_init(void)
> --
> 1.6.3.3
prev parent reply other threads:[~2010-01-07 0:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 16:57 [PATCH] omap: make serial_in_override() address the right uart port Alexander Shishkin
2010-01-05 18:03 ` Tony Lindgren
2010-01-05 18:09 ` Alexander Shishkin
2010-01-05 18:16 ` Tony Lindgren
2010-01-07 0:05 ` Kevin Hilman [this message]
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=87r5q293ur.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=ext-mika.1.westerberg@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=virtuoso@slind.org \
/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