All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: Raviteja Narayanam <rna@xilinx.com>
Cc: "jslaby@suse.com" <jslaby@suse.com>,
	Michal Simek <michals@xilinx.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	git <git@xilinx.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>
Subject: Re: Need suggestion for 'access_type' of AMBA pl011 serial driver
Date: Thu, 3 Jun 2021 11:59:19 +0300	[thread overview]
Message-ID: <2b602d2f-db48-515c-2904-7b84b31928ce@mleia.com> (raw)
In-Reply-To: <SN6PR02MB40936F8F2879AD5CFDFC80D2CA3C9@SN6PR02MB4093.namprd02.prod.outlook.com>

Hello Raviteja,

On 6/3/21 10:03 AM, Raviteja Narayanam wrote:
> Hi,
> 
> The uart peripheral on Xilinx Versal platform is ARM primecell. Our
> environment is 32-bit access type but the ARM primecell uart in pl011
> driver has default 16 bit access type. 
> (https://github.com/torvalds/linux/blob/master/drivers/tty/serial/amba-pl011.c#L2665
> access_32b is false for 'vendor_arm') This is causing asynchronous
> abort on our platform when any UART register is written from the
> pl011 driver.
> 
> Need suggestion on how we can address this issue and if the below
> approach is fine.

Check drivers/tty/serial/amba-pl011.c code, there are quite many
controllers with 32-bit access, for instance ZTE UART and SBSA UART.

In other words this case is already well covered in the code, nothing
extraordinary is required or have to be invented here.

> As this is platform specific issue, we can have a new device tree
> property (memory_access_type), specifying the 32 bit type. In the
> probe function, override the behavior (uap->port.iotype) if this
> property is present in DT. In this way, we can have support for our
> SOC, without breaking any legacy ones.

No, there is totally no need for this kind of a device tree property.

Instead please introduce a new compatible of your controller, just
like it's been done for the SBSA UART controller:

   compatible = "arm,sbsa-uart", "arm,pl011", "arm,primecell";

Then based on a match against your new compatible select a proper
configuration of the device driver, as I've said above similar cases
are already found in the code.

--
Best wishes,
Vladimir

      parent reply	other threads:[~2021-06-03  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  7:03 Need suggestion for 'access_type' of AMBA pl011 serial driver Raviteja Narayanam
2021-06-03  7:13 ` gregkh
2021-06-03  8:59 ` Vladimir Zapolskiy [this message]

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=2b602d2f-db48-515c-2904-7b84b31928ce@mleia.com \
    --to=vz@mleia.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michals@xilinx.com \
    --cc=rna@xilinx.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 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.