summaryrefslogtreecommitdiff
path: root/target/linux/ramips/patches-3.8/0203-owrt-OF-USB-add-OF-binding-for-ehci-and-ohci-platfor.patch
blob: 13a45b2626e2dea190f843b764a7a5ce4ca1b4b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From 3c99a50d689cb4811b13b9810d18c9316587216f Mon Sep 17 00:00:00 2001
From: John Crispin <blogic@openwrt.org>
Date: Mon, 18 Mar 2013 20:51:21 +0100
Subject: [PATCH 203/208] owrt: OF: USB: add OF binding for ehci and ohci
 platform driver

Make ohci-platform and ehci-platform loadable from OF.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 drivers/usb/host/ehci-platform.c |    7 +++++++
 drivers/usb/host/ohci-platform.c |    7 +++++++
 2 files changed, 14 insertions(+)

--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -183,6 +183,12 @@ static int ehci_platform_resume(struct d
 #define ehci_platform_resume	NULL
 #endif /* CONFIG_PM */
 
+static const struct of_device_id ehci_match_table[] = {
+	{ .compatible = "ehci-platform" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ehci_match_table);
+
 static const struct platform_device_id ehci_platform_table[] = {
 	{ "ehci-platform", 0 },
 	{ }
@@ -203,6 +209,7 @@ static struct platform_driver ehci_platf
 		.owner	= THIS_MODULE,
 		.name	= "ehci-platform",
 		.pm	= &ehci_platform_pm_ops,
+		.of_match_table = ehci_match_table,
 	}
 };
 
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -200,6 +200,12 @@ static int ohci_platform_resume(struct d
 #define ohci_platform_resume	NULL
 #endif /* CONFIG_PM */
 
+static const struct of_device_id ohci_match_table[] = {
+	{ .compatible = "ohci-platform" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ohci_match_table);
+
 static const struct platform_device_id ohci_platform_table[] = {
 	{ "ohci-platform", 0 },
 	{ }
@@ -220,5 +226,6 @@ static struct platform_driver ohci_platf
 		.owner	= THIS_MODULE,
 		.name	= "ohci-platform",
 		.pm	= &ohci_platform_pm_ops,
+		.of_match_table = ohci_match_table,
 	}
 };