diff mbox

[U-Boot] serial_mxc: Remove unconditional DCE setting

Message ID 1469043274-1816-1-git-send-email-breno.lima@nxp.com
State Accepted
Commit 5d219d46aa6763639eeac5f08813ed4dc6982728
Delegated to: Stefano Babic
Headers show

Commit Message

Breno Matheus Lima July 20, 2016, 7:34 p.m. UTC
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.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 drivers/serial/serial_mxc.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Stefan Agner July 20, 2016, 7:44 p.m. UTC | #1
On 20.07.2016 12:34, Breno Lima wrote:
> 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.

Acked-by: Stefan Agner <stefan.agner@toradex.com>

>
> So keep the original behavior by removing UFCR_DCEDTE setting in the
> non-dm case.
>
> Tested on mx7sabresd and mx6wandboard.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  drivers/serial/serial_mxc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
> index 1960bbc..8545714 100644
> --- a/drivers/serial/serial_mxc.c
> +++ b/drivers/serial/serial_mxc.c
> @@ -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);
>
Fabio Estevam July 20, 2016, 8:19 p.m. UTC | #2
On Wed, Jul 20, 2016 at 4:34 PM, Breno Lima <breno.lima@nxp.com> wrote:
> 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.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Thanks for the fix:

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Stefano Babic July 21, 2016, 8:46 a.m. UTC | #3
Hi Breno, Stefan,

Am 20.07.2016 um 21:44 schrieb Stefan Agner:
> On 20.07.2016 12:34, Breno Lima wrote:
>> 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.
>
> Acked-by: Stefan Agner <stefan.agner@toradex.com>

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

Best regards,
Stefano Babic

>
>> So keep the original behavior by removing UFCR_DCEDTE setting in the
>> non-dm case.
>>
>> Tested on mx7sabresd and mx6wandboard.
>>
>> Signed-off-by: Breno Lima <breno.lima@nxp.com>
>> ---
>>  drivers/serial/serial_mxc.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
>> index 1960bbc..8545714 100644
>> --- a/drivers/serial/serial_mxc.c
>> +++ b/drivers/serial/serial_mxc.c
>> @@ -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);
>>
diff mbox

Patch

diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 1960bbc..8545714 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -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);