From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Cc: linux-serial <linux-serial@vger.kernel.org>,
git@amd.com, devicetree@vger.kernel.org,
Jiri Slaby <jirislaby@kernel.org>,
linux@armlinux.org.uk, krzysztof.kozlowski+dt@linaro.org,
robh+dt@kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v4 2/2] serial: pl011: Add reg-io-width parameters
Date: Fri, 26 Aug 2022 17:52:07 +0300 (EEST) [thread overview]
Message-ID: <5ee24dad-e5b4-206f-7ebc-d9a2d4b572@linux.intel.com> (raw)
In-Reply-To: <20220826120559.2122-3-shubhrajyoti.datta@amd.com>
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
On Fri, 26 Aug 2022, Shubhrajyoti Datta wrote:
> Some of the implementations can read only 32 bits because of
> the interface limitations of the port they are connected to.
> Add a parameter reg-io-width for supporting such platforms.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
> ---
> v4:
> No change
>
> drivers/tty/serial/amba-pl011.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 15f0e4d88c5a..033bf8699540 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2777,6 +2777,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> struct uart_amba_port *uap;
> struct vendor_data *vendor = id->data;
> int portnr, ret;
> + u32 val;
>
> portnr = pl011_find_free_port();
> if (portnr < 0)
> @@ -2801,6 +2802,21 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
> uap->port.rs485_supported = pl011_rs485_supported;
> snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
>
> + if (device_property_read_u32(&dev->dev, "reg-io-width", &val) == 0) {
> + switch (val) {
> + case 1:
> + uap->port.iotype = UPIO_MEM;
> + break;
> + case 4:
> + uap->port.iotype = UPIO_MEM32;
> + break;
> + default:
> + dev_warn(&dev->dev, "unsupported reg-io-width (%d)\n",
> + val);
> + return -EINVAL;
> + }
> + }
> +
> ret = pl011_setup_port(&dev->dev, uap, &dev->res, portnr);
> if (ret)
> return ret;
prev parent reply other threads:[~2022-08-26 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 12:05 [PATCH v4 0/2] serial: pl011: Add xilinx uart Shubhrajyoti Datta
2022-08-26 12:05 ` [PATCH v4 1/2] dt-bindings: serial: pl011: Add a reg-io-width parameter Shubhrajyoti Datta
2022-08-26 17:38 ` Krzysztof Kozlowski
2022-08-26 12:05 ` [PATCH v4 2/2] serial: pl011: Add reg-io-width parameters Shubhrajyoti Datta
2022-08-26 14:52 ` Ilpo Järvinen [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=5ee24dad-e5b4-206f-7ebc-d9a2d4b572@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=shubhrajyoti.datta@amd.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.