[U-Boot] [PATCH v2 02/55] dm: usb: Add a compatible string for PCI EHCI controller

Simon Glass sjg at chromium.org
Mon Jan 18 00:11:07 CET 2016


Add a compatible string to allow this to be specified in the device tree
if needed.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Add missing of_match member init so that ehci_pci_ids[] is used

 drivers/usb/host/ehci-pci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index cda1c6d..f21a1fa 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -137,11 +137,17 @@ static int ehci_pci_remove(struct udevice *dev)
 	return 0;
 }
 
+static const struct udevice_id ehci_pci_ids[] = {
+	{ .compatible = "ehci-pci" },
+	{ }
+};
+
 U_BOOT_DRIVER(ehci_pci) = {
 	.name	= "ehci_pci",
 	.id	= UCLASS_USB,
 	.probe = ehci_pci_probe,
 	.remove = ehci_pci_remove,
+	.of_match = ehci_pci_ids,
 	.ops	= &ehci_usb_ops,
 	.platdata_auto_alloc_size = sizeof(struct usb_platdata),
 	.priv_auto_alloc_size = sizeof(struct ehci_pci_priv),
-- 
2.6.0.rc2.230.g3dd15c0



More information about the U-Boot mailing list