Skip to content

Commit

Permalink
ARM: vt8500: Update vt8500-ehci driver to support device tree.
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tony Prisk authored and Greg Kroah-Hartman committed Aug 16, 2012
1 parent dfdda5a commit 8ad551d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/usb/vt8500-ehci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
VIA VT8500 and Wondermedia WM8xxx SoC USB controllers.

Required properties:
- compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci".
- reg: Address range of the ehci registers. size should be 0x200
- interrupts: Should contain the ehci interrupt.

usb: ehci@D8007100 {
compatible = "wm,prizm-ehci", "usb-ehci";
reg = <0xD8007100 0x200>;
interrupts = <1>;
};
9 changes: 9 additions & 0 deletions drivers/usb/host/ehci-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -139,14 +140,22 @@ 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,
.shutdown = usb_hcd_platform_shutdown,
.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);

0 comments on commit 8ad551d

Please sign in to comment.