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]
Message-ID: <20130321104651.GC2862@xps8300>
Date:	Thu, 21 Mar 2013 12:46:51 +0200
From:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:	Ley Foon Tan <lftan@...era.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Jiri Slaby <jslaby@...e.cz>, Rob Landley <rob@...dley.net>,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] tty/serial: Add support for Altera serial port

Hi,

On Thu, Mar 07, 2013 at 10:28:37AM +0800, Ley Foon Tan wrote:
> diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
> index 0efc815..661096d 100644
> --- a/drivers/tty/serial/8250/8250.c
> +++ b/drivers/tty/serial/8250/8250.c
> @@ -301,7 +301,28 @@ static const struct serial8250_config uart_config[] = {
>  	},
>  	[PORT_8250_CIR] = {
>  		.name		= "CIR port"
> -	}
> +	},
> +	[PORT_ALTR_16550_F32] = {
> +		.name		= "Altera 16550 FIFO32",
> +		.fifo_size	= 32,
> +		.tx_loadsz	= 32,
> +		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
> +		.flags		= UART_CAP_FIFO | UART_CAP_AFE,
> +	},
> +	[PORT_ALTR_16550_F64] = {
> +		.name		= "Altera 16550 FIFO64",
> +		.fifo_size	= 64,
> +		.tx_loadsz	= 64,
> +		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
> +		.flags		= UART_CAP_FIFO | UART_CAP_AFE,
> +	},
> +	[PORT_ALTR_16550_F128] = {
> +		.name		= "Altera 16550 FIFO128",
> +		.fifo_size	= 128,
> +		.tx_loadsz	= 128,
> +		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
> +		.flags		= UART_CAP_FIFO | UART_CAP_AFE,
> +	},

Adding three new types for what are basically the same UART, just with
different fifosizes, feels a bit silly to me, so in the future the
fifosize should be delivered as DT property. The following patches
fill uart_port.fifosize with the value from the property. I can see
the fifosize property is already used with some uarts, at least under
arch/arm/boot/dts/, but I guess not for of_serial.c driver.

Maybe there should also be DT property for auto flow control. It seems
to be quite common feature. Then in this case the type could just be
PORT_16550A.

-- 
heikki
--
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