Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tony Prisk and committed by
Greg Kroah-Hartman
8ad551d1 dfdda5a0

+21
+12
Documentation/devicetree/bindings/usb/vt8500-ehci.txt
··· 1 + VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. 2 + 3 + Required properties: 4 + - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". 5 + - reg: Address range of the ehci registers. size should be 0x200 6 + - interrupts: Should contain the ehci interrupt. 7 + 8 + usb: ehci@D8007100 { 9 + compatible = "wm,prizm-ehci", "usb-ehci"; 10 + reg = <0xD8007100 0x200>; 11 + interrupts = <1>; 12 + };
+9
drivers/usb/host/ehci-vt8500.c
··· 16 16 * 17 17 */ 18 18 19 + #include <linux/of.h> 19 20 #include <linux/platform_device.h> 20 21 21 22 static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev) ··· 140 139 return 0; 141 140 } 142 141 142 + static const struct of_device_id vt8500_ehci_ids[] = { 143 + { .compatible = "via,vt8500-ehci", }, 144 + { .compatible = "wm,prizm-ehci", }, 145 + {} 146 + }; 147 + 143 148 static struct platform_driver vt8500_ehci_driver = { 144 149 .probe = vt8500_ehci_drv_probe, 145 150 .remove = vt8500_ehci_drv_remove, ··· 153 146 .driver = { 154 147 .name = "vt8500-ehci", 155 148 .owner = THIS_MODULE, 149 + .of_match_table = of_match_ptr(vt8500_ehci_ids), 156 150 } 157 151 }; 158 152 159 153 MODULE_ALIAS("platform:vt8500-ehci"); 154 + MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);