Skip to content
Snippets Groups Projects
Commit 57d3e98f authored by Jagan Teki's avatar Jagan Teki Committed by Stefano Babic
Browse files

serial: mxc: Move cr1 and cr2 write to mxc_serial_setbrg


Control reg write should be part of setbrg for better
buadrate generation, so move cr1 and cr2 write to
mxc_serial_setbrg

Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 62af03ee
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,9 @@ static void mxc_serial_setbrg(void) ...@@ -162,6 +162,9 @@ static void mxc_serial_setbrg(void)
writel(0xf, &mxc_base->bir); writel(0xf, &mxc_base->bir);
writel(clk / (2 * gd->baudrate), &mxc_base->bmr); writel(clk / (2 * gd->baudrate), &mxc_base->bmr);
writel(UCR2_WS | UCR2_IRTS | UCR2_RXEN | UCR2_TXEN | UCR2_SRST,
&mxc_base->cr2);
writel(UCR1_UARTEN, &mxc_base->cr1);
} }
static int mxc_serial_getc(void) static int mxc_serial_getc(void)
...@@ -216,11 +219,6 @@ static int mxc_serial_init(void) ...@@ -216,11 +219,6 @@ static int mxc_serial_init(void)
serial_setbrg(); serial_setbrg();
writel(UCR2_WS | UCR2_IRTS | UCR2_RXEN | UCR2_TXEN | UCR2_SRST,
&mxc_base->cr2);
writel(UCR1_UARTEN, &mxc_base->cr1);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment