packages: enable AP mode on r8188eu
[openwrt/openwrt.git] / target / linux / sunxi / patches-3.13 / 180-6-usb-ehci-change-compat-string.patch
1 From 80c544c77beeffee4e9484bf193ab391297688cd Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Tue, 11 Feb 2014 11:46:13 +0100
4 Subject: [PATCH] ehci-platform: Change compatible string from usb-ehci to
5 generic-ehci
6
7 The initial versions of the devicetree enablement patches for ehci-platform
8 used "ehci-platform" as compatible string. However this was disliked by various
9 reviewers because the platform bus is a Linux invention and devicetree is
10 supposed to be OS agnostic. After much discussion I gave up, added a:
11 "depends on !PPC_OF" to Kconfig to avoid a known conflict with PPC-OF platforms
12 and went with the generic usb-ehci as requested.
13
14 In retro-spect I should have chosen something different, the dts files for many
15 existing boards already claim to be compatible with "usb-ehci", ie they have:
16
17 compatible = "ti,ehci-omap", "usb-ehci";
18
19 In theory this should not be a problem since the "ti,ehci-omap" entry takes
20 presedence, but in practice using a conflicting compatible string is an issue,
21 because it makes which driver gets used depend on driver registration order.
22
23 This patch changes the compatible string claimed by ehci-platform to
24 "generic-ehci", avoiding the driver registration / module loading ordering
25 problems, and removes the "depends on !PPC_OF" workaround.
26
27 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
28 ---
29 Documentation/devicetree/bindings/usb/usb-ehci.txt | 4 ++--
30 drivers/usb/host/Kconfig | 1 -
31 drivers/usb/host/ehci-platform.c | 2 +-
32 3 files changed, 3 insertions(+), 4 deletions(-)
33
34 diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
35 index 2c1aeeb..ff151ec 100644
36 --- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
37 +++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
38 @@ -1,7 +1,7 @@
39 USB EHCI controllers
40
41 Required properties:
42 - - compatible : should be "usb-ehci".
43 + - compatible : should be "generic-ehci".
44 - reg : should contain at least address and length of the standard EHCI
45 register set for the device. Optional platform-dependent registers
46 (debug-port or other) can be also specified here, but only after
47 @@ -27,7 +27,7 @@ Example (Sequoia 440EPx):
48
49 Example (Allwinner sun4i A10 SoC):
50 ehci0: usb@01c14000 {
51 - compatible = "allwinner,sun4i-a10-ehci", "usb-ehci";
52 + compatible = "allwinner,sun4i-a10-ehci", "generic-ehci";
53 reg = <0x01c14000 0x100>;
54 interrupts = <39>;
55 clocks = <&ahb_gates 1>;
56 diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
57 index e28cbe0..a9707da 100644
58 --- a/drivers/usb/host/Kconfig
59 +++ b/drivers/usb/host/Kconfig
60 @@ -255,7 +255,6 @@ config USB_EHCI_ATH79
61
62 config USB_EHCI_HCD_PLATFORM
63 tristate "Generic EHCI driver for a platform device"
64 - depends on !PPC_OF
65 default n
66 ---help---
67 Adds an EHCI host driver for a generic platform device, which
68 diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
69 index 8fde649..1178730 100644
70 --- a/drivers/usb/host/ehci-platform.c
71 +++ b/drivers/usb/host/ehci-platform.c
72 @@ -333,7 +333,7 @@ static int ehci_platform_resume(struct device *dev)
73 static const struct of_device_id vt8500_ehci_ids[] = {
74 { .compatible = "via,vt8500-ehci", },
75 { .compatible = "wm,prizm-ehci", },
76 - { .compatible = "usb-ehci", },
77 + { .compatible = "generic-ehci", },
78 {}
79 };
80 MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
81 --
82 1.8.5.5
83