aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLey Foon Tan2013-03-06 20:28:37 -0600
committerGreg Kroah-Hartman2013-03-20 15:10:54 -0500
commitec99e285dbd0dfc65495b459b57b35e1ce5dc55c (patch)
treed915ff8dfb0a578da7ccab785602cb82342b1d69
parent53b90339a62ec1d726130a4ad273d826ebefc04d (diff)
downloadkernel-omap-ec99e285dbd0dfc65495b459b57b35e1ce5dc55c.tar.gz
kernel-omap-ec99e285dbd0dfc65495b459b57b35e1ce5dc55c.tar.xz
kernel-omap-ec99e285dbd0dfc65495b459b57b35e1ce5dc55c.zip
tty/serial: Add support for Altera serial port
commit e06c93cacb82dd147266fd1bdb2d0a0bd45ff2c1 upstream. Add support for Altera 8250/16550 compatible serial port. Signed-off-by: Ley Foon Tan <lftan@altera.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Documentation/devicetree/bindings/tty/serial/of-serial.txt3
-rw-r--r--drivers/tty/serial/8250/8250.c23
-rw-r--r--drivers/tty/serial/of_serial.c6
-rw-r--r--include/uapi/linux/serial_core.h5
4 files changed, 35 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
index 1e1145ca4f3c..8f01cb190f25 100644
--- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
@@ -11,6 +11,9 @@ Required properties:
11 - "nvidia,tegra20-uart" 11 - "nvidia,tegra20-uart"
12 - "nxp,lpc3220-uart" 12 - "nxp,lpc3220-uart"
13 - "ibm,qpace-nwp-serial" 13 - "ibm,qpace-nwp-serial"
14 - "altr,16550-FIFO32"
15 - "altr,16550-FIFO64"
16 - "altr,16550-FIFO128"
14 - "serial" if the port type is unknown. 17 - "serial" if the port type is unknown.
15- reg : offset and length of the register set for the device. 18- reg : offset and length of the register set for the device.
16- interrupts : should contain uart interrupt. 19- interrupts : should contain uart interrupt.
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 1c4ca8a0d07f..733f22cd6b8a 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -308,7 +308,28 @@ static const struct serial8250_config uart_config[] = {
308 }, 308 },
309 [PORT_8250_CIR] = { 309 [PORT_8250_CIR] = {
310 .name = "CIR port" 310 .name = "CIR port"
311 } 311 },
312 [PORT_ALTR_16550_F32] = {
313 .name = "Altera 16550 FIFO32",
314 .fifo_size = 32,
315 .tx_loadsz = 32,
316 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
317 .flags = UART_CAP_FIFO | UART_CAP_AFE,
318 },
319 [PORT_ALTR_16550_F64] = {
320 .name = "Altera 16550 FIFO64",
321 .fifo_size = 64,
322 .tx_loadsz = 64,
323 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
324 .flags = UART_CAP_FIFO | UART_CAP_AFE,
325 },
326 [PORT_ALTR_16550_F128] = {
327 .name = "Altera 16550 FIFO128",
328 .fifo_size = 128,
329 .tx_loadsz = 128,
330 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
331 .flags = UART_CAP_FIFO | UART_CAP_AFE,
332 },
312}; 333};
313 334
314/* Uart divisor latch read */ 335/* Uart divisor latch read */
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index e7cae1c2d7d2..34906292bf16 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -240,6 +240,12 @@ static struct of_device_id of_platform_serial_table[] = {
240 { .compatible = "ns16850", .data = (void *)PORT_16850, }, 240 { .compatible = "ns16850", .data = (void *)PORT_16850, },
241 { .compatible = "nvidia,tegra20-uart", .data = (void *)PORT_TEGRA, }, 241 { .compatible = "nvidia,tegra20-uart", .data = (void *)PORT_TEGRA, },
242 { .compatible = "nxp,lpc3220-uart", .data = (void *)PORT_LPC3220, }, 242 { .compatible = "nxp,lpc3220-uart", .data = (void *)PORT_LPC3220, },
243 { .compatible = "altr,16550-FIFO32",
244 .data = (void *)PORT_ALTR_16550_F32, },
245 { .compatible = "altr,16550-FIFO64",
246 .data = (void *)PORT_ALTR_16550_F64, },
247 { .compatible = "altr,16550-FIFO128",
248 .data = (void *)PORT_ALTR_16550_F128, },
243#ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL 249#ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
244 { .compatible = "ibm,qpace-nwp-serial", 250 { .compatible = "ibm,qpace-nwp-serial",
245 .data = (void *)PORT_NWPSERIAL, }, 251 .data = (void *)PORT_NWPSERIAL, },
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index 8f6e50a9972c..c019b249e58c 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -51,7 +51,10 @@
51#define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ 51#define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */
52#define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ 52#define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */
53#define PORT_BRCM_TRUMANAGE 25 53#define PORT_BRCM_TRUMANAGE 25
54#define PORT_MAX_8250 25 /* max port ID */ 54#define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */
55#define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */
56#define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */
57#define PORT_MAX_8250 28 /* max port ID */
55 58
56/* 59/*
57 * ARM specific type numbers. These are not currently guaranteed 60 * ARM specific type numbers. These are not currently guaranteed