diff options
author | Wolfgang Denk <wd@denx.de> | 2008-07-13 14:44:12 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-07-13 14:44:12 +0200 |
commit | c90d115913a921c7548ad6eaaa0e13d4f484334c (patch) | |
tree | 324cbb51ec8d0e8047bbce13d5f9900da2db1cbe /drivers/serial/mcfuart.c | |
parent | dc42c7c08000f97651b763ab5b614e5f74c443ee (diff) | |
parent | 0740ac26f4e590bf5b4e7b9a9886208dc2dacb32 (diff) | |
download | u-boot-imx-c90d115913a921c7548ad6eaaa0e13d4f484334c.zip u-boot-imx-c90d115913a921c7548ad6eaaa0e13d4f484334c.tar.gz u-boot-imx-c90d115913a921c7548ad6eaaa0e13d4f484334c.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'drivers/serial/mcfuart.c')
-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 88f3eb1..5eb4f45 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); |