* [PATCH] imx: bit &/| confusion
@ 2009-11-21 15:15 ` Roel Kluin
0 siblings, 0 replies; 2+ messages in thread
From: Roel Kluin @ 2009-11-21 15:15 UTC (permalink / raw)
To: linux-arm-kernel
since UCR1_UARTEN is defined 1, the port was always treated as enabled.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 18130f1..60d665a 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1088,7 +1088,7 @@ imx_console_get_options(struct imx_port *sport, int *baud,
int *parity, int *bits)
{
- if ( readl(sport->port.membase + UCR1) | UCR1_UARTEN ) {
+ if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) {
/* ok, the port was enabled */
unsigned int ucr2, ubir,ubmr, uartclk;
unsigned int baud_raw;
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] imx: bit &/| confusion
@ 2009-11-21 15:15 ` Roel Kluin
0 siblings, 0 replies; 2+ messages in thread
From: Roel Kluin @ 2009-11-21 15:15 UTC (permalink / raw)
To: Andrew Morton, LKML, kernel, linux-arm-kernel
since UCR1_UARTEN is defined 1, the port was always treated as enabled.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 18130f1..60d665a 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1088,7 +1088,7 @@ imx_console_get_options(struct imx_port *sport, int *baud,
int *parity, int *bits)
{
- if ( readl(sport->port.membase + UCR1) | UCR1_UARTEN ) {
+ if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) {
/* ok, the port was enabled */
unsigned int ucr2, ubir,ubmr, uartclk;
unsigned int baud_raw;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-21 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-21 15:15 [PATCH] imx: bit &/| confusion Roel Kluin
2009-11-21 15:15 ` Roel Kluin
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.