From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 3/5] mips: ath79: add serial driver for ar933x SOC
Date: Tue, 29 Dec 2015 20:26:30 +0800 [thread overview]
Message-ID: <56827BF6.2060504@wytron.com.tw> (raw)
In-Reply-To: <BLU436-SMTP17536ACF9B41A6B79D749EFFFFC0@phx.gbl>
Hi Wills,
On 2015?12?29? 19:17, Wills Wang wrote:
> +DECLARE_GLOBAL_DATA_PTR;
The gd is not used in this patch. It can be removed.
> +static int ar933x_serial_putc(struct udevice *dev, const char c)
> +{
> + u32 data;
> +
> + do {
> + data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
> + } while (!(data & AR933X_UART_DATA_TX_CSR));
data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
if (!(data & AR933X_UART_DATA_TX_CSR))
return -EAGAIN;
> +
> + data = (u32)c | AR933X_UART_DATA_TX_CSR;
> + ar933x_serial_write(dev, data, AR933X_UART_DATA_REG);
> +
> + return 0;
> +}
> +
> +static int ar933x_serial_getc(struct udevice *dev)
> +{
> + u32 data;
> +
> + do {
> + data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
> + } while (!(data & AR933X_UART_DATA_RX_CSR));
data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
if (!(data & AR933X_UART_DATA_RX_CSR))
return -EAGAIN;
> +
> + data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
> + ar933x_serial_write(dev, AR933X_UART_DATA_RX_CSR,
> + AR933X_UART_DATA_REG);
> + return data & AR933X_UART_DATA_TX_RX_MASK;
> +}
> +
> +static int ar933x_serial_probe(struct udevice *dev)
> +{
> + struct ar933x_serial_priv *priv = dev_get_priv(dev);
> + u32 val;
> +
> + fdt_addr_t addr;
Why extra blank line above "fdt_addr_t addr;"?
=========================
checkpatch.pl,
WARNING: Missing a blank line after declarations
#206: FILE: drivers/serial/serial_ar933x.c:45:
+ struct ar933x_serial_priv *priv = dev_get_priv(dev);
+ return readl(priv->regs + offset);
CHECK: Alignment should match open parenthesis
#210: FILE: drivers/serial/serial_ar933x.c:49:
+static inline void ar933x_serial_write(struct udevice *dev,
+ u32 val, u32 offset)
WARNING: Missing a blank line after declarations
#213: FILE: drivers/serial/serial_ar933x.c:52:
+ struct ar933x_serial_priv *priv = dev_get_priv(dev);
+ writel(val, priv->regs + offset);
CHECK: Alignment should match open parenthesis
#234: FILE: drivers/serial/serial_ar933x.c:73:
+static void ar933x_serial_get_scale_step(u32 clk, u32 baud,
+ u32 *scale, u32 *step)
CHECK: Please don't use multiple blank lines
#393: FILE: drivers/serial/serial_ar933x.c:232:
+
+
Thanks.
Regards,
Thomas
next prev parent reply other threads:[~2015-12-29 12:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1451387833-932-1-git-send-email-wills.wang@live.com>
2015-12-29 11:17 ` [U-Boot] [PATCH v5 1/5] mips: implement to access the KSEG0/1 memory range in map_physmem Wills Wang
2015-12-29 12:49 ` Antony Pavlov
2015-12-30 1:08 ` Wills Wang
2015-12-29 18:08 ` Daniel Schwierzeck
2015-12-29 11:17 ` [U-Boot] [PATCH v5 2/5] mips: add support for QCA/Atheros ath79 SOCs Wills Wang
2015-12-29 19:09 ` Daniel Schwierzeck
2015-12-30 6:27 ` Wills Wang
2015-12-29 11:17 ` [U-Boot] [PATCH v5 3/5] mips: ath79: add serial driver for ar933x SOC Wills Wang
2015-12-29 12:26 ` Thomas Chou [this message]
2015-12-30 1:06 ` Wills Wang
2015-12-29 11:17 ` [U-Boot] [PATCH v5 4/5] mips: ath79: add spi driver Wills Wang
2015-12-29 13:00 ` Thomas Chou
2015-12-29 13:25 ` Marek Vasut
2015-12-29 23:46 ` Thomas Chou
2015-12-30 0:51 ` Marek Vasut
2015-12-30 4:02 ` Thomas Chou
2015-12-30 8:32 ` Antony Pavlov
2015-12-30 8:55 ` Marek Vasut
2015-12-30 1:35 ` Wills Wang
2015-12-30 1:46 ` Marek Vasut
2015-12-30 1:12 ` Wills Wang
2015-12-29 11:17 ` [U-Boot] [PATCH v5 5/5] mips: ath79: add AP121 reference board Wills Wang
2015-12-29 19:27 ` Daniel Schwierzeck
2015-12-30 6:31 ` Wills Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56827BF6.2060504@wytron.com.tw \
--to=thomas@wytron.com.tw \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.