Skip to contentSkip to conversation

Support for GRLIB APBUART serial port

PATCH In review Kristoffer Glembo 3 participants 3 messages Nov 2, 2009 – Nov 4, 2009 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support for GRLIB APBUART serial port

This patch adds support for the APBUART serial port from Aeroflex Gaisler's IP library GRLIB. It is currently used in all LEON3 designs (SPARC V8) but can be used on other platforms as well.

---
 drivers/serial/Kconfig      |   13 +
 drivers/serial/Makefile     |    1 +
 drivers/serial/apbuart.c    |  710 +++++++++++++++++++++++++++++++++++++++++++
 drivers/serial/apbuart.h    |   64 ++++
 include/linux/serial_core.h |    3 +
 5 files changed, 791 insertions(+), 0 deletions(-)
 create mode 100644 drivers/serial/apbuart.c
 create mode 100644 drivers/serial/apbuart.h
drivers/serial/Kconfig +13 -0
index e522572..502c586 100644
@@ -1477,4 +1477,17 @@ config SERIAL_BCM63XX_CONSOLE
 	  If you have enabled the serial port on the bcm63xx CPU
 	  you can make it the console by answering Y to this option.
 
+config SERIAL_GRLIB_GAISLER_APBUART
+	tristate "GRLIB APBUART serial support"
+	depends on SPARC_LEON
+	---help---
+	Add support for the GRLIB APBUART serial port.
+
+config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE
+	bool "Console on GRLIB APBUART serial port"
+	depends on SERIAL_GRLIB_GAISLER_APBUART
+	select SERIAL_CORE_CONSOLE
+	help
+	Support for running a console on the GRLIB APBUART
+
 endmenu
drivers/serial/Makefile +1 -0
index d21d5dd..5548fe7 100644
@@ -81,3 +81,4 @@ obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o
 obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o
 obj-$(CONFIG_SERIAL_QE) += ucc_uart.o
 obj-$(CONFIG_SERIAL_TIMBERDALE)	+= timbuart.o
+obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o
drivers/serial/apbuart.c new file +710 -0

710 lines not on this page · raw message

drivers/serial/apbuart.h new file +64 -0

64 lines not on this page · raw message

include/linux/serial_core.h +3 -0
index db532ce..8c3dd36 100644
@@ -179,6 +179,9 @@
 /* BCM63xx family SoCs */
 #define PORT_BCM63XX	89
 
+/* Aeroflex Gaisler GRLIB APBUART */
+#define PORT_APBUART    90
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
Signature · 1 line
1.5.2.2
#1 lore raw
Quoted 3 lines · Kristoffer Glembo

This patch adds support for the APBUART serial port from Aeroflex Gaisler's IP library GRLIB. It is currently used in all LEON3 designs (SPARC V8) but can be used on other platforms as well.

[snip]

drivers/serial/Kconfig config SERIAL_BCM63XX_CONSOLE · line 1485

Quoted 6 lines
drivers/serial/Kconfig +6 -0
+config SERIAL_GRLIB_GAISLER_APBUART
+       tristate "GRLIB APBUART serial support"
+       depends on SPARC_LEON
+       ---help---
+       Add support for the GRLIB APBUART serial port.
+

Shouldn't it then depend on OpenFirmware rather than SPARC_LEON?

Thanks,

Signature · 4 lines
Julian Calaby

Email: [email protected]
.Plan: http://sites.google.com/site/juliancalaby/
#2 lore raw
In reply to Kristoffer Glembo

From: Julian Calaby <[email protected]>
Date: Wed, 4 Nov 2009 09:48:20 +1100

Quoted 5 lines · Kristoffer Glembo
Quoted 3 lines

This patch adds support for the APBUART serial port from Aeroflex Gaisler's IP library GRLIB. It is currently used in all LEON3 designs (SPARC V8) but can be used on other platforms as well.

[snip]

Quoted 8 lines

drivers/serial/Kconfig config SERIAL_BCM63XX_CONSOLE · line 1485

Quoted 6 lines
drivers/serial/Kconfig +6 -0
+config SERIAL_GRLIB_GAISLER_APBUART
+       tristate "GRLIB APBUART serial support"
+       depends on SPARC_LEON
+       ---help---
+       Add support for the GRLIB APBUART serial port.
+

Shouldn't it then depend on OpenFirmware rather than SPARC_LEON?

Yeah it probably should unless there are real dependencies on LEON specific functions, which I don't think this serial driver does.

Using "OF" as the dependency would be great for me because then I'd be able to test the build on this even on sparc64. :-)

So Kristoffer, please make this change and resubmit your patch. The driver looks fine to me otherwise.

Thanks!