diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-07-11 11:29:04 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-07-22 11:44:25 (GMT) |
commit | 5b9587ae31e26c5d6fd04ff0ef8cd7541b5abf56 (patch) | |
tree | b0423559f0b560a8dd0109a6f89e832e7a9934f6 /drivers | |
parent | f8c7c2033df1f8aa1cd329292f01e87972d84535 (diff) | |
download | u-boot-fsl-qoriq-5b9587ae31e26c5d6fd04ff0ef8cd7541b5abf56.tar.xz |
serial: ns16550: use a const variable instead of macro
Just for type checking.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/serial_ns16550.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 49e2c1f..4413e69 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -120,6 +120,8 @@ static NS16550_t serial_ports[6] = { static int calc_divisor (NS16550_t port) { + const unsigned int mode_x_div = 16; + #ifdef CONFIG_OMAP1510 /* If can't cleanly clock 115200 set div to 1 */ if ((CONFIG_SYS_NS16550_CLK == 12000000) && (gd->baudrate == 115200)) { @@ -129,10 +131,8 @@ static int calc_divisor (NS16550_t port) port->osc_12m_sel = 0; /* clear if previsouly set */ #endif -#define MODE_X_DIV 16 - return DIV_ROUND_CLOSEST(CONFIG_SYS_NS16550_CLK, - MODE_X_DIV * gd->baudrate); + mode_x_div * gd->baudrate); } void |