diff options
author | Tom Rini <trini@konsulko.com> | 2015-04-29 10:46:33 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-04-29 10:46:33 (GMT) |
commit | ace97d26176a3ebc9ec07738450de93eea35975c (patch) | |
tree | 7de5b3cdc2f269ae1426540ae9f74b420423f132 /drivers/serial | |
parent | 1692515e51a190b2ad1e2c54fdaa15fbb8387ba7 (diff) | |
parent | 5ca269a4df21a7e326eb3b3f7788177d064fe782 (diff) | |
download | u-boot-ace97d26176a3ebc9ec07738450de93eea35975c.tar.xz |
Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial_zynq.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index 3e2b8dc..9278763 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -48,10 +48,16 @@ static void uart_zynq_serial_setbrg(const int port) /* Calculation results. */ unsigned int calc_bauderror, bdiv, bgen; unsigned long calc_baud = 0; - unsigned long baud = gd->baudrate; + unsigned long baud; unsigned long clock = get_uart_clk(port); struct uart_zynq *regs = uart_zynq_ports[port]; + /* Covering case where input clock is so slow */ + if (clock < 1000000 && gd->baudrate > 4800) + gd->baudrate = 4800; + + baud = gd->baudrate; + /* master clock * Baud rate = ------------------ * bgen * (bdiv + 1) |