Skip to contentSkip to conversation

mx53ppd: Change UART clock divider for high baudrate

PATCH New Sebastian Reichel 3 participants 4 messages Feb 15, 2018 – Feb 17, 2018 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx53ppd: Change UART clock divider for high baudrate

From: Rick Bronson <[email protected]>

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.

---
 arch/arm/mach-imx/mx5/lowlevel_init.S | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-imx/mx5/lowlevel_init.S +4 -0
index f5bc6728b7c2..ee4c3afd2fed 100644
@@ -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 */
Signature · 1 line
2.15.1
reviewer
#1 lore raw

PATCH 1/1 mx53ppd: Change UART clock divider for high baudrate

Hi Rick and Sebastian,

Quoted 3 lines · Sebastian Reichel

From: Rick Bronson <[email protected]>

Allow higher UART baud rates for communications to ACHC at 13.5 MBaud

What does ACHC mean?

Quoted 3 lines

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.

Quoted 11 lines
---
 arch/arm/mach-imx/mx5/lowlevel_init.S | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-imx/mx5/lowlevel_init.S +0 -0
index f5bc6728b7c2..ee4c3afd2fed 100644

arch/arm/mach-imx/mx5/lowlevel_init.S setup_pll_func: · line 322

Quoted 4 lines
arch/arm/mach-imx/mx5/lowlevel_init.S +1 -0
@@ -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.

reviewer
#2 lore raw

PATCH 1/1 mx53ppd: Change UART clock divider for high baudrate

In reply to Sebastian Reichel
Quoted 6 lines · Sebastian Reichel

From: Rick Bronson <[email protected]>

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.

Quoted 1 line

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

PATCH 1/1 mx53ppd: Change UART clock divider for high baudrate

It's been ages since I've worked on this, let me refresh my memory and get back to you.

Cheers,

Rick

From: "Fabio Estevam" <[email protected]>
To: "Sebastian Reichel" <[email protected]>
Cc: "Stefano Babic" <[email protected]>, "Fabio Estevam" <[email protected]>, "U-Boot-Denx" <[email protected]>, "Rick Bronson" <[email protected]>
Sent: Saturday, February 17, 2018 9:42:47 AM
Subject: Re: [U-Boot] [PATCHv1] mx53ppd: Change UART clock divider for high baudrate

Quoted 6 lines · Sebastian Reichel

From: Rick Bronson <[email protected]>

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.

Quoted 1 line