From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jason Uy <jason.uy@broadcom.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
Noam Camus <noamc@ezchip.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Wang Hongcheng <annie.wang@amd.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH v2 1/1] serial: 8250_dw: Allow hardware flow control to be used
Date: Wed, 11 Jan 2017 21:53:12 +0200 [thread overview]
Message-ID: <1484164392.2133.74.camel@linux.intel.com> (raw)
In-Reply-To: <1484164100-9805-2-git-send-email-jason.uy@broadcom.com>
On Wed, 2017-01-11 at 11:48 -0800, Jason Uy wrote:
> In the most common use case, the Synopsys DW UART driver does not
> set the set_termios callback function. This prevents UPSTAT_AUTOCTS
> from being set when the UART flag CRTSCTS is set. As a result, the
> driver will use software flow control as opposed to hardware flow
> control.
>
> To fix the problem, the set_termios callback function is set to the
> DW specific function. The logic to set UPSTAT_AUTOCTS is moved so
> that any clock error will not affect setting the hardware flow
> control.
>
> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
FWIW:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Jason Uy <jason.uy@broadcom.com>
> ---
> drivers/tty/serial/8250/8250_dw.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_dw.c
> b/drivers/tty/serial/8250/8250_dw.c
> index c89fafc..c89ae45 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -248,11 +248,11 @@ static void dw8250_set_termios(struct uart_port
> *p, struct ktermios *termios,
> if (!ret)
> p->uartclk = rate;
>
> +out:
> p->status &= ~UPSTAT_AUTOCTS;
> if (termios->c_cflag & CRTSCTS)
> p->status |= UPSTAT_AUTOCTS;
>
> -out:
> serial8250_do_set_termios(p, termios, old);
> }
>
> @@ -326,13 +326,11 @@ static void dw8250_quirks(struct uart_port *p,
> struct dw8250_data *data)
> p->serial_in = dw8250_serial_in32;
> data->uart_16550_compatible = true;
> }
> - p->set_termios = dw8250_set_termios;
> }
>
> /* Platforms with iDMA */
> if (platform_get_resource_byname(to_platform_device(p->dev),
> IORESOURCE_MEM,
> "lpss_priv")) {
> - p->set_termios = dw8250_set_termios;
> data->dma.rx_param = p->dev->parent;
> data->dma.tx_param = p->dev->parent;
> data->dma.fn = dw8250_idma_filter;
> @@ -414,6 +412,7 @@ static int dw8250_probe(struct platform_device
> *pdev)
> p->serial_in = dw8250_serial_in;
> p->serial_out = dw8250_serial_out;
> p->set_ldisc = dw8250_set_ldisc;
> + p->set_termios = dw8250_set_termios;
>
> p->membase = devm_ioremap(dev, regs->start,
> resource_size(regs));
> if (!p->membase)
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-01-11 19:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 19:48 [PATCH v2 0/1] Allow hardware flow control to be used Jason Uy
2017-01-11 19:48 ` [PATCH v2 1/1] serial: 8250_dw: " Jason Uy
2017-01-11 19:53 ` Andy Shevchenko [this message]
2017-01-13 1:33 ` Kefeng Wang
[not found] ` <CAAG0J9-n0toSJL8Ze8Esq81dYnpfrTd42bMiR94zw_btBLjsww@mail.gmail.com>
2017-03-01 18:50 ` Andy Shevchenko
2017-03-03 0:21 ` James Hogan
2017-03-03 13:31 ` Andy Shevchenko
2017-03-03 17:33 ` Ray Jui
2017-03-03 17:43 ` Jason Uy
2017-03-03 23:07 ` James Hogan
2017-03-04 0:02 ` Jason Uy
2017-03-04 0:11 ` James Hogan
2017-03-03 23:23 ` James Hogan
2017-03-04 2:56 ` Andy Shevchenko
2017-03-04 13:09 ` [PATCH] serial: 8250_dw: Fix breakage when HAVE_CLK=n James Hogan
2017-03-04 14:37 ` Andy Shevchenko
2017-03-06 10:16 ` James Hogan
2017-03-06 23:38 ` Jason Uy
2017-03-05 0:44 ` Heiko Stuebner
2017-03-13 11:14 ` James Hogan
2017-03-14 2:21 ` Greg Kroah-Hartman
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=1484164392.2133.74.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=annie.wang@amd.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jason.uy@broadcom.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=noamc@ezchip.com \
--cc=wangkefeng.wang@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).