Skip to content
Snippets Groups Projects
Commit 315acd08 authored by Thomas Chou's avatar Thomas Chou
Browse files

serial: altera_jtag_uart: minor clean up


- Moved macro definitions to top
- Give spaces around the '>>' in ALTERA_JTAG_WSPACE()
- Re-arrange header includes ascending order
- Remove unused header linux/compiler.h
- Remove the penultimate comma in of_match ids

Signed-off-by: default avatarThomas Chou <thomas@wytron.com.tw>
Reviewed-by: default avatarJagan Teki <jteki@openedev.com>
parent 886161a4
No related branches found
No related tags found
No related merge requests found
...@@ -8,18 +8,10 @@ ...@@ -8,18 +8,10 @@
#include <common.h> #include <common.h>
#include <dm.h> #include <dm.h>
#include <errno.h> #include <errno.h>
#include <asm/io.h>
#include <linux/compiler.h>
#include <serial.h> #include <serial.h>
#include <asm/io.h>
struct altera_jtaguart_regs { DECLARE_GLOBAL_DATA_PTR;
u32 data; /* Data register */
u32 control; /* Control register */
};
struct altera_jtaguart_platdata {
struct altera_jtaguart_regs *regs;
};
/* data register */ /* data register */
#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */ #define ALTERA_JTAG_RVALID BIT(15) /* Read valid */
...@@ -27,11 +19,18 @@ struct altera_jtaguart_platdata { ...@@ -27,11 +19,18 @@ struct altera_jtaguart_platdata {
/* control register */ /* control register */
#define ALTERA_JTAG_AC BIT(10) /* activity indicator */ #define ALTERA_JTAG_AC BIT(10) /* activity indicator */
#define ALTERA_JTAG_RRDY BIT(12) /* read available */ #define ALTERA_JTAG_RRDY BIT(12) /* read available */
#define ALTERA_JTAG_WSPACE(d) ((d)>>16) /* Write space avail */ #define ALTERA_JTAG_WSPACE(d) ((d) >> 16) /* Write space avail */
/* Write fifo size. FIXME: this should be extracted with sopc2dts */ /* Write fifo size. FIXME: this should be extracted with sopc2dts */
#define ALTERA_JTAG_WRITE_DEPTH 64 #define ALTERA_JTAG_WRITE_DEPTH 64
DECLARE_GLOBAL_DATA_PTR; struct altera_jtaguart_regs {
u32 data; /* Data register */
u32 control; /* Control register */
};
struct altera_jtaguart_platdata {
struct altera_jtaguart_regs *regs;
};
static int altera_jtaguart_setbrg(struct udevice *dev, int baudrate) static int altera_jtaguart_setbrg(struct udevice *dev, int baudrate)
{ {
...@@ -112,8 +111,8 @@ static const struct dm_serial_ops altera_jtaguart_ops = { ...@@ -112,8 +111,8 @@ static const struct dm_serial_ops altera_jtaguart_ops = {
}; };
static const struct udevice_id altera_jtaguart_ids[] = { static const struct udevice_id altera_jtaguart_ids[] = {
{ .compatible = "altr,juart-1.0", }, { .compatible = "altr,juart-1.0" },
{ } {}
}; };
U_BOOT_DRIVER(altera_jtaguart) = { U_BOOT_DRIVER(altera_jtaguart) = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment