From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Tue, 3 Nov 2015 13:20:32 +0800 Subject: [U-Boot] [PATCH 2/8] serial: altera_jtag_uart: minor clean up In-Reply-To: <1446189498-26549-2-git-send-email-thomas@wytron.com.tw> References: <1446189498-26549-1-git-send-email-thomas@wytron.com.tw> <1446189498-26549-2-git-send-email-thomas@wytron.com.tw> Message-ID: <56384420.5060906@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2015?10?30? 15:18, Thomas Chou wrote: > - 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: Thomas Chou > --- > drivers/serial/altera_jtag_uart.c | 25 ++++++++++++------------- > 1 file changed, 12 insertions(+), 13 deletions(-) > Applied to u-boot-nios. > diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c > index 0aa741c..fd69188 100644 > --- a/drivers/serial/altera_jtag_uart.c > +++ b/drivers/serial/altera_jtag_uart.c > @@ -8,18 +8,10 @@ > #include > #include > #include > -#include > -#include > #include > +#include > > -struct altera_jtaguart_regs { > - u32 data; /* Data register */ > - u32 control; /* Control register */ > -}; > - > -struct altera_jtaguart_platdata { > - struct altera_jtaguart_regs *regs; > -}; > +DECLARE_GLOBAL_DATA_PTR; > > /* data register */ > #define ALTERA_JTAG_RVALID BIT(15) /* Read valid */ > @@ -27,11 +19,18 @@ struct altera_jtaguart_platdata { > /* control register */ > #define ALTERA_JTAG_AC BIT(10) /* activity indicator */ > #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 */ > #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) > { > @@ -112,7 +111,7 @@ static const struct dm_serial_ops altera_jtaguart_ops = { > }; > > static const struct udevice_id altera_jtaguart_ids[] = { > - { .compatible = "altr,juart-1.0", }, > + { .compatible = "altr,juart-1.0" }, > { } > }; > >