Skip to contentSkip to conversation

ARM: vt8500: Update vt8500-ehci driver to support device tree.

PATCH Superseded Tony Prisk 1 participant 2 messages Jul 19, 2012

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Tony Prisk

author
#0 lore raw

PATCH 1/2 ARM: vt8500: Update vt8500-ehci driver to support device tree.

---
 .../devicetree/bindings/usb/vt8500-ehci.txt        |   12 ++++++++++++
 drivers/usb/host/ehci-vt8500.c                     |    9 +++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/vt8500-ehci.txt
Documentation/devicetree/bindings/usb/vt8500-ehci.txt new file +12 -0
new file mode 100644
index 0000000..c14b38c
@@ -0,0 +1,12 @@
+VIA VT8500 and Wondermedia WM8xxx SoC USB controllers.
+
+EHCI
+
+Required properties:
+ - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci".
+
+usb: ehci at D8007100 {
+	compatible = "wm,prizm-ehci", "usb-ehci";
+	reg = <0xD8007100 0x200>;
+	interrupts = <1>;
+};
drivers/usb/host/ehci-vt8500.c +9 -0
index c1eda73..4ba8f0c 100644
@@ -16,6 +16,7 @@
  *
  */
 
+#include <linux/of.h>
 #include <linux/platform_device.h>
 
 static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
@@ -162,6 +163,12 @@ static int vt8500_ehci_drv_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id vt8500_ehci_ids[] = {
+	{ .compatible = "via,vt8500-ehci", },
+	{ .compatible = "wm,prizm-ehci", },
+	{}
+};
+
 static struct platform_driver vt8500_ehci_driver = {
 	.probe		= vt8500_ehci_drv_probe,
 	.remove		= vt8500_ehci_drv_remove,
@@ -169,7 +176,9 @@ static struct platform_driver vt8500_ehci_driver = {
 	.driver = {
 		.name	= "vt8500-ehci",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(vt8500_ehci_ids),
 	}
 };
 
 MODULE_ALIAS("platform:vt8500-ehci");
+MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/2 ARM: vt8500: Add support for UHCI companion controller

Add support for the UHCI companion controller in arch-vt8500. This patch is based almost entirely off uhci-grlib.c with additions for device tree support.

---
 drivers/usb/host/Kconfig    |   11 +++-
 drivers/usb/host/uhci-hcd.c |    5 ++
 drivers/usb/host/uhci-of.c  |  158 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 172 insertions(+), 2 deletions(-)
 create mode 100644 drivers/usb/host/uhci-of.c
drivers/usb/host/Kconfig +9 -2
index 83e58df..a79410b 100644
@@ -450,7 +450,7 @@ config USB_OHCI_LITTLE_ENDIAN
 
 config USB_UHCI_HCD
 	tristate "UHCI HCD (most Intel and VIA) support"
-	depends on USB && (PCI || SPARC_LEON)
+	depends on USB && (PCI || SPARC_LEON || ARCH_VT8500)
 	---help---
 	  The Universal Host Controller Interface is a standard by Intel for
 	  accessing the USB hardware in the PC (which is also called the USB
@@ -468,7 +468,14 @@ config USB_UHCI_HCD
 config USB_UHCI_SUPPORT_NON_PCI_HC
 	bool
 	depends on USB_UHCI_HCD
-	default y if SPARC_LEON
+	default y if (SPARC_LEON || ARCH_VT8500)
+
+config USB_UHCI_OF
+	bool "Generic Non-PCI UHCI Driver support"
+	depends on USB_UHCI_SUPPORT_NON_PCI_HC
+	default y if ARCH_VT8500
+	---help---
+	  Generic Non-PCI UHCI driver.
 
 config USB_UHCI_BIG_ENDIAN_MMIO
 	bool
drivers/usb/host/uhci-hcd.c +5 -0
index e4db350..fd3721c 100644
@@ -846,6 +846,11 @@ static const char hcd_name[] = "uhci_hcd";
 #define PLATFORM_DRIVER		uhci_grlib_driver
 #endif
 
+#ifdef CONFIG_USB_UHCI_OF
+#include "uhci-of.c"
+#define PLATFORM_DRIVER		uhci_of_driver
+#endif
+
 #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER)
 #error "missing bus glue for uhci-hcd"
 #endif
drivers/usb/host/uhci-of.c new file +158 -0

158 lines not on this page · raw message

Signature · 1 line
1.7.2.5