Skip to contentSkip to conversation

serial/arc-uart: Add new driver

PATCH Superseded [email protected] 2 participants 2 messages Oct 4, 2012 – Oct 24, 2012

Subsystems (2)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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

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

---
 drivers/tty/serial/Kconfig    |   25 ++
 drivers/tty/serial/Makefile   |    1 +
 drivers/tty/serial/arc_uart.c |  747 +++++++++++++++++++++++++++++++++++++++++
 include/linux/serial_core.h   |    3 +
 4 files changed, 776 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/arc_uart.c
drivers/tty/serial/Kconfig +25 -0
index 4720b4b..af4bd69 100644
@@ -1360,4 +1360,29 @@ config SERIAL_EFM32_UART_CONSOLE
 	depends on SERIAL_EFM32_UART=y
 	select SERIAL_CORE_CONSOLE
 
+config SERIAL_ARC
+	bool "ARC UART driver support"
+	select SERIAL_CORE
+	default y
+	help
+	  Driver for on-chip UART for ARC(Synopsys) for the legacy
+	  FPGA Boards (ML50x/ARCAngel4)
+
+config SERIAL_ARC_CONSOLE
+	bool
+	select SERIAL_CORE_CONSOLE
+	depends on SERIAL_ARC=y
+	default y
+	help
+	  Enable system Console on ARC UART
+
+config SERIAL_ARC_NR_PORTS
+	int 'Number of ports'
+	range 1 3
+	default 1
+	depends on SERIAL_ARC
+	help
+	  Set this to the number of serial ports you want the driver
+	  to support.
+
 endmenu
drivers/tty/serial/Makefile +1 -0
index 7257c5d..2b70b5f 100644
@@ -79,3 +79,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 +747 -0

747 lines not on this page · raw message

include/linux/serial_core.h +3 -0
index 0253c20..706a042 100644
@@ -214,6 +214,9 @@
 /* Energy Micro efm32 SoC */
 #define PORT_EFMUART   100
 
+/* ARC (Synopsys) on-chip UART */
+#define PORT_ARC       101
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
Signature · 1 line
1.7.4.1
maintainer
#1 lore raw
Quoted 4 lines · On Thu, Oct 04, 2012 at 01:05:52PM +0530, [email protected] wrote:

From: Vineet Gupta <[email protected]>

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

This patch does not apply against my tty-next tree, care to rebase it and resend it so that I can apply it?

thanks,

greg k-h