[U-Boot] [PATCHv1] mx53ppd: Change UART clock divider for high baudrate

From: Rick Bronson rick@efn.org
Allow higher UART baud rates for communications to ACHC at 13.5 MBaud Done in u-boot since it changes a divider common to all UARTs, including the console. If it were done in Linux we would get garbled characters during the handoff from u-boot to the kernel.
Signed-off-by: Sebastian Reichel sebastian.reichel@collabora.co.uk --- arch/arm/mach-imx/mx5/lowlevel_init.S | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-imx/mx5/lowlevel_init.S b/arch/arm/mach-imx/mx5/lowlevel_init.S index f5bc6728b7c2..ee4c3afd2fed 100644 --- a/arch/arm/mach-imx/mx5/lowlevel_init.S +++ b/arch/arm/mach-imx/mx5/lowlevel_init.S @@ -319,11 +319,13 @@ setup_pll_func: ldr r1, =0x00016154 str r1, [r0, #CLKCTL_CBCMR]
+#if !defined(CONFIG_TARGET_MX53PPD) /*change uart clk parent to pll2*/ ldr r1, [r0, #CLKCTL_CSCMR1] and r1, r1, #0xfcffffff orr r1, r1, #0x01000000 str r1, [r0, #CLKCTL_CSCMR1] +#endif
/* make sure change is effective */ 1: ldr r1, [r0, #CLKCTL_CDHIPR] @@ -350,7 +352,9 @@ setup_pll_func: /* make uart div=6 */ ldr r1, [r0, #CLKCTL_CSCDR1] and r1, r1, #0xffffffc0 +#if !defined(CONFIG_TARGET_MX53PPD) orr r1, r1, #0x0a +#endif str r1, [r0, #CLKCTL_CSCDR1]
/* Restore the default values in the Gate registers */

Hi Rick and Sebastian,
On Thu, Feb 15, 2018 at 2:15 PM, Sebastian Reichel sebastian.reichel@collabora.co.uk wrote:
From: Rick Bronson rick@efn.org
Allow higher UART baud rates for communications to ACHC at 13.5 MBaud
What does ACHC mean?
Done in u-boot since it changes a divider common to all UARTs, including the console. If it were done in Linux we would get garbled characters during the handoff from u-boot to the kernel.
It would be nice to explain a bit how you achieve the higher baud rates.
Looks like you don't use PLL2 as the UART clock anyomore.
Please expland a bit further on the new UART clock sheme.
Signed-off-by: Sebastian Reichel sebastian.reichel@collabora.co.uk
arch/arm/mach-imx/mx5/lowlevel_init.S | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-imx/mx5/lowlevel_init.S b/arch/arm/mach-imx/mx5/lowlevel_init.S index f5bc6728b7c2..ee4c3afd2fed 100644 --- a/arch/arm/mach-imx/mx5/lowlevel_init.S +++ b/arch/arm/mach-imx/mx5/lowlevel_init.S @@ -319,11 +319,13 @@ setup_pll_func: ldr r1, =0x00016154 str r1, [r0, #CLKCTL_CBCMR]
+#if !defined(CONFIG_TARGET_MX53PPD)
It would be better if this option could be a generic one, something like CONFIG_MX53_SERIAL_HIGHBAUD, so that other boads could use it if needed.

On Thu, Feb 15, 2018 at 2:15 PM, Sebastian Reichel sebastian.reichel@collabora.co.uk wrote:
From: Rick Bronson rick@efn.org
Allow higher UART baud rates for communications to ACHC at 13.5 MBaud Done in u-boot since it changes a divider common to all UARTs, including the console. If it were done in Linux we would get garbled characters during the handoff from u-boot to the kernel.
A Signed-off-by from Rick is missing here.
Signed-off-by: Sebastian Reichel sebastian.reichel@collabora.co.uk
participants (2)
-
Fabio Estevam
-
Sebastian Reichel