Re: [PATCH] tty/serial: Add support for Altera serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux