Skip to contentSkip to conversation

serial_mxc: Remove unconditional DCE setting

PATCH New Breno Lima 4 participants 4 messages Jul 20, 2016 – Jul 21, 2016

lore
Share & tools
lore

Breno Lima

author
#0 lore raw

PATCH 1/1 serial_mxc: Remove unconditional DCE setting

Commit 83fd908f28c ("dm: imx: serial: Support DTE mode when using driver model") breaks the serial output for the imx boards that do not use the serial driver model.

The reason for the breakage is that it's setting UFCR_DCEDTE unconditionally for the non-dm case.

So keep the original behavior by removing UFCR_DCEDTE setting in the non-dm case.

Tested on mx7sabresd and mx6wandboard.

---
 drivers/serial/serial_mxc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/serial/serial_mxc.c +0 -1
index 1960bbc..8545714 100644
@@ -151,7 +151,6 @@ static void mxc_serial_setbrg(void)
 	__REG(UART_PHYS + UFCR) = (RFDIV << UFCR_RFDIV_SHF)
 		| (TXTL << UFCR_TXTL_SHF)
 		| (RXTL << UFCR_RXTL_SHF);
-	__REG(UART_PHYS + UFCR) |= UFCR_DCEDTE;
 	__REG(UART_PHYS + UBIR) = 0xf;
 	__REG(UART_PHYS + UBMR) = clk / (2 * gd->baudrate);
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 serial_mxc: Remove unconditional DCE setting

Quoted 6 lines · Breno Lima

Commit 83fd908f28c ("dm: imx: serial: Support DTE mode when using driver model") breaks the serial output for the imx boards that do not use the serial driver model.

The reason for the breakage is that it's setting UFCR_DCEDTE unconditionally for the non-dm case.

Uh yes, that wasn't intentionally and slipped through review! I meant to add DTE support only in the dm case. Sorry about that.

Quoted 23 lines

So keep the original behavior by removing UFCR_DCEDTE setting in the non-dm case.

Tested on mx7sabresd and mx6wandboard.

---
 drivers/serial/serial_mxc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/serial/serial_mxc.c +0 -1
index 1960bbc..8545714 100644
@@ -151,7 +151,6 @@ static void mxc_serial_setbrg(void)
 	__REG(UART_PHYS + UFCR) = (RFDIV << UFCR_RFDIV_SHF)
 		| (TXTL << UFCR_TXTL_SHF)
 		| (RXTL << UFCR_RXTL_SHF);
-	__REG(UART_PHYS + UFCR) |= UFCR_DCEDTE;
 	__REG(UART_PHYS + UBIR) = 0xf;
 	__REG(UART_PHYS + UBMR) = clk / (2 * gd->baudrate);
 
#2 lore raw

PATCH 1/1 serial_mxc: Remove unconditional DCE setting

Hi Breno, Stefan,

Am 20.07.2016 um 21:44 schrieb Stefan Agner:

Quoted 11 lines · Breno Lima
Quoted 6 lines

Commit 83fd908f28c ("dm: imx: serial: Support DTE mode when using driver model") breaks the serial output for the imx boards that do not use the serial driver model.

The reason for the breakage is that it's setting UFCR_DCEDTE unconditionally for the non-dm case.

Uh yes, that wasn't intentionally and slipped through review! I meant to add DTE support only in the dm case. Sorry about that.

Right, I apply this before sending my PR to Tom.

Best regards,
Stefano Babic

Quoted 23 lines
Quoted 23 lines

So keep the original behavior by removing UFCR_DCEDTE setting in the non-dm case.

Tested on mx7sabresd and mx6wandboard.

---
 drivers/serial/serial_mxc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/serial/serial_mxc.c +0 -1
index 1960bbc..8545714 100644
@@ -151,7 +151,6 @@ static void mxc_serial_setbrg(void)
 	__REG(UART_PHYS + UFCR) = (RFDIV << UFCR_RFDIV_SHF)
 		| (TXTL << UFCR_TXTL_SHF)
 		| (RXTL << UFCR_RXTL_SHF);
-	__REG(UART_PHYS + UFCR) |= UFCR_DCEDTE;
 	__REG(UART_PHYS + UBIR) = 0xf;
 	__REG(UART_PHYS + UBMR) = clk / (2 * gd->baudrate);
 
#3 lore raw

PATCH 1/1 serial_mxc: Remove unconditional DCE setting

In reply to Breno Lima
Quoted 7 lines · Breno Lima

Commit 83fd908f28c ("dm: imx: serial: Support DTE mode when using driver model") breaks the serial output for the imx boards that do not use the serial driver model.

The reason for the breakage is that it's setting UFCR_DCEDTE unconditionally for the non-dm case.

Quoted 6 lines

So keep the original behavior by removing UFCR_DCEDTE setting in the non-dm case.

Tested on mx7sabresd and mx6wandboard.

Thanks for the fix: