diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2010-12-13 11:53:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-14 15:15:06 +0100 |
commit | 8dc537022ef42fe9b7ce4bd62cf2956c481caca3 (patch) | |
tree | 7bc6c7602112acd0c1e1df4eec10d5c7fefc25f6 /drivers/serial/stm-serial.c | |
parent | f3d7fe0673b2bc7d187cc5bb7953bd6c3a0ac85c (diff) | |
download | barebox-8dc537022ef42fe9b7ce4bd62cf2956c481caca3.tar.gz barebox-8dc537022ef42fe9b7ce4bd62cf2956c481caca3.tar.xz |
STM378x: Use Hz as the clock unit like in all other arch
i.MX23 currently uses kHz as the unit for its clock handling and calculation
to avoid overflows when calculation with the internal 480 MHz PLL and its
fractional divider. This patch changes all routines to accept Hz and deliver
Hz as the clock unit.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial/stm-serial.c')
-rw-r--r-- | drivers/serial/stm-serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/stm-serial.c b/drivers/serial/stm-serial.c index 90563f599e..3edd484b4f 100644 --- a/drivers/serial/stm-serial.c +++ b/drivers/serial/stm-serial.c @@ -108,7 +108,7 @@ static int stm_serial_setbaudrate(struct console_device *cdev, int new_baudrate) writel(0, dev->map_base + UARTDBGCR); /* Calculate and set baudrate */ - quot = (imx_get_xclk() * 4000) / new_baudrate; + quot = (imx_get_xclk() * 4) / new_baudrate; writel(quot & 0x3f, dev->map_base + UARTDBGFBRD); writel(quot >> 6, dev->map_base + UARTDBGIBRD); |