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 | 886f08469908dd3b64824d48c28d893115e029ea (patch) | |
| tree | 4098d1b84e7ea62d4ba8017d34605cd40aa4bcff | |
| parent | a9d1d4d72a10bc31eeb7dbaefcd835680d4d4e56 (diff) | |
| download | meta-freescale-886f08469908dd3b64824d48c28d893115e029ea.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-- | meta-fsl-arm/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch | 55 | ||||
| -rw-r--r-- | meta-fsl-arm/recipes-bsp/u-boot/u-boot_git.bb | 5 |
2 files changed, 59 insertions, 1 deletions
diff --git a/meta-fsl-arm/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch b/meta-fsl-arm/recipes-bsp/u-boot/u-boot/mx53-fix-uart-clock.patch new file mode 100644 index 000000000..7d4f6bc0e --- /dev/null +++ b/meta-fsl-arm/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/meta-fsl-arm/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-arm/recipes-bsp/u-boot/u-boot_git.bb index 0255af7f0..46a3fb313 100644 --- a/meta-fsl-arm/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-arm/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 | ||
