All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
	"graeme.gregory@linaro.org" <graeme.gregory@linaro.org>,
	Jakub Kicinski <moorray3@wp.pl>,
	Greg KH <gregkh@linuxfoundation.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>,
	Jiri Slaby <jslaby@suse.cz>, Dave P Martin <Dave.Martin@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 00/11] drivers: PL011: add ARM SBSA Generic UART support
Date: Wed, 13 May 2015 10:17:48 +0100	[thread overview]
Message-ID: <20150513091748.GA25891@red-moon> (raw)
In-Reply-To: <1431440095-5146-1-git-send-email-andre.przywara@arm.com>

On Tue, May 12, 2015 at 03:14:44PM +0100, Andre Przywara wrote:
> This is the fourth revision of the SBSA UART support series, now
> based on the current tty-next branch.
> Compared to v3 I addressed some comments Jakub had on v3 (thanks for
> the review!). Also since some basic ACPI support for ARM64 is now
> upstream, I include the necessary ACPI binding as a new patch 11
> on top.
> ----
> 
> The ARM Server Base System Architecture[1] document describes a
> generic UART which is a subset of the ARM PL011 UART.
> It lacks DMA support, baud rate control and modem status line
> control, among other things.
> The idea is to move the UART initialization and setup into the
> firmware (which does this job today already) and let the kernel just
> use the UART for sending and receiving characters.
> 
> This patchset integrates support for this UART subset into the
> existing PL011 driver - basically by refactoring some
> functions and providing a new uart_ops structure for it. It also has
> a separate probe function to be not dependent on AMBA/PrimeCell.
> It provides a device tree and an ACPI binding.
> Beside the obvious effect of code sharing reusing most of the PL011
> code has the advantage of not introducing another serial device
> prefix, so it can go with ttyAMA, which seems to be pretty common.
> As changing the baudrate and other communication parameters is not
> specified for the SBSA UART, any userland attempt will be denied by
> the kernel. The device-tree provided fixed baud rate will be
> reported, so stty for instance prints the right value.
> 
> This series is based on Greg's tty-next branch, a git repo can
> be found at [2] (branch sbsa-uart/v4).
> 
> Patch 1/11 contains a bug fix which applies to the PL011 part also,
> it should be considered regardless of the rest of the series.
> According to Russell this is still racy, but still better than the
> current solution.
> Patch 2-7 refactor some PL011 functions by splitting them up into
> smaller pieces, so that most of the code can be reused later by the
> SBSA part.
> Patch 8 and 9 introduce two new properties for the vendor structure,
> this is for SBSA functionality which cannot be controlled by
> separate uart_ops members only.
> Patch 10 then finally drops in the SBSA specific code, by providing
> a new uart_ops, vendor struct and probe function for it. Also the new
> device tree binding is documented.
> Patch 11 adds the necessary ACPI boilerplate.
> 
> For testing you should be able to take any hardware which has a PL011
> and change the DT to use a "arm,sbsa-uart" compatible string and the
> baud rate with the "current-speed" property.
> Of course testing with a real SBSA Generic UART is welcomed - as well
> as regression testing with any PL011 implementation.
> I tested this on a FastModel, a Juno and a Midway machine, both in
> PL011 and in (DT-emulated) SBSA mode.
> 
> Changelog:
> v3 .. v4:
> - fixed rebase artifact
> - moved memory allocation out of pl011_allocate_port() function
>   (and consequently renamed that to pl011_find_free_port)
> - added ACPI driver binding
> 
> v2 .. v3:
> - rebased on top of tty-next and Dave's latest PL011 rework
> - fixed module build
> - removed redundant =NULL members in sbsa_uart_ops
> 
> v1 .. v2:
> - rebased on top of 4.0-rc1 and Dave's newest PL011 fix [3]
> - added mandatory current-speed property and report that to userland
> 
> Cheers,
> Andre
> 
> [1] ARM-DEN-0029 Server Base System Architecture, available (click-
>     thru...) from http://infocenter.arm.com
> [2] http://www.linux-arm.org/git?p=linux-ap.git
>     git://linux-arm.org/linux-ap.git
> [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/327631.html
> 
> Andre Przywara (10):
>   drivers: PL011: avoid potential unregister_driver call
>   drivers: PL011: refactor pl011_startup()
>   drivers: PL011: refactor pl011_shutdown()
>   drivers: PL011: refactor pl011_set_termios()
>   drivers: PL011: refactor pl011_probe()
>   drivers: PL011: replace UART_MIS reading with _RIS & _IMSC
>   drivers: PL011: move cts_event workaround into separate function
>   drivers: PL011: allow avoiding UART enabling/disabling
>   drivers: PL011: allow to supply fixed option string
>   drivers: PL011: add support for the ARM SBSA generic UART
> 
> Graeme Gregory (1):
>   drivers: PL011: add ACPI probing for SBSA UART
> 
>  .../devicetree/bindings/serial/arm_sbsa_uart.txt   |  10 +
>  drivers/tty/serial/amba-pl011.c                    | 547 +++++++++++++++------
>  2 files changed, 409 insertions(+), 148 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 00/11] drivers: PL011: add ARM SBSA Generic UART support
Date: Wed, 13 May 2015 10:17:48 +0100	[thread overview]
Message-ID: <20150513091748.GA25891@red-moon> (raw)
In-Reply-To: <1431440095-5146-1-git-send-email-andre.przywara@arm.com>

