summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-03-21 17:15:22 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2012-03-21 17:17:16 +0000
commitcb5755268d2bbe26ed09c7a669535b35dda6194b (patch)
tree69ad1ae5764fd075fb63bba82612df58e0048933
parent2c60ad9008e160a603c0e8c8b7b78083a3df7b8b (diff)
downloadmeta-fsl-arm-cb5755268d2bbe26ed09c7a669535b35dda6194b.tar.gz
u-boot: fix UART clock setting for mx53
Change the parent UART clock to be PLL2, so that U-boot can also boot a Freescale 2.6.35 kernel for mx53. FSL kernel and U-boot changed the UART parent from PLL3 to PLL2 to avoid conflicts with IPU clocks, so that the video resolution can be changed without affecting the UART clock. On a 2.6.35 kernel the serial console is messed up after IPU driver is loaded and this patch fixes this problem. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
-rw-r--r--recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch55
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bb5
2 files changed, 59 insertions, 1 deletions
diff --git a/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch b/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch
new file mode 100644
index 0000000..7d4f6bc
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch
@@ -0,0 +1,55 @@
1Change the parent UART clock to be PLL2, so that U-boot can also boot
2a Freescale 2.6.35 kernel for mx53.
3
4FSL kernel and U-boot changed the UART parent from PLL3 to PLL2 to avoid
5conflicts with IPU clocks, so that the video resolution can be changed
6without affecting the UART clock.
7
8On a 2.6.35 kernel the serial console is messed up after IPU driver is loaded
9and this patch fixes this problem.
10
11Tested on a mx53loco board booting a FSL kernel and also a mainline kernel.
12
13Upstream-Status: Submitted [under review]
14
15Reported-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
17---
18 arch/arm/cpu/armv7/mx5/lowlevel_init.S | 20 +++++++++++++++++---
19 1 files changed, 17 insertions(+), 3 deletions(-)
20
21diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
22index 01f6d75..90c6ec1 100644
23--- a/arch/arm/cpu/armv7/mx5/lowlevel_init.S
24+++ b/arch/arm/cpu/armv7/mx5/lowlevel_init.S
25@@ -284,10 +284,24 @@
26 ldr r1, =0x00C30321
27 str r1, [r0, #CLKCTL_CSCDR1]
28 #elif defined(CONFIG_MX53)
29+ /* Switch peripheral to PLL2 */
30+ ldr r0, =CCM_BASE_ADDR
31+ ldr r1, =0x00808145
32+ orr r1, r1, #(2 << 10)
33+ orr r1, r1, #(0 << 16)
34+ orr r1, r1, #(1 << 19)
35+ str r1, [r0, #CLKCTL_CBCDR]
36+
37+ ldr r1, =0x00016154
38+ str r1, [r0, #CLKCTL_CBCMR]
39+ /* Change uart clk parent to pll2*/
40+ ldr r1, [r0, #CLKCTL_CSCMR1]
41+ and r1, r1, #0xfcffffff
42+ orr r1, r1, #0x01000000
43+ str r1, [r0, #CLKCTL_CSCMR1]
44 ldr r1, [r0, #CLKCTL_CSCDR1]
45- orr r1, r1, #0x3f
46- eor r1, r1, #0x3f
47- orr r1, r1, #0x21
48+ and r1, r1, #0xffffffc0
49+ orr r1, r1, #0x0a
50 str r1, [r0, #CLKCTL_CSCDR1]
51 #endif
52 /* make sure divider effective */
53--
541.7.1
55
diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb
index 0255af7..46a3fb3 100644
--- a/recipes-bsp/u-boot/u-boot_git.bb
+++ b/recipes-bsp/u-boot/u-boot_git.bb
@@ -6,11 +6,14 @@ COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)"
6 6
7DEPENDS_mxs += "elftosb-native" 7DEPENDS_mxs += "elftosb-native"
8 8
9PR = "r1"
10
9SRCREV = "6751b05f855bbe56005d5b88d4eb58bcd52170d2" 11SRCREV = "6751b05f855bbe56005d5b88d4eb58bcd52170d2"
10 12
11PV = "v2011.12+git" 13PV = "v2011.12+git"
12 14
13SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git" 15SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git \
16 file://mx53-fix-uart-clock.patch"
14 17
15S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
16 19