diff options
author | Wolfgang Denk <wd@denx.de> | 2008-07-13 14:44:04 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-07-13 14:44:04 +0200 |
commit | 0740ac26f4e590bf5b4e7b9a9886208dc2dacb32 (patch) | |
tree | 5d18fcb91d491f602c17c550af70a9a092b883f8 /drivers | |
parent | af577da58642b81eb94067e3d9e9dc6998cd620d (diff) | |
parent | 47bf9c71ae838305a3ea3161af8d14e6f3fc2c82 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/mcfuart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c index 88f3eb10abf..5eb4f458f81 100644 --- a/drivers/serial/mcfuart.c +++ b/drivers/serial/mcfuart.c @@ -63,8 +63,8 @@ int serial_init(void) uart->umr = UART_UMR_SB_STOP_BITS_1; /* Setting up BaudRate */ - counter = (u32) (gd->bus_clk / (gd->baudrate)); - counter >>= 5; + counter = (u32) ((gd->bus_clk / 32) + (gd->baudrate / 2)); + counter = counter / gd->baudrate; /* write to CTUR: divide counter upper byte */ uart->ubg1 = (u8) ((counter & 0xff00) >> 8); |