History

tty/serial: Add support for Altera serial port

Add support for Altera 8250/16550 compatible serial port.

Ley Foon Tan committed 13 years ago

Commit e06c93c1 parent 5771a804 files · +35 −2Browse files

Unified · Split

4 files
  1. Documentation/devicetree/bindings/tty/serial/of-serial.txt +3 −0
  2. drivers/tty/serial/8250/8250.c +22 −1
  3. drivers/tty/serial/of_serial.c +6 −0
  4. include/uapi/linux/serial_core.h +4 −1
Documentation/devicetree/bindings/tty/serial/of-serial.txt+3−0
@@ -11,6 +11,9 @@ Required properties: · 10 unmodified lines
1111 - "nvidia,tegra20-uart"
1212 - "nxp,lpc3220-uart"
1313 - "ibm,qpace-nwp-serial"
14+ - "altr,16550-FIFO32"
15+ - "altr,16550-FIFO64"
16+ - "altr,16550-FIFO128"
1417 - "serial" if the port type is unknown.
1518 - reg : offset and length of the register set for the device.
1619 - interrupts : should contain uart interrupt.
drivers/tty/serial/8250/8250.c+22−1
@@ -301,7 +301,28 @@ static const struct serial8250_config uart_config[] = { · 300 unmodified lines
301301 },
302302 [PORT_8250_CIR] = {
303303 .name = "CIR port"
304− }
304+ },
305+ [PORT_ALTR_16550_F32] = {
306+ .name = "Altera 16550 FIFO32",
307+ .fifo_size = 32,
308+ .tx_loadsz = 32,
309+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
310+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
311+ },
312+ [PORT_ALTR_16550_F64] = {
313+ .name = "Altera 16550 FIFO64",
314+ .fifo_size = 64,
315+ .tx_loadsz = 64,
316+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
317+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
318+ },
319+ [PORT_ALTR_16550_F128] = {
320+ .name = "Altera 16550 FIFO128",
321+ .fifo_size = 128,
322+ .tx_loadsz = 128,
323+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
324+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
325+ },
305326 };
306327
307328 /* Uart divisor latch read */
drivers/tty/serial/of_serial.c+6−0
@@ -241,6 +241,12 @@ static struct of_device_id of_platform_serial_table[] = { · 240 unmodified lines
241241 { .compatible = "ns16850", .data = (void *)PORT_16850, },
242242 { .compatible = "nvidia,tegra20-uart", .data = (void *)PORT_TEGRA, },
243243 { .compatible = "nxp,lpc3220-uart", .data = (void *)PORT_LPC3220, },
244+ { .compatible = "altr,16550-FIFO32",
245+ .data = (void *)PORT_ALTR_16550_F32, },
246+ { .compatible = "altr,16550-FIFO64",
247+ .data = (void *)PORT_ALTR_16550_F64, },
248+ { .compatible = "altr,16550-FIFO128",
249+ .data = (void *)PORT_ALTR_16550_F128, },
244250 #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
245251 { .compatible = "ibm,qpace-nwp-serial",
246252 .data = (void *)PORT_NWPSERIAL, },
include/uapi/linux/serial_core.h+4−1
@@ -51,7 +51,10 @@ · 50 unmodified lines
5151 #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */
5252 #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */
5353 #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 */
5558
5659 /*
5760 * ARM specific type numbers. These are not currently guaranteed

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t