public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 4/8] mips: ath79: add serial driver for ar933x SOC
Date: Sun, 27 Dec 2015 16:21:54 +0800	[thread overview]
Message-ID: <567F9FA2.9080809@wytron.com.tw> (raw)
In-Reply-To: <BLU437-SMTP303510F525B3851CF0612CFFFA0@phx.gbl>

Hi Wills,

On 2015?12?27? 14:28, Wills Wang wrote:
>>> +static int ar933x_serial_putc(struct udevice *dev, const char c)
>>> +{
>>> +    u32 data;
>>> +
>>> +    if (c == '\n')
>>> +        ar933x_serial_putc(dev, '\r');
>> remove this, the serial core driver takes care of it
>>
>>> +
>>> +    do {
>>> +        data = ar933x_serial_read(dev, AR933X_UART_DATA_REG);
>>> +    } while (!(data & AR933X_UART_DATA_TX_CSR));
>> remove this, the serial core driver takes care of it via your pending
>> callback (ar933x_serial_pending)
>>
>
> Serial core driver don't query and wait the pending function before
> "serial_getc" and "serial_putc", so these statements can't remove,
> or board don't work.

As I wrote in the v3 patch review, both the getc() and putc() should 
return -EAGAIN if there is no available data to read or not ready to 
write. The polling is done in the serial-uclass.c

Regards,
Thomas

  reply	other threads:[~2015-12-27  8:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1451069788-6786-1-git-send-email-wills.wang@live.com>
2015-12-25 18:56 ` [U-Boot] [PATCH v4 1/8] include: Add support for "do_div" macro Wills Wang
2015-12-26  7:24   ` Marek Vasut
2015-12-26 15:48     ` Wills Wang
2015-12-26 13:09   ` Daniel Schwierzeck
2015-12-26 16:54     ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 2/8] mips: implement to access the KSEG0/1 memory range in map_physmem Wills Wang
2015-12-26  7:25   ` Marek Vasut
2015-12-25 18:56 ` [U-Boot] [PATCH v4 3/8] mips: add base support for atheros ath79 based SOCs Wills Wang
2015-12-26  7:28   ` Marek Vasut
2015-12-26 16:17     ` Wills Wang
2015-12-26 17:01       ` Daniel Schwierzeck
2015-12-26 17:06         ` Marek Vasut
2015-12-27  9:37         ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 4/8] mips: ath79: add serial driver for ar933x SOC Wills Wang
2015-12-26 13:20   ` Daniel Schwierzeck
2015-12-26 16:54     ` Wills Wang
2015-12-26 17:19       ` Daniel Schwierzeck
2015-12-27  6:28     ` Wills Wang
2015-12-27  8:21       ` Thomas Chou [this message]
2015-12-27 13:07         ` Thomas Chou
2015-12-27  8:31     ` Thomas Chou
2015-12-25 18:56 ` [U-Boot] [PATCH v4 5/8] mips: ath79: add spi driver Wills Wang
2015-12-26 13:23   ` Daniel Schwierzeck
2015-12-26 16:56     ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 6/8] mips: ath79: add AP121 reference board Wills Wang
2015-12-26 13:52   ` Daniel Schwierzeck
2015-12-26 16:59     ` Wills Wang
2015-12-26 17:07       ` Daniel Schwierzeck
2015-12-27  6:36     ` Wills Wang
2015-12-27  6:41       ` Marek Vasut
2015-12-27  7:03         ` Wills Wang
2015-12-27  7:10           ` Marek Vasut
2015-12-25 18:56 ` [U-Boot] [PATCH v4 7/8] mips: support optimize tuning for same common processor cores Wills Wang
2015-12-26  7:30   ` Marek Vasut
2015-12-26 18:58   ` Daniel Schwierzeck
2015-12-27  3:03     ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 8/8] mips: move optimize tuning option from deprecated config.mk to Kconfig Wills Wang
2015-12-26  7:30   ` Marek Vasut
2015-12-26 17:33     ` 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=567F9FA2.9080809@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox