From: Rob Herring <robh@kernel.org>
To: tthayer@opensource.altera.com
Cc: gregkh@linuxfoundation.org, mark.rutland@arm.com,
lftan@altera.com, jslaby@suse.com, arnd@arndb.de,
peter@hurleysoftware.com, andriy.shevchenko@linux.intel.com,
anton.wuerfel@fau.de, phillip.raffeck@fau.de,
yegorslists@googlemail.com, matwey@sai.msu.ru,
mail@maciej.szmigiero.name, peter.ujfalusi@ti.com,
jonathanh@nvidia.com, dongsheng.wang@nxp.com,
luis@debethencourt.com, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
tthayer.linux@gmail.com, nios2-dev@lists.rocketboards.org
Subject: Re: [PATCH 2/4] serial: 8250: of: Load TX FIFO Load Size from DT
Date: Fri, 16 Sep 2016 14:20:39 -0500 [thread overview]
Message-ID: <20160916192039.GB30710@rob-hp-laptop> (raw)
In-Reply-To: <1473351141-9239-3-git-send-email-tthayer@opensource.altera.com>
On Thu, Sep 08, 2016 at 11:12:19AM -0500, tthayer@opensource.altera.com wrote:
> From: Thor Thayer <tthayer@opensource.altera.com>
>
> Initialize the tx_loadsz parameter if it is defined in the
> device tree.
>
> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
> ---
> drivers/tty/serial/8250/8250_of.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
> index 38963d7..3e4be2f 100644
> --- a/drivers/tty/serial/8250/8250_of.c
> +++ b/drivers/tty/serial/8250/8250_of.c
> @@ -195,6 +195,7 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
> switch (port_type) {
> case PORT_8250 ... PORT_MAX_8250:
> {
> + u32 prop;
> struct uart_8250_port port8250;
> memset(&port8250, 0, sizeof(port8250));
> port8250.port = port;
> @@ -202,6 +203,11 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
> if (port.fifosize)
> port8250.capabilities = UART_CAP_FIFO;
>
> + /* Check for TX fifo load size */
> + if (of_property_read_u32(ofdev->dev.of_node,
> + "tx-loadsz", &prop) == 0)
> + port8250.tx_loadsz = prop;
This can be simplified to:
of_property_read_u32(ofdev->dev.of_node, "tx-loadsz", &port8250.tx_loadsz);
> +
> if (of_property_read_bool(ofdev->dev.of_node,
> "auto-flow-control"))
> port8250.capabilities |= UART_CAP_AFE;
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2016-09-16 19:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 16:12 [PATCH 0/4] Add TX FIFO Threshold for Altera 16550-FIFOxx tthayer
[not found] ` <1473351141-9239-1-git-send-email-tthayer-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2016-09-08 16:12 ` [PATCH 1/4] Documentation: dt: serial: Add TX FIFO load size tthayer-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2016-09-16 19:19 ` Rob Herring
2016-09-16 20:47 ` Thor Thayer
2016-09-08 16:12 ` [PATCH 2/4] serial: 8250: of: Load TX FIFO Load Size from DT tthayer
2016-09-16 19:20 ` Rob Herring [this message]
2016-09-16 20:52 ` Thor Thayer
[not found] ` <2e79f6cc-8d9a-b9b7-884c-6916b2e74d64-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2016-09-16 20:51 ` Arnd Bergmann
2016-09-08 16:12 ` [PATCH 3/4] serial: 8250: Set Altera 16550 TX FIFO Threshold tthayer
2016-09-08 16:12 ` [PATCH 4/4] nios2: dts: 10m50: Add tx-loadsz parameter tthayer
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=20160916192039.GB30710@rob-hp-laptop \
--to=robh@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anton.wuerfel@fau.de \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dongsheng.wang@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=jslaby@suse.com \
--cc=lftan@altera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=luis@debethencourt.com \
--cc=mail@maciej.szmigiero.name \
--cc=mark.rutland@arm.com \
--cc=matwey@sai.msu.ru \
--cc=nios2-dev@lists.rocketboards.org \
--cc=peter.ujfalusi@ti.com \
--cc=peter@hurleysoftware.com \
--cc=phillip.raffeck@fau.de \
--cc=tthayer.linux@gmail.com \
--cc=tthayer@opensource.altera.com \
--cc=yegorslists@googlemail.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