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 v1 1/1] serial: 8250_dw: Allow hardware flow control to be used
Date: Wed, 07 Dec 2016 13:09:49 +0200 [thread overview]
Message-ID: <1481108989.17976.9.camel@linux.intel.com> (raw)
In-Reply-To: <1481063643-11951-2-git-send-email-jason.uy@broadcom.com>
On Tue, 2016-12-06 at 14:34 -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.
>
It should not affect Intel HW since we are using clock for it (see
drivers/mfd/intel-lpss-pci.c, drivers/acpi/acpi_lpss.c).
Thus, I'm okay with the change.
> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
> Reviewed-by: Ray Jui <ray.jui@broadcom.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 459d726..18f1f8b 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -246,11 +246,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);
> }
>
> @@ -308,13 +308,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;
> @@ -392,6 +390,7 @@ static int dw8250_probe(struct platform_device
> *pdev)
> p->iotype = UPIO_MEM;
> p->serial_in = dw8250_serial_in;
> p->serial_out = dw8250_serial_out;
> + 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:[~2016-12-07 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 22:34 [PATCH v1 0/1] serial: 8250_dw: Allow hardware flow control to be used Jason Uy
2016-12-06 22:34 ` [PATCH v1 1/1] " Jason Uy
2016-12-07 11:09 ` Andy Shevchenko [this message]
2017-01-11 8:00 ` 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=1481108989.17976.9.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).