Skip to content

Commit 56c2419

Browse files
jwrdegoedeabrodkin
authored andcommitted
ehci-platform: Change compatible string from usb-ehci to generic-ehci
The initial versions of the devicetree enablement patches for ehci-platform used "ehci-platform" as compatible string. However this was disliked by various reviewers because the platform bus is a Linux invention and devicetree is supposed to be OS agnostic. After much discussion I gave up, added a: "depends on !PPC_OF" to Kconfig to avoid a known conflict with PPC-OF platforms and went with the generic usb-ehci as requested. In retro-spect I should have chosen something different, the dts files for many existing boards already claim to be compatible with "usb-ehci", ie they have: compatible = "ti,ehci-omap", "usb-ehci"; In theory this should not be a problem since the "ti,ehci-omap" entry takes presedence, but in practice using a conflicting compatible string is an issue, because it makes which driver gets used depend on driver registration order. This patch changes the compatible string claimed by ehci-platform to "generic-ehci", avoiding the driver registration / module loading ordering problems, and removes the "depends on !PPC_OF" workaround. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8fdabb3 commit 56c2419

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Documentation/devicetree/bindings/usb/usb-ehci.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
USB EHCI controllers
22

33
Required properties:
4-
- compatible : should be "usb-ehci".
4+
- compatible : should be "generic-ehci".
55
- reg : should contain at least address and length of the standard EHCI
66
register set for the device. Optional platform-dependent registers
77
(debug-port or other) can be also specified here, but only after
@@ -27,7 +27,7 @@ Example (Sequoia 440EPx):
2727

2828
Example (Allwinner sun4i A10 SoC):
2929
ehci0: usb@01c14000 {
30-
compatible = "allwinner,sun4i-a10-ehci", "usb-ehci";
30+
compatible = "allwinner,sun4i-a10-ehci", "generic-ehci";
3131
reg = <0x01c14000 0x100>;
3232
interrupts = <39>;
3333
clocks = <&ahb_gates 1>;

drivers/usb/host/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ config USB_EHCI_ATH79
255255

256256
config USB_EHCI_HCD_PLATFORM
257257
tristate "Generic EHCI driver for a platform device"
258-
depends on !PPC_OF
259258
default n
260259
---help---
261260
Adds an EHCI host driver for a generic platform device, which

drivers/usb/host/ehci-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static int ehci_platform_resume(struct device *dev)
332332
static const struct of_device_id vt8500_ehci_ids[] = {
333333
{ .compatible = "via,vt8500-ehci", },
334334
{ .compatible = "wm,prizm-ehci", },
335-
{ .compatible = "usb-ehci", },
335+
{ .compatible = "generic-ehci", },
336336
{}
337337
};
338338
MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);

0 commit comments

Comments
 (0)