diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-11-30 17:39:32 +0800 |
---|---|---|
committer | Sonic Zhang <sonic.zhang@analog.com> | 2013-05-13 15:47:24 +0800 |
commit | ab80b6595765a01f774ad2a29fde8b0c325533ac (patch) | |
tree | e3a907850eeec378960e52494c7940742f021461 /arch/blackfin/cpu/serial1.h | |
parent | 79f2b3992f52334b510214c6b1b60c4200133658 (diff) | |
download | u-boot-imx-ab80b6595765a01f774ad2a29fde8b0c325533ac.zip u-boot-imx-ab80b6595765a01f774ad2a29fde8b0c325533ac.tar.gz u-boot-imx-ab80b6595765a01f774ad2a29fde8b0c325533ac.tar.bz2 |
blackfin: Correct early serial mess output in BYPASS boot mode.
The early serial should not be configured again in initcode() for BYPASS
boot mode and in start() for the other LDR boot modes.
In BYPASS boot mode, the start up code is located in Nor flash address other
than the DRAM address defined in link script. The code embedded string can't
be addressed by its compile time symbol. Calculate it according to the flash
offset.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Diffstat (limited to 'arch/blackfin/cpu/serial1.h')
-rw-r--r-- | arch/blackfin/cpu/serial1.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/blackfin/cpu/serial1.h b/arch/blackfin/cpu/serial1.h index 52f1c62..467d381 100644 --- a/arch/blackfin/cpu/serial1.h +++ b/arch/blackfin/cpu/serial1.h @@ -287,8 +287,13 @@ static inline void serial_early_set_baud(uint32_t uart_base, uint32_t baud) * weird multiplication is to make sure we over sample just * a little rather than under sample the incoming signals. */ +#if CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS + uint16_t divisor = (early_get_uart_clk() + baud * 8) / (baud * 16) + - ANOMALY_05000230; +#else uint16_t divisor = early_division(early_get_uart_clk() + (baud * 8), baud * 16) - ANOMALY_05000230; +#endif serial_set_divisor(uart_base, divisor); } |