Skip to contentSkip to conversation

serial/arc-uart: Add new driver

PATCH Superseded [email protected] 1 participant 2 messages Oct 26, 2012

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 serial/arc-uart: Add new driver

From: Vineet Gupta <[email protected]>

Hi,

Here's the updated revision with fixes per Greg and Felipe' review comments. -Rebased off tty-next tip.
-Build tested for x86, both as builtin and as module
-Same driver (as module) verified on ARCAngel4 Board.

Please consider applying.

Thanks,
Vineet

v6:
* syntactical changes per comments by Felipe
* Empty (request|release)_port removed

v5:
* Driver now builds as module; default !y
* Fixed some build wreckage due to SERIAL_ARC && !SERIAL_ARC_CONSOLE
* Fixed a sparse warning due to forced cast, hence reg offsets now in bytes

v4:
* UAPI disintegration fallout for serial_core.h
* rebased off of tty-next

v3:
* Removed empty arc_serial_set_ldisc()
* More set_termios fixes - CSIZE forced to CS8 (for 8N1)
* global @running_on_iss replaced with platform data, saved in device specific port structure.

v2:
* ttyARC used as device name
* Dynamic assignment of major/minor numbers.
* Ref counting tty in rx routine to prevent it from disappearing in case of a hangup
* set_termios fixes:
- hardware flow control/parity are marked as unsupported
- baud written back to termios
* cosmetics such as commenting the need for @running_on_iss, empty lines etc

Vineet Gupta (1):
serial/arc-uart: Add new driver

 drivers/tty/serial/Kconfig       |   23 ++
 drivers/tty/serial/Makefile      |    1 +
 drivers/tty/serial/arc_uart.c    |  754 ++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/serial_core.h |    2 +
 4 files changed, 780 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/arc_uart.c
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v6 1/1 serial/arc-uart: Add new driver

From: Vineet Gupta <[email protected]>

Driver for non-standard on-chip UART, instantiated in the ARC (Synopsys) FPGA Boards such as ARCAngel4/ML50x

---
 drivers/tty/serial/Kconfig       |   23 ++
 drivers/tty/serial/Makefile      |    1 +
 drivers/tty/serial/arc_uart.c    |  734 ++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/serial_core.h |    2 +
 4 files changed, 760 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/arc_uart.c
drivers/tty/serial/Kconfig +23 -0
index 2a53be5..b176801 100644
@@ -1423,4 +1423,27 @@ config SERIAL_EFM32_UART_CONSOLE
 	depends on SERIAL_EFM32_UART=y
 	select SERIAL_CORE_CONSOLE
 
+config SERIAL_ARC
+	tristate "ARC UART driver support"
+	select SERIAL_CORE
+	help
+	  Driver for on-chip UART for ARC(Synopsys) for the legacy
+	  FPGA Boards (ML50x/ARCAngel4)
+
+config SERIAL_ARC_CONSOLE
+	bool "Console on ARC UART"
+	depends on SERIAL_ARC=y
+	select SERIAL_CORE_CONSOLE
+	help
+	  Enable system Console on ARC UART
+
+config SERIAL_ARC_NR_PORTS
+	int "Number of ARC UART ports"
+	depends on SERIAL_ARC
+	range 1 3
+	default "1"
+	help
+	  Set this to the number of serial ports you want the driver
+	  to support.
+
 endmenu
drivers/tty/serial/Makefile +1 -0
index 4f694da..df1b998 100644
@@ -82,3 +82,4 @@ obj-$(CONFIG_SERIAL_XILINX_PS_UART) += xilinx_uartps.o
 obj-$(CONFIG_SERIAL_SIRFSOC) += sirfsoc_uart.o
 obj-$(CONFIG_SERIAL_AR933X)   += ar933x_uart.o
 obj-$(CONFIG_SERIAL_EFM32_UART) += efm32-uart.o
+obj-$(CONFIG_SERIAL_ARC)	+= arc_uart.o
drivers/tty/serial/arc_uart.c new file +734 -0

734 lines not on this page · raw message

include/uapi/linux/serial_core.h +2 -0
index 7e1ab20..ebcc73f 100644
@@ -215,5 +215,7 @@
 /* Energy Micro efm32 SoC */
 #define PORT_EFMUART   100
 
+/* ARC (Synopsys) on-chip UART */
+#define PORT_ARC       101
 
 #endif /* _UAPILINUX_SERIAL_CORE_H */
Signature · 1 line
1.7.4.1