lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 26 May 2015 09:53:55 -0400
From:	Peter Hurley <peter@...leysoftware.com>
To:	Paul Burton <paul.burton@...tec.com>, linux-mips@...ux-mips.org,
	Arnd Bergmann <arnd@...db.de>
CC:	devicetree@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH 08/15] of_serial: support for UARTs on I/O ports

[ + 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@...tec.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;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