1 From 956b857c1fc80164859adbe1147704b1f352e153 Mon Sep 17 00:00:00 2001
2 From: Al Cooper <alcooperx@gmail.com>
3 Date: Fri, 6 Dec 2013 00:18:25 +0100
4 Subject: [PATCH 195/203] usb: Add Device Tree support to XHCI Platform driver
6 Add Device Tree match table to xhci-plat.c. Add DT bindings document.
8 Signed-off-by: Al Cooper <alcooperx@gmail.com>
9 Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
10 Cc: Felipe Balbi <balbi@ti.com>
11 Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
14 drivers/usb/host/xhci-plat.c
16 Documentation/devicetree/bindings/usb/usb-xhci.txt | 14 ++++++++++++++
17 drivers/usb/host/xhci-plat.c | 10 ++++++++++
18 2 files changed, 24 insertions(+)
19 create mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.txt
22 +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
27 + - compatible: should be "xhci-platform".
28 + - reg: should contain address and length of the standard XHCI
29 + register set for the device.
30 + - interrupts: one XHCI interrupt should be described here.
34 + compatible = "xhci-platform";
35 + reg = <0xf0931000 0x8c8>;
36 + interrupts = <0x0 0x4e 0x0>;
38 --- a/drivers/usb/host/xhci-plat.c
39 +++ b/drivers/usb/host/xhci-plat.c
41 #include <linux/platform_device.h>
42 #include <linux/module.h>
43 #include <linux/slab.h>
44 +#include <linux/of.h>
48 @@ -186,11 +187,20 @@ static int xhci_plat_remove(struct platf
53 +static const struct of_device_id usb_xhci_of_match[] = {
54 + { .compatible = "xhci-platform" },
57 +MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
60 static struct platform_driver usb_xhci_driver = {
61 .probe = xhci_plat_probe,
62 .remove = xhci_plat_remove,
65 + .of_match_table = of_match_ptr(usb_xhci_of_match),
68 MODULE_ALIAS("platform:xhci-hcd");