2 * Copyright (C) 2015 Alexey Brodkin <abrodkin@synopsys.com>
4 * SPDX-License-Identifier: GPL-2.0+
11 #if !defined(CONFIG_USB_OHCI_NEW)
12 # error "Generic OHCI driver requires CONFIG_USB_OHCI_NEW"
19 static int ohci_usb_probe(struct udevice *dev)
21 struct ohci_regs *regs = (struct ohci_regs *)dev_get_addr(dev);
23 return ohci_register(dev, regs);
26 static int ohci_usb_remove(struct udevice *dev)
28 return ohci_deregister(dev);
31 static const struct udevice_id ohci_usb_ids[] = {
32 { .compatible = "generic-ohci" },
36 U_BOOT_DRIVER(ohci_generic) = {
37 .name = "ohci_generic",
39 .of_match = ohci_usb_ids,
40 .probe = ohci_usb_probe,
41 .remove = ohci_usb_remove,
43 .priv_auto_alloc_size = sizeof(struct generic_ohci),
44 .flags = DM_FLAG_ALLOC_PRIV_DMA,