diff options
author | Wolfgang Denk <wd@denx.de> | 2008-11-01 15:59:35 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-11-01 15:59:35 +0100 |
commit | 4cc64742a89e8ce90c69c3c85e4e9f4706062f2f (patch) | |
tree | 38caa914ea08118a0613f3579790b2b76c217bb2 /cpu/blackfin/serial.h | |
parent | 7c84fe6a06dad9f793ed85b39b1e6c11a7882f5c (diff) | |
parent | f177f4250c729727b1629fa8d8d6556c999e9b8c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-blackfin
Diffstat (limited to 'cpu/blackfin/serial.h')
-rw-r--r-- | cpu/blackfin/serial.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu/blackfin/serial.h b/cpu/blackfin/serial.h index 1f0f4b46c7..ec40c266ac 100644 --- a/cpu/blackfin/serial.h +++ b/cpu/blackfin/serial.h @@ -175,11 +175,11 @@ static inline uint32_t serial_early_get_baud(void) __attribute__((always_inline)) static inline void serial_early_set_baud(uint32_t baud) { - /* Translate from baud into divisor in terms of SCLK. - * The +1 is to make sure we over sample just a little - * rather than under sample the incoming signals. + /* Translate from baud into divisor in terms of SCLK. The + * weird multiplication is to make sure we over sample just + * a little rather than under sample the incoming signals. */ - uint16_t divisor = (get_sclk() / (baud * 16)) + 1; + uint16_t divisor = (get_sclk() + (baud * 8)) / (baud * 16) - ANOMALY_05000230; /* Set DLAB in LCR to Access DLL and DLH */ ACCESS_LATCH(); |