summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-10-31 20:53:23 +0800
committerThomas Chou <thomas@wytron.com.tw>2015-11-06 09:14:11 +0800
commit892414829c7df6b70bc83652bc568c2761b0d1b4 (patch)
tree5d4bc6eaf5bc6ee3ec61adf454aa37b399a5f7fc /drivers
parentd0b1483065ed2d825553988c3ae5931bab1aa2f6 (diff)
downloadtalos-obmc-uboot-892414829c7df6b70bc83652bc568c2761b0d1b4.tar.gz
talos-obmc-uboot-892414829c7df6b70bc83652bc568c2761b0d1b4.zip
serial: altera_uart: minor clean up
- Moved macro definitions to top - Re-arrange header includes ascending order - Remove unused header linux/compiler.h - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/altera_uart.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 7d5197a73f..4c4794eee7 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -8,9 +8,15 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
-#include <asm/io.h>
-#include <linux/compiler.h>
#include <serial.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* status register */
+#define ALTERA_UART_TMT BIT(5) /* tx empty */
+#define ALTERA_UART_TRDY BIT(6) /* tx ready */
+#define ALTERA_UART_RRDY BIT(7) /* rx ready */
struct altera_uart_regs {
u32 rxdata; /* Rx data reg */
@@ -26,13 +32,6 @@ struct altera_uart_platdata {
unsigned int uartclk;
};
-/* status register */
-#define ALTERA_UART_TMT BIT(5) /* tx empty */
-#define ALTERA_UART_TRDY BIT(6) /* tx ready */
-#define ALTERA_UART_RRDY BIT(7) /* rx ready */
-
-DECLARE_GLOBAL_DATA_PTR;
-
static int altera_uart_setbrg(struct udevice *dev, int baudrate)
{
struct altera_uart_platdata *plat = dev->platdata;
@@ -106,8 +105,8 @@ static const struct dm_serial_ops altera_uart_ops = {
};
static const struct udevice_id altera_uart_ids[] = {
- { .compatible = "altr,uart-1.0", },
- { }
+ { .compatible = "altr,uart-1.0" },
+ {}
};
U_BOOT_DRIVER(altera_uart) = {
OpenPOWER on IntegriCloud