Skip to contentSkip to conversation

imx: bit &/| confusion

PATCH New Roel Kluin 1 participant 1 message Nov 21, 2009 Arm i.MX and Layerscape

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 imx: bit &/| confusion

since UCR1_UARTEN is defined 1, the port was always treated as enabled.

---

drivers/serial/imx.c +1 -1
index 18130f1..60d665a 100644
@@ -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;