aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/usb/ohci-nxp.txt16
-rw-r--r--drivers/usb/host/ohci-nxp.c10
2 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/usb/ohci-nxp.txt b/Documentation/devicetree/bindings/usb/ohci-nxp.txt
new file mode 100644
index 000000000000..b5c36319e634
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ohci-nxp.txt
@@ -0,0 +1,16 @@
1* OHCI controller, NXP ohci-nxp variant
2
3Required properties:
4- compatible: must be "nxp,ohci-nxp"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: The OHCI interrupt
8
9Example (LPC32xx):
10
11 ohci@31020000 {
12 compatible = "nxp,ohci-nxp";
13 reg = <0x31020000 0x300>;
14 interrupt-parent = <&mic>;
15 interrupts = <0x3b 0>;
16 };
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index 63261f7c2f79..bf542e7e2b1c 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -22,6 +22,7 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/of.h>
25 26
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
@@ -525,10 +526,19 @@ static int usb_hcd_nxp_remove(struct platform_device *pdev)
525/* work with hotplug and coldplug */ 526/* work with hotplug and coldplug */
526MODULE_ALIAS("platform:usb-ohci"); 527MODULE_ALIAS("platform:usb-ohci");
527 528
529#ifdef CONFIG_OF
530static const struct of_device_id usb_hcd_nxp_match[] = {
531 { .compatible = "nxp,ohci-nxp" },
532 {},
533};
534MODULE_DEVICE_TABLE(of, usb_hcd_nxp_match);
535#endif
536
528static struct platform_driver usb_hcd_nxp_driver = { 537static struct platform_driver usb_hcd_nxp_driver = {
529 .driver = { 538 .driver = {
530 .name = "usb-ohci", 539 .name = "usb-ohci",
531 .owner = THIS_MODULE, 540 .owner = THIS_MODULE,
541 .of_match_table = of_match_ptr(usb_hcd_nxp_match),
532 }, 542 },
533 .probe = usb_hcd_nxp_probe, 543 .probe = usb_hcd_nxp_probe,
534 .remove = usb_hcd_nxp_remove, 544 .remove = usb_hcd_nxp_remove,