Skip to contentSkip to conversation

UART: add CSR SiRFprimaII SoC on-chip uart drivers

PATCH In review Barry Song 5 participants 8 messages Oct 28, 2011 – Nov 1, 2011 TTY layer and serial drivers

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/1 UART: add CSR SiRFprimaII SoC on-chip uart drivers

From: Rong Wang <[email protected]>

SiRFprimaII is the latest generation application processor from CSR?s multi-function SoC product family.
The SoC support codes are in arch/arm/mach-prima2 from Linux mainline 3.0.

There are three dedicated UARTs in system. This patch adds basic driver support for them.

It has used the newest pinmux subsystem from Linus Walleij.

---
note:
this patch depends on Linus W's newest pinctrl subsystem, so it was not gone through tty tree. Linus W suggested me to send the patch to you directly.

 drivers/tty/serial/Kconfig        |   21 +
 drivers/tty/serial/Makefile       |    1 +
 drivers/tty/serial/sirfsoc_uart.c |  783 +++++++++++++++++++++++++++++++++++++
 drivers/tty/serial/sirfsoc_uart.h |  185 +++++++++
 4 files changed, 990 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/sirfsoc_uart.c
 create mode 100644 drivers/tty/serial/sirfsoc_uart.h
drivers/tty/serial/Kconfig +21 -0
index 5f479da..c1e4d09 100644
@@ -535,6 +535,27 @@ config SERIAL_S5PV210
 	help
 	  Serial port support for Samsung's S5P Family of SoC's
 
