summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-30 12:11:14 +0900
committerMasahiro Yamada <yamada.m@jp.panasonic.com>2014-11-12 00:14:30 +0900
commit325b708a61fdbfca7be169f442a4b50b6d8180f5 (patch)
treeb43475274d526b6306479392f580d5005267dd4f /drivers
parent9906090f527153afddc5aa64d37cb5f89c6ee129 (diff)
downloadu-boot-imx-325b708a61fdbfca7be169f442a4b50b6d8180f5.zip
u-boot-imx-325b708a61fdbfca7be169f442a4b50b6d8180f5.tar.gz
u-boot-imx-325b708a61fdbfca7be169f442a4b50b6d8180f5.tar.bz2
serial: UniPhier: borrow macros from linux/serial_reg.h
The same bit-field macros are defined in include/linux/serial_reg.h so let's include it and delete duplicated defines. Also, remove unnecessary inclusion of <common.h>. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial_uniphier.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index 3f3d415..6046efb 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -5,7 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
+#include <linux/serial_reg.h>
#include <asm/io.h>
#include <asm/errno.h>
#include <dm/device.h>
@@ -37,17 +37,6 @@ struct uniphier_serial {
#define thr rbr
-/*
- * These are the definitions for the Line Control Register
- */
-#define UART_LCR_WLS_8 0x03 /* 8 bit character length */
-
-/*
- * These are the definitions for the Line Status Register
- */
-#define UART_LSR_DR 0x01 /* Data ready */
-#define UART_LSR_THRE 0x20 /* Xmit holding register empty */
-
struct uniphier_serial_private_data {
struct uniphier_serial __iomem *membase;
};
@@ -62,7 +51,7 @@ static int uniphier_serial_setbrg(struct udevice *dev, int baudrate)
const unsigned int mode_x_div = 16;
unsigned int divisor;
- writeb(UART_LCR_WLS_8, &port->lcr);
+ writeb(UART_LCR_WLEN8, &port->lcr);
divisor = DIV_ROUND_CLOSEST(plat->uartclk, mode_x_div * baudrate);