summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial.c b/drivers/serial.c
index 5e2115e24b2..36d0e6e1f69 100644
--- a/drivers/serial.c
+++ b/drivers/serial.c
@@ -46,7 +46,8 @@ int serial_init (void)
{
DECLARE_GLOBAL_DATA_PTR;
- int clock_divisor = CFG_NS16550_CLK / 16 / gd->baudrate;
+ int clock_divisor = (CFG_NS16550_CLK + gd->baudrate * 8 )
+ / (gd->baudrate * 16);
#ifdef CFG_NS87308
initialise_ns87308();