Skip to contentSkip to conversation

sparc,leon: Amba plug and play devices directory.

PATCH New [email protected] 1 participant 1 message Aug 19, 2009 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc,leon: Amba plug and play devices directory.

From: Konrad Eisele <[email protected]>

Add Amba plug and play scanning for Aeroflex Gaisler's GRLIB ips. All devices have a vendor and device id similar to pci. The subfolders are named <vendor>/<device>. First driver included is one for the APB uart: gaisler/apbuart.

---
 drivers/Kconfig                          |    2 +
 drivers/Makefile                         |    1 +
 drivers/ambapp/Kconfig                   |    9 +
 drivers/ambapp/Makefile                  |    6 +
 drivers/ambapp/ambapp.c                  |  361 +++++++++++++
 drivers/ambapp/ambapp.h                  |  246 +++++++++
 drivers/ambapp/ambapp_driver.c           |  219 ++++++++
 drivers/ambapp/gaisler/Kconfig           |   20 +
 drivers/ambapp/gaisler/Makefile          |    3 +
 drivers/ambapp/gaisler/apbuart/Makefile  |    3 +
 drivers/ambapp/gaisler/apbuart/apbuart.c |  837 ++++++++++++++++++++++++++++++
 include/linux/serial_core.h              |    3 +
 12 files changed, 1710 insertions(+), 0 deletions(-)
 create mode 100644 drivers/ambapp/Kconfig
 create mode 100644 drivers/ambapp/Makefile
 create mode 100644 drivers/ambapp/ambapp.c
 create mode 100644 drivers/ambapp/ambapp.h
 create mode 100644 drivers/ambapp/ambapp_driver.c
 create mode 100644 drivers/ambapp/gaisler/Kconfig
 create mode 100644 drivers/ambapp/gaisler/Makefile
 create mode 100644 drivers/ambapp/gaisler/apbuart/Makefile
 create mode 100644 drivers/ambapp/gaisler/apbuart/apbuart.c
drivers/Kconfig +2 -0
index 48bbdbe..f2a19c5 100644
@@ -113,4 +113,6 @@ source "drivers/xen/Kconfig"
 source "drivers/staging/Kconfig"
 
 source "drivers/platform/Kconfig"
+
+source "drivers/ambapp/Kconfig"
 endmenu
drivers/Makefile +1 -0
index bc4205d..e2d0e96 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_ACPI)		+= acpi/
 # was used and do nothing if so
 obj-$(CONFIG_PNP)		+= pnp/
 obj-$(CONFIG_ARM_AMBA)		+= amba/
+obj-$(CONFIG_SPARC_LEON)	+= ambapp/
 
 obj-$(CONFIG_XEN)		+= xen/
 
drivers/ambapp/Kconfig new file +9 -0
new file mode 100644
index 0000000..c7dc306
@@ -0,0 +1,9 @@
+#------------------------------------------------------------------------------
+# Ambapp device driver configuration
+#------------------------------------------------------------------------------
+
+menu "Grlib: Amba plug and play device driver configuration"
+
+source "drivers/ambapp/gaisler/Kconfig"
+
+endmenu
drivers/ambapp/Makefile new file +6 -0
new file mode 100644
index 0000000..92f3c0d
@@ -0,0 +1,6 @@
+#
+# Makefile for the Plug & Play AMBA bus specific drivers.
+#
+
+obj-y		        += ambapp.o ambapp_driver.o
+obj-y                   += gaisler/
drivers/ambapp/ambapp.c new file +348 -0

348 lines not on this page · raw message

drivers/ambapp/ambapp.h new file +246 -0

246 lines not on this page · raw message

drivers/ambapp/ambapp_driver.c new file +209 -0

209 lines not on this page · raw message

drivers/ambapp/gaisler/Kconfig new file +20 -0
new file mode 100644
index 0000000..d76f979
@@ -0,0 +1,20 @@
+
+menu "Vendor Gaisler"
+
+config GRLIB_GAISLER_APBUART
+	bool "Grlib apbuart driver"
+	depends on SPARC_LEON
+	default y
+	---help---
+	  Add the driver for the grlib apbuart serial core.
+
+config GRLIB_GAISLER_APBUART_CONSOLE
+	bool "Grlib apbuart serial console"
+	default y
+	depends on GRLIB_GAISLER_APBUART
+	select SERIAL_CORE_CONSOLE
+	help
+	  Running a console on grlib uart
+
+endmenu
+
drivers/ambapp/gaisler/Makefile new file +3 -0
new file mode 100644
index 0000000..12e06e2
@@ -0,0 +1,3 @@
+
+obj-$(CONFIG_GRLIB_GAISLER_APBUART)		+= apbuart/
+
drivers/ambapp/gaisler/apbuart/Makefile new file +3 -0
new file mode 100644
index 0000000..eb30a50
@@ -0,0 +1,3 @@
+
+obj-y		+= apbuart.o
+
drivers/ambapp/gaisler/apbuart/apbuart.c new file +829 -0

829 lines not on this page · raw message

include/linux/serial_core.h +3 -0
index 23d2fb0..62d4ca0 100644
@@ -174,6 +174,9 @@
 /* Qualcomm MSM SoCs */
 #define PORT_MSM	88
 
+/* SPARC leon */
+#define PORT_LEON	89
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
Signature · 1 line
1.6.3.2