From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
Alexander Shishkin <virtuoso@slind.org>,
linux-omap@vger.kernel.org,
Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Subject: [PATCH 07/12] omap2/3: make serial_in_override() address the right uart port
Date: Wed, 06 Jan 2010 16:19:57 -0800 [thread overview]
Message-ID: <20100107001957.21352.16506.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100107001728.21352.38471.stgit@baageli.muru.com>
From: Alexander Shishkin <virtuoso@slind.org>
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>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.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)
next prev parent reply other threads:[~2010-01-07 0:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 0:18 [PATCH 00/12] Omap fixes for 2.6.33-rc3 Tony Lindgren
2010-01-07 0:18 ` [PATCH 01/12] omap: McBSP: Fix possible port lockout Tony Lindgren
2010-01-08 17:14 ` Sergei Shtylyov
2010-01-10 19:55 ` Janusz Krzysztofik
2010-01-07 0:18 ` [PATCH 02/12] omap: gpio: Simultaneously requested rising and falling edge Tony Lindgren
2010-01-07 0:19 ` [PATCH 03/12] omap: &&/|| confusion in iommu_put() Tony Lindgren
2010-01-07 0:19 ` [PATCH 04/12] omap: Remove uninitialized warning for gpio.c Tony Lindgren
2010-01-07 0:19 ` [PATCH 05/12] omap1: Add 7xx clocks and pin muxes for SPI Tony Lindgren
2010-01-07 9:46 ` Grazvydas Ignotas
2010-01-07 19:15 ` Tony Lindgren
2010-01-09 18:02 ` Cory Maccarrone
2010-01-07 0:19 ` [PATCH 06/12] omap1: Fix compile for omap1_bl.c Tony Lindgren
2010-01-07 0:19 ` Tony Lindgren [this message]
2010-01-07 0:20 ` [PATCH 08/12] omap2/3: ZOOM: Correcting key mapping for few keys Tony Lindgren
2010-01-07 0:20 ` [PATCH 09/12] omap3: add missing parentheses Tony Lindgren
2010-01-07 0:20 ` [PATCH 10/12] " Tony Lindgren
2010-01-07 0:20 ` [PATCH 11/12] omap3: Fix booting if package is uninitialized Tony Lindgren
2010-01-07 0:20 ` [PATCH 12/12] omap3: EVM: Choose OMAP_PACKAGE_CBB Tony Lindgren
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=20100107001957.21352.16506.stgit@baageli.muru.com \
--to=tony@atomide.com \
--cc=ext-mika.1.westerberg@nokia.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--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