X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-pci.c;h=f20fc3354cc0c96a10a0747e0ce3fb4e61d958d8;hb=81192b79661cf2763abecbf3c3b673142ef4a2cd;hp=cda1c6d5f78ce6126ccb695a9eedd86bc6361553;hpb=774da4b9aadeea4d6973a16debc02a6801ff9344;p=u-boot diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index cda1c6d5f7..f20fc3354c 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -32,8 +32,8 @@ static void ehci_pci_init(struct udevice *dev, struct ehci_hccr **ret_hccr, hcor = (struct ehci_hcor *)((uintptr_t) hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); - debug("EHCI-PCI init hccr 0x%x and hcor 0x%x hc_length %d\n", - (u32)hccr, (u32)hcor, + debug("EHCI-PCI init hccr %#lx and hcor %#lx hc_length %d\n", + (ulong)hccr, (ulong)hcor, (u32)HC_LENGTH(ehci_readl(&hccr->cr_capbase))); *ret_hccr = hccr; @@ -126,22 +126,17 @@ static int ehci_pci_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST); } -static int ehci_pci_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - 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, + .remove = ehci_deregister, + .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),