From: Peter Hurley <peter@hurleysoftware.com>
To: Paul Burton <paul.burton@imgtec.com>,
linux-mips@linux-mips.org, Arnd Bergmann <arnd@arndb.de>
Cc: devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 08/15] of_serial: support for UARTs on I/O ports
Date: Tue, 26 May 2015 09:53:55 -0400 [thread overview]
Message-ID: <55647AF3.1000508@hurleysoftware.com> (raw)
In-Reply-To: <1432309875-9712-9-git-send-email-paul.burton@imgtec.com>
[ + Arnd who has been reviewing/acking of_serial.c changes ]
On 05/22/2015 11:51 AM, Paul Burton wrote:
> If the address provided for the UART is of an I/O port rather than
> a regular memory address, then set the port iotype appropriately and
> write the address to iobase rather than mapbase.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
>
> drivers/tty/serial/of_serial.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
> index 137381e..ccff9ba 100644
> --- a/drivers/tty/serial/of_serial.c
> +++ b/drivers/tty/serial/of_serial.c
> @@ -110,7 +110,12 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
>
> port->irq = irq_of_parse_and_map(np, 0);
> port->iotype = UPIO_MEM;
> - if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> +
> + if (resource.flags & IORESOURCE_IO) {
> + port->iotype = UPIO_PORT;
> + port->iobase = port->mapbase;
> + port->mapbase = 0;
> + } else if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> switch (prop) {
> case 1:
> port->iotype = UPIO_MEM;
>
WARNING: multiple messages have this Message-ID (diff)
From: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
To: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>,
linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 08/15] of_serial: support for UARTs on I/O ports
Date: Tue, 26 May 2015 09:53:55 -0400 [thread overview]
Message-ID: <55647AF3.1000508@hurleysoftware.com> (raw)
In-Reply-To: <1432309875-9712-9-git-send-email-paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
[ + Arnd who has been reviewing/acking of_serial.c changes ]
On 05/22/2015 11:51 AM, Paul Burton wrote:
> If the address provided for the UART is of an I/O port rather than
> a regular memory address, then set the port iotype appropriately and
> write the address to iobase rather than mapbase.
>
> Signed-off-by: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
> ---
>
> drivers/tty/serial/of_serial.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
> index 137381e..ccff9ba 100644
> --- a/drivers/tty/serial/of_serial.c
> +++ b/drivers/tty/serial/of_serial.c
> @@ -110,7 +110,12 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
>
> port->irq = irq_of_parse_and_map(np, 0);
> port->iotype = UPIO_MEM;
> - if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> +
> + if (resource.flags & IORESOURCE_IO) {
> + port->iotype = UPIO_PORT;
> + port->iobase = port->mapbase;
> + port->mapbase = 0;
> + } else if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> switch (prop) {
> case 1:
> port->iotype = UPIO_MEM;
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-26 13:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 15:50 [PATCH 00/15] MIPS Malta DT Conversion Paul Burton
2015-05-22 15:50 ` Paul Burton
2015-05-22 15:50 ` Paul Burton
2015-05-22 15:51 ` [PATCH 01/15] MIPS: define GCR_GIC_STATUS register fields Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 02/15] MIPS: include errno.h for ENODEV in mips-cm.h Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 03/15] MIPS: malta: basic DT plumbing Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 04/15] MIPS: i8259: DT support Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 05/15] irqchip: mips-gic: register IRQ domain with MIPS_GIC_IRQ_BASE Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 17:27 ` Jason Cooper
2015-05-22 15:51 ` [PATCH 06/15] MIPS: malta: probe interrupt controllers via DT Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 07/15] MIPS: remove [SR]ocIt(2) IRQ handling code Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 08/15] of_serial: support for UARTs on I/O ports Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-26 13:53 ` Peter Hurley [this message]
2015-05-26 13:53 ` Peter Hurley
2015-05-22 15:51 ` [PATCH 09/15] MIPS: malta: probe UARTs using DT Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 10/15] MIPS: malta: probe RTC via DT Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 11/15] MIPS: malta: probe pflash " Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 12/15] MIPS: malta: remove fw_memblock_t abstraction Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 13/15] MIPS: malta: remove nonsense memory limit Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-22 15:51 ` [PATCH 14/15] MIPS: malta: setup RAM regions via DT Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-10-29 4:39 ` Rob Herring
2015-05-22 15:51 ` [PATCH 15/15] MIPS: malta: setup post-I/O hole RAM on non-EVA Paul Burton
2015-05-22 15:51 ` Paul Burton
2015-05-25 7:59 ` [PATCH 00/15] MIPS Malta DT Conversion Rob Landley
2015-05-25 7:59 ` Rob Landley
2015-05-25 13:29 ` Paul Burton
2015-05-25 13:29 ` Paul Burton
2015-05-25 13:29 ` Paul Burton
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=55647AF3.1000508@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=paul.burton@imgtec.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
/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.