On Tue, May 12, 2015 at 03:14:44PM +0100, Andre Przywara wrote:
> This is the fourth revision of the SBSA UART support series, now
> based on the current tty-next branch.
> Compared to v3 I addressed some comments Jakub had on v3 (thanks for
> the review!). Also since some basic ACPI support for ARM64 is now
> upstream, I include the necessary ACPI binding as a new patch 11
> on top.
> ----
> 
> The ARM Server Base System Architecture[1] document describes a
> generic UART which is a subset of the ARM PL011 UART.
> It lacks DMA support, baud rate control and modem status line
> control, among other things.
> The idea is to move the UART initialization and setup into the
> firmware (which does this job today already) and let the kernel just
> use the UART for sending and receiving characters.
> 
> This patchset integrates support for this UART subset into the
> existing PL011 driver - basically by refactoring some
> functions and providing a new uart_ops structure for it. It also has
> a separate probe function to be not dependent on AMBA/PrimeCell.
> It provides a device tree and an ACPI binding.
> Beside the obvious effect of code sharing reusing most of the PL011
> code has the advantage of not introducing another serial device
> prefix, so it can go with ttyAMA, which seems to be pretty common.
> As changing the baudrate and other communication parameters is not
> specified for the SBSA UART, any userland attempt will be denied by
> the kernel. The device-tree provided fixed baud rate will be
> reported, so stty for instance prints the right value.
> 
> This series is based on Greg's tty-next branch, a git repo can
> be found at [2] (branch sbsa-uart/v4).
> 
> Patch 1/11 contains a bug fix which applies to the PL011 part also,
> it should be considered regardless of the rest of the series.
> According to Russell this is still racy, but still better than the
> current solution.
> Patch 2-7 refactor some PL011 functions by splitting them up into
> smaller pieces, so that most of the code can be reused later by the
> SBSA part.
> Patch 8 and 9 introduce two new properties for the vendor structure,
> this is for SBSA functionality which cannot be controlled by
> separate uart_ops members only.
> Patch 10 then finally drops in the SBSA specific code, by providing
> a new uart_ops, vendor struct and probe function for it. Also the new
> device tree binding is documented.
> Patch 11 adds the necessary ACPI boilerplate.
> 
> For testing you should be able to take any hardware which has a PL011
> and change the DT to use a "arm,sbsa-uart" compatible string and the
> baud rate with the "current-speed" property.
> Of course testing with a real SBSA Generic UART is welcomed - as well
> as regression testing with any PL011 implementation.
> I tested this on a FastModel, a Juno and a Midway machine, both in
> PL011 and in (DT-emulated) SBSA mode.
> 
> Changelog:
> v3 .. v4:
> - fixed rebase artifact
> - moved memory allocation out of pl011_allocate_port() function
>   (and consequently renamed that to pl011_find_free_port)
> - added ACPI driver binding
> 
> v2 .. v3:
> - rebased on top of tty-next and Dave's latest PL011 rework
> - fixed module build
> - removed redundant =NULL members in sbsa_uart_ops
> 
> v1 .. v2:
> - rebased on top of 4.0-rc1 and Dave's newest PL011 fix [3]
> - added mandatory current-speed property and report that to userland
> 
> Cheers,
> Andre
> 
> [1] ARM-DEN-0029 Server Base System Architecture, available (click-
>     thru...) from http://infocenter.arm.com
> [2] http://www.linux-arm.org/git?p=linux-ap.git
>     git://linux-arm.org/linux-ap.git
> [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/327631.html
> 
> Andre Przywara (10):
>   drivers: PL011: avoid potential unregister_driver call
>   drivers: PL011: refactor pl011_startup()
>   drivers: PL011: refactor pl011_shutdown()
>   drivers: PL011: refactor pl011_set_termios()
>   drivers: PL011: refactor pl011_probe()
>   drivers: PL011: replace UART_MIS reading with _RIS & _IMSC
>   drivers: PL011: move cts_event workaround into separate function
>   drivers: PL011: allow avoiding UART enabling/disabling
>   drivers: PL011: allow to supply fixed option string
>   drivers: PL011: add support for the ARM SBSA generic UART
> 
> Graeme Gregory (1):
>   drivers: PL011: add ACPI probing for SBSA UART
> 
>  .../devicetree/bindings/serial/arm_sbsa_uart.txt   |  10 +
>  drivers/tty/serial/amba-pl011.c                    | 547 +++++++++++++++------
>  2 files changed, 409 insertions(+), 148 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

  parent reply	other threads:[~2015-05-13  9:17 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 14:14 [PATCH v4 00/11] drivers: PL011: add ARM SBSA Generic UART support Andre Przywara
2015-05-12 14:14 ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 01/11] drivers: PL011: avoid potential unregister_driver call Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 02/11] drivers: PL011: refactor pl011_startup() Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 03/11] drivers: PL011: refactor pl011_shutdown() Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 04/11] drivers: PL011: refactor pl011_set_termios() Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 05/11] drivers: PL011: refactor pl011_probe() Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 06/11] drivers: PL011: replace UART_MIS reading with _RIS & _IMSC Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 07/11] drivers: PL011: move cts_event workaround into separate function Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 08/11] drivers: PL011: allow avoiding UART enabling/disabling Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 09/11] drivers: PL011: allow to supply fixed option string Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-12 14:14 ` [PATCH v4 10/11] drivers: PL011: add support for the ARM SBSA generic UART Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-13 14:32   ` Mark Langsdorf
2015-05-13 15:03     ` Graeme Gregory
2015-05-21 11:13     ` Andre Przywara
2015-05-21 11:13       ` Andre Przywara
2015-05-21 12:49       ` Naresh Bhat
2015-05-21 12:49         ` Naresh Bhat
2015-05-21 15:12       ` Mark Langsdorf
2015-05-21 15:12         ` Mark Langsdorf
2015-05-12 14:14 ` [PATCH v4 11/11] drivers: PL011: add ACPI probing for SBSA UART Andre Przywara
2015-05-12 14:14   ` Andre Przywara
2015-05-13  1:09   ` Hanjun Guo
2015-05-13  1:09     ` Hanjun Guo
2015-05-12 15:18 ` [PATCH v4 00/11] drivers: PL011: add ARM SBSA Generic UART support Jakub Kiciński
2015-05-12 15:18   ` Jakub Kiciński
2015-05-12 16:42 ` Robert Richter
2015-05-12 16:42   ` Robert Richter
2015-05-13  9:17 ` Lorenzo Pieralisi [this message]
2015-05-13  9:17   ` Lorenzo Pieralisi
2015-05-15  3:31 ` Hanjun Guo
2015-05-15  3:31   ` Hanjun Guo

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=20150513091748.GA25891@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=Dave.Martin@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=arnd@arndb.de \
    --cc=graeme.gregory@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=moorray3@wp.pl \
    --cc=rmk+kernel@arm.linux.org.uk \
    /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.