diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2012-03-21 17:15:22 +0000 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2012-03-21 17:17:16 +0000 |
commit | cb5755268d2bbe26ed09c7a669535b35dda6194b (patch) | |
tree | 69ad1ae5764fd075fb63bba82612df58e0048933 | |
parent | 2c60ad9008e160a603c0e8c8b7b78083a3df7b8b (diff) | |
download | meta-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.patch | 55 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot_git.bb | 5 |
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 @@ | |||
1 | Change the parent UART clock to be PLL2, so that U-boot can also boot | ||
2 | a Freescale 2.6.35 kernel for mx53. | ||
3 | |||
4 | FSL kernel and U-boot changed the UART parent from PLL3 to PLL2 to avoid | ||
5 | conflicts with IPU clocks, so that the video resolution can be changed | ||
6 | without affecting the UART clock. | ||
7 | |||
8 | On a 2.6.35 kernel the serial console is messed up after IPU driver is loaded | ||
9 | and this patch fixes this problem. | ||
10 | |||
11 | Tested on a mx53loco board booting a FSL kernel and also a mainline kernel. | ||
12 | |||
13 | Upstream-Status: Submitted [under review] | ||
14 | |||
15 | Reported-by: Otavio Salvador <otavio@ossystems.com.br> | ||
16 | Signed-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 | |||
21 | diff --git a/arch/arm/cpu/armv7/mx5/lowlevel_init.S b/arch/arm/cpu/armv7/mx5/lowlevel_init.S | ||
22 | index 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 | -- | ||
54 | 1.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 | ||
7 | DEPENDS_mxs += "elftosb-native" | 7 | DEPENDS_mxs += "elftosb-native" |
8 | 8 | ||
9 | PR = "r1" | ||
10 | |||
9 | SRCREV = "6751b05f855bbe56005d5b88d4eb58bcd52170d2" | 11 | SRCREV = "6751b05f855bbe56005d5b88d4eb58bcd52170d2" |
10 | 12 | ||
11 | PV = "v2011.12+git" | 13 | PV = "v2011.12+git" |
12 | 14 | ||
13 | SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git" | 15 | SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git \ |
16 | file://mx53-fix-uart-clock.patch" | ||
14 | 17 | ||
15 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
16 | 19 | ||