[U-Boot] [PATCH 12/16] Blackfin: Bf60x: initcode: set up uart baud properly
Bob Liu
lliubbo at gmail.com
Tue Aug 7 10:07:51 CEST 2012
From: Sonic Zhang <sonic.zhang at analog.com>
Set up uart baud properly for booting u-boot over UART
Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
Signed-off-by: Bob Liu <lliubbo at gmail.com>
---
arch/blackfin/cpu/initcode.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index 3bb2b98..3197c40 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -433,7 +433,9 @@ program_early_devices(ADI_BOOT_DATA *bs, uint *sdivB, uint *divB, uint *vcoB)
if (BFIN_DEBUG_EARLY_SERIAL || CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART) {
serial_putc('b');
#ifdef __ADSPBF60x__
-
+ *sdivB = bfin_read_CGU_DIV();
+ *sdivB = ((*sdivB >> 8) & 0x1f) * ((*sdivB >> 5) & 0x7);
+ *vcoB = (bfin_read_CGU_CTL() >> 8) & 0x7f;
#else
*sdivB = bfin_read_PLL_DIV() & 0xf;
*vcoB = (bfin_read_PLL_CTL() >> 9) & 0x3f;
@@ -701,7 +703,9 @@ update_serial_clocks(ADI_BOOT_DATA *bs, uint sdivB, uint divB, uint vcoB)
serial_putc('b');
unsigned int sdivR, vcoR;
#ifdef __ADSPBF60x__
-
+ sdivR = bfin_read_CGU_DIV();
+ sdivR = ((sdivR >> 8) & 0x1f) * ((sdivR >> 5) & 0x7);
+ vcoR = (bfin_read_CGU_CTL() >> 8) & 0x7f;
#else
sdivR = bfin_read_PLL_DIV() & 0xf;
vcoR = (bfin_read_PLL_CTL() >> 9) & 0x3f;
--
1.7.9.5
More information about the U-Boot
mailing list