Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1352644 > unrolled thread

[PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART

Started byChristopher Covington <cov@codeaurora.org>
First post2016-03-08 06:50 +0100
Last post2016-03-15 11:10 +0100
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART Christopher Covington <cov@codeaurora.org> - 2016-03-08 06:50 +0100
    Re: [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART Mark Langsdorf <mlangsdo@redhat.com> - 2016-03-08 16:00 +0100
    [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART Christopher Covington <cov@codeaurora.org> - 2016-03-11 07:40 +0100
      Re: [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART Peter Hurley <peter@hurleysoftware.com> - 2016-03-11 16:10 +0100
        Re: [PATCH v2] tty: amba-pl011: Use 32-bit accesses for SBSA UART Christopher Covington <cov@codeaurora.org> - 2016-03-12 00:40 +0100
      Re: [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART Andre Przywara <andre.przywara@arm.com> - 2016-03-15 11:10 +0100

#1352644 — [PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART

FromChristopher Covington <cov@codeaurora.org>
Date2016-03-08 06:50 +0100
Subject[PATCH] tty: amba-pl011: Use 32-bit accesses for SBSA UART
Message-ID<raiGS-51T-9@gated-at.bofh.it>
From: Christopher Covington <christopher.covington@linaro.org>

Version 2 of the Server Base System Architecture (SBSA) describes the
Generic UART registers as 32 bits wide. At least one implementation, found
of the Qualcomm Technologies QDF2432, only supports 32 bit accesses. While
other implementations may also support smaller sized accesses, simply use
32 bit accesses all the time for the SBSA UART for simple, broad,
compatibility.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
---
 drivers/tty/serial/amba-pl011.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c0da0cc..ffb5eb8 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -121,6 +121,7 @@ static struct vendor_data vendor_arm = {
 
 static struct vendor_data vendor_sbsa = {
 	.reg_offset		= pl011_std_offsets,
+	.access_32b		= true,
 	.oversampling		= false,
 	.dma_threshold		= false,
 	.cts_event_workaround	= false,
-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1353119

FromMark Langsdorf <mlangsdo@redhat.com>
Date2016-03-08 16:00 +0100
Message-ID<rarh8-2cP-9@gated-at.bofh.it>
In reply to#1352644
On 03/07/2016 11:43 PM, Christopher Covington wrote:
> From: Christopher Covington <christopher.covington@linaro.org>
>
> Version 2 of the Server Base System Architecture (SBSA) describes the
> Generic UART registers as 32 bits wide. At least one implementation, found
> of the Qualcomm Technologies QDF2432, only supports 32 bit accesses. While
> other implementations may also support smaller sized accesses, simply use
> 32 bit accesses all the time for the SBSA UART for simple, broad,
> compatibility.
>
> Signed-off-by: Christopher Covington <cov@codeaurora.org>
> ---

I can boot the v4.5-rc7 on my QDF2432 platform with this patch,
and could not otherwise.

Tested-by: Mark Langsdorf <mlangsdo@redhat.com>

[toc] | [prev] | [next] | [standalone]


#1355629

FromChristopher Covington <cov@codeaurora.org>
Date2016-03-11 07:40 +0100
Message-ID<rboTU-22L-9@gated-at.bofh.it>
In reply to#1352644
Version 2 of the Server Base System Architecture (SBSAv2) describes the
Generic UART registers as 32 bits wide. At least one implementation, found
on the Qualcomm Technologies QDF2432, only supports 32 bit accesses.
SBSAv3, which describes supported access sizes in greater detail,
explicitly requires support for both 16 and 32 bit accesses to all
registers (and 8 bit accesses to some but not all). Therefore, for broad
compatibility, simply use 32 bit accessors for the SBSA UART.

Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
Signed-off-by: Christopher Covington <cov@codeaurora.org>
---
Changes new in v2:
* Fixed from address
* Elaborated on forward (SBSAv3) compatibility in commit message
* Included Mark Langsdorf's Tested-by, which now covers:
    QDF2432
    Seattle
    X-Gene 1
---
 drivers/tty/serial/amba-pl011.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c0da0cc..ffb5eb8 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -121,6 +121,7 @@ static struct vendor_data vendor_arm = {
 
 static struct vendor_data vendor_sbsa = {
 	.reg_offset		= pl011_std_offsets,
+	.access_32b		= true,
 	.oversampling		= false,
 	.dma_threshold		= false,
 	.cts_event_workaround	= false,
-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1355975

FromPeter Hurley <peter@hurleysoftware.com>
Date2016-03-11 16:10 +0100
Message-ID<rbwRs-7YD-11@gated-at.bofh.it>
In reply to#1355629
Hi Christopher,

On 03/10/2016 10:35 PM, Christopher Covington wrote:
> Version 2 of the Server Base System Architecture (SBSAv2) describes the
> Generic UART registers as 32 bits wide. At least one implementation, found
> on the Qualcomm Technologies QDF2432, only supports 32 bit accesses.
> SBSAv3, which describes supported access sizes in greater detail,
> explicitly requires support for both 16 and 32 bit accesses to all
> registers (and 8 bit accesses to some but not all). Therefore, for broad
> compatibility, simply use 32 bit accessors for the SBSA UART.

So this eliminates the need to configure SBSA port via ACPI, correct?
Thus, Aleksey can drop his "serial: pl011: use SPCR to setup 32-bit access"?


> Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
> Signed-off-by: Christopher Covington <cov@codeaurora.org>
> ---
> Changes new in v2:
> * Fixed from address
> * Elaborated on forward (SBSAv3) compatibility in commit message
> * Included Mark Langsdorf's Tested-by, which now covers:
>     QDF2432
>     Seattle
>     X-Gene 1
> ---
>  drivers/tty/serial/amba-pl011.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index c0da0cc..ffb5eb8 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -121,6 +121,7 @@ static struct vendor_data vendor_arm = {
>  
>  static struct vendor_data vendor_sbsa = {
>  	.reg_offset		= pl011_std_offsets,
> +	.access_32b		= true,
>  	.oversampling		= false,
>  	.dma_threshold		= false,
>  	.cts_event_workaround	= false,
> 

[toc] | [prev] | [next] | [standalone]


#1356286 — Re: [PATCH v2] tty: amba-pl011: Use 32-bit accesses for SBSA UART

FromChristopher Covington <cov@codeaurora.org>
Date2016-03-12 00:40 +0100
SubjectRe: [PATCH v2] tty: amba-pl011: Use 32-bit accesses for SBSA UART
Message-ID<rbEOZ-5kn-3@gated-at.bofh.it>
In reply to#1355975

On March 11, 2016 10:02:14 PM GMT+07:00, Peter Hurley <peter@hurleysoftware.com> wrote:
>Hi Christopher,
>
>On 03/10/2016 10:35 PM, Christopher Covington wrote:
>> Version 2 of the Server Base System Architecture (SBSAv2) describes
>the
>> Generic UART registers as 32 bits wide. At least one implementation,
>found
>> on the Qualcomm Technologies QDF2432, only supports 32 bit accesses.
>> SBSAv3, which describes supported access sizes in greater detail,
>> explicitly requires support for both 16 and 32 bit accesses to all
>> registers (and 8 bit accesses to some but not all). Therefore, for
>broad
>> compatibility, simply use 32 bit accessors for the SBSA UART.
>
>So this eliminates the need to configure SBSA port via ACPI, correct?
>Thus, Aleksey can drop his "serial: pl011: use SPCR to setup 32-bit
>access"?

Yes.

Thanks,
Christopher Covington

-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Sent from my Snapdragon powered Android device with K-9 Mail. Please excuse my brevity.

[toc] | [prev] | [next] | [standalone]


#1357953

FromAndre Przywara <andre.przywara@arm.com>
Date2016-03-15 11:10 +0100
Message-ID<rcU5k-Bl-3@gated-at.bofh.it>
In reply to#1355629
Hi Christopher,

On 11/03/16 06:35, Christopher Covington wrote:
> Version 2 of the Server Base System Architecture (SBSAv2) describes the
> Generic UART registers as 32 bits wide. At least one implementation, found
> on the Qualcomm Technologies QDF2432, only supports 32 bit accesses.
> SBSAv3, which describes supported access sizes in greater detail,
> explicitly requires support for both 16 and 32 bit accesses to all
> registers (and 8 bit accesses to some but not all). Therefore, for broad
> compatibility, simply use 32 bit accessors for the SBSA UART.
> 
> Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
> Signed-off-by: Christopher Covington <cov@codeaurora.org>

So I gave this a try on a Juno and a Midway. Both have a normal PL011,
but I changed the DT to advertise an SBSA UART instead.
This worked fine with the 32bit accessors.
Also according to some research on the hardware size at least the
current ARM PL011 implementation are totally fine with 32-bit (as well
as 16-bit) accesses.
There is some reluctance about whether this is true for _every_ older
PL011 implementation, but they are out of scope here, as we are talking
about the SBSA only.
So:

Tested-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Andre Przywara <andre.przywara@arm.com>

You can add Juno and Midway to the list of tested systems.

Cheers,
Andre.

> ---
> Changes new in v2:
> * Fixed from address
> * Elaborated on forward (SBSAv3) compatibility in commit message
> * Included Mark Langsdorf's Tested-by, which now covers:
>     QDF2432
>     Seattle
>     X-Gene 1






> ---
>  drivers/tty/serial/amba-pl011.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index c0da0cc..ffb5eb8 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -121,6 +121,7 @@ static struct vendor_data vendor_arm = {
>  
>  static struct vendor_data vendor_sbsa = {
>  	.reg_offset		= pl011_std_offsets,
> +	.access_32b		= true,
>  	.oversampling		= false,
>  	.dma_threshold		= false,
>  	.cts_event_workaround	= false,
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web