1 // SPDX-License-Identifier: GPL-2.0
4 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
17 static int ohci_pci_probe(struct udevice *dev)
19 struct ohci_regs *regs;
21 regs = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, PCI_REGION_MEM);
22 return ohci_register(dev, regs);
25 static int ohci_pci_remove(struct udevice *dev)
27 return ohci_deregister(dev);
30 static const struct udevice_id ohci_pci_ids[] = {
31 { .compatible = "ohci-pci" },
35 U_BOOT_DRIVER(ohci_pci) = {
38 .probe = ohci_pci_probe,
39 .remove = ohci_pci_remove,
40 .of_match = ohci_pci_ids,
42 .platdata_auto_alloc_size = sizeof(struct usb_platdata),
43 .priv_auto_alloc_size = sizeof(ohci_t),
44 .flags = DM_FLAG_ALLOC_PRIV_DMA,
47 static struct pci_device_id ohci_pci_supported[] = {
48 { PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_OHCI, ~0) },
52 U_BOOT_PCI_DEVICE(ohci_pci, ohci_pci_supported);