Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754455AbbEZNyC (ORCPT ); Tue, 26 May 2015 09:54:02 -0400 Received: from mail-qg0-f47.google.com ([209.85.192.47]:35120 "EHLO mail-qg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752535AbbEZNx7 (ORCPT ); Tue, 26 May 2015 09:53:59 -0400 Message-ID: <55647AF3.1000508@hurleysoftware.com> Date: Tue, 26 May 2015 09:53:55 -0400 From: Peter Hurley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paul Burton , linux-mips@linux-mips.org, Arnd Bergmann CC: devicetree@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 08/15] of_serial: support for UARTs on I/O ports References: <1432309875-9712-1-git-send-email-paul.burton@imgtec.com> <1432309875-9712-9-git-send-email-paul.burton@imgtec.com> In-Reply-To: <1432309875-9712-9-git-send-email-paul.burton@imgtec.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 38 [ + 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 > --- > > 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/