+config SERIAL_SIRFSOC
+        tristate "SiRF SoC Platform Serial port support"
+        depends on ARM && ARCH_PRIMA2
+        select SERIAL_CORE
+        help
+          Support for the on-chip UART on the CSR SiRFprimaII series,
+          providing /dev/ttyS0, 1 and 2 (note, some machines may not
+          provide all of these ports, depending on how the serial port
+          pins are configured.
+
+config SERIAL_SIRFSOC_CONSOLE
+        bool "Support for console on SiRF SoC serial port"
+        depends on SERIAL_SIRFSOC=y
+        select SERIAL_CORE_CONSOLE
+        help
+          Even if you say Y here, the currently visible virtual console
+          (/dev/tty0) will still be used as the system console by default, but
+          you can alter that using a kernel command line option such as
+          "console=ttySiRFx". (Try "man bootparam" or see the documentation of
+          your boot loader about how to pass options to the kernel at
+          boot time.)
 
 config SERIAL_MAX3100
 	tristate "MAX3100 support"
drivers/tty/serial/Makefile +1 -0
index e10cf5b..af57089 100644
@@ -94,3 +94,4 @@ obj-$(CONFIG_SERIAL_MSM_SMD)	+= msm_smd_tty.o
 obj-$(CONFIG_SERIAL_MXS_AUART) += mxs-auart.o
 obj-$(CONFIG_SERIAL_LANTIQ)	+= lantiq.o
 obj-$(CONFIG_SERIAL_XILINX_PS_UART) += xilinx_uartps.o
+obj-$(CONFIG_SERIAL_SIRFSOC) += sirfsoc_uart.o
drivers/tty/serial/sirfsoc_uart.c new file +783 -0

783 lines not on this page · raw message

drivers/tty/serial/sirfsoc_uart.h new file +185 -0

185 lines not on this page · raw message

Signature · 6 lines
1.7.1



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
#1 lore raw

Hi Barry,

Quoted 18 lines · Barry Song

From: Rong Wang <[email protected]>

SiRFprimaII is the latest generation application processor from CSR?s multi-function SoC product family.
The SoC support codes are in arch/arm/mach-prima2 from Linux mainline 3.0.

There are three dedicated UARTs in system. This patch adds basic driver support for them.

It has used the newest pinmux subsystem from Linus Walleij.

---

[snip]

drivers/tty/serial/Kconfig config SERIAL_S5PV210 · line 546

Quoted 9 lines
drivers/tty/serial/Kconfig +9 -0
+config SERIAL_SIRFSOC
+        tristate "SiRF SoC Platform Serial port support"
+        depends on ARM && ARCH_PRIMA2
+        select SERIAL_CORE
+        help
+          Support for the on-chip UART on the CSR SiRFprimaII series,
+          providing /dev/ttyS0, 1 and 2 (note, some machines may not
+          provide all of these ports, depending on how the serial port
+          pins are configured.

Unbalanced parentheses.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

2011/10/28 Baruch Siach <[email protected]>:

Quoted 34 lines

Hi Barry,

Quoted 18 lines · Barry Song

From: Rong Wang <[email protected]>

SiRFprimaII is the latest generation application processor from CSR?s multi-function SoC product family.
The SoC support codes are in arch/arm/mach-prima2 from Linux mainline 3.0.

There are three dedicated UARTs in system. This patch adds basic driver support for them.

It has used the newest pinmux subsystem from Linus Walleij.

---

[snip]

Quoted 9 lines

+config SERIAL_SIRFSOC
+ ? ? ? ?tristate "SiRF SoC Platform Serial port support"
+ ? ? ? ?depends on ARM && ARCH_PRIMA2
+ ? ? ? ?select SERIAL_CORE
+ ? ? ? ?help
+ ? ? ? ? ?Support for the on-chip UART on the CSR SiRFprimaII series,
+ ? ? ? ? ?providing /dev/ttyS0, 1 and 2 (note, some machines may not
+ ? ? ? ? ?provide all of these ports, depending on how the serial port
+ ? ? ? ? ?pins are configured.

Quoted 1 line

Unbalanced parentheses.

Hi Baruch,
Thanks for reviewing! I sent this mail for Torvalds to pick seperately since it depends on pinctl tree, and it was not gone through tty tree since tty has no pinctrl before linus merges it.
This patch has been reviewed and acked in linux-serial, unfortunately, missed this error.
i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

Quoted 7 lines

baruch

--
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ~. .~ ? Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= ? - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

-barry

#3 lore raw
Quoted 3 lines

i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

That would be the best idea - its a trivial typo so doesn't really matter much.

#4 lore raw

2011/11/1 Alan Cox <[email protected]>:

Quoted 6 lines
Quoted 3 lines

i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

That would be the best idea - its a trivial typo so doesn't really matter much.

ok, Alan.

Linus, have you gotten it? and can you apply it?
or do you want this to go through tty tree and merge it until next merge window?

-barry

#5 lore raw
Quoted 11 lines · Barry Song

2011/11/1 Alan Cox <[email protected]>:

Quoted 6 lines
Quoted 3 lines

i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

That would be the best idea - its a trivial typo so doesn't really matter much.

ok, Alan.

Linus, have you gotten it? and can you apply it?
or do you want this to go through tty tree and merge it until next merge window?

That's probably the easiest thing to do, right? Send it to me and I can handle it.

thanks,

greg k-h

#6 lore raw

2011/11/1 Greg KH <[email protected]>:

Quoted 8 lines · Barry Song
Quoted 7 lines

2011/11/1 Alan Cox <[email protected]>:

Quoted 6 lines
Quoted 3 lines

i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

That would be the best idea - its a trivial typo so doesn't really matter much.

Quoted 7 lines
Quoted 4 lines

ok, Alan.

Linus, have you gotten it? and can you apply it?
or do you want this to go through tty tree and merge it until next merge window?

That's probably the easiest thing to do, right? ?Send it to me and I can handle it.

Hi Greg, thanks! as i checked your tree, this patch should be able to apply on your tree since you already have pinmux subsystem. do i need to git send-email to you again for this?

Quoted 5 lines

thanks,

greg k-h

-barry

#7 lore raw
Quoted 14 lines · Barry Song

2011/11/1 Greg KH <[email protected]>:

Quoted 13 lines · Barry Song
Quoted 11 lines

2011/11/1 Alan Cox <[email protected]>:

Quoted 6 lines
Quoted 3 lines

i am not sure whether i will make Linus confused if i send a new version at this moment. how about i send a seperate patch to fix this after the driver is applied?

That would be the best idea - its a trivial typo so doesn't really matter much.

ok, Alan.

Linus, have you gotten it? and can you apply it?
or do you want this to go through tty tree and merge it until next merge window?

Quoted 6 lines
Quoted 2 lines

That's probably the easiest thing to do, right? ?Send it to me and I can handle it.

Hi Greg, thanks! as i checked your tree, this patch should be able to apply on your tree since you already have pinmux subsystem. do i need to git send-email to you again for this?

Yes, please do.

thanks,

greg k-h