Lines Matching +full:generic +full:- +full:ohci

1 // SPDX-License-Identifier: GPL-1.0+
3 * OHCI HCD (Host Controller Driver) for USB.
6 * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
7 * (C) Copyright 2002 Hewlett-Packard Company
10 * Bus glue for OHCI HC on the of_platform bus
12 * Modified for of_platform bus from ohci-sa1111.c
28 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_ppc_of_start() local
31 if ((ret = ohci_init(ohci)) < 0) in ohci_ppc_of_start()
34 if ((ret = ohci_run(ohci)) < 0) { in ohci_ppc_of_start()
35 dev_err(hcd->self.controller, "can't start %s\n", in ohci_ppc_of_start()
36 hcd->self.bus_name); in ohci_ppc_of_start()
46 .product_desc = "OF OHCI",
50 * generic hardware linkage
89 struct device_node *dn = op->dev.of_node; in ohci_hcd_ppc_of_probe()
91 struct ohci_hcd *ohci; in ohci_hcd_ppc_of_probe() local
100 return -ENODEV; in ohci_hcd_ppc_of_probe()
103 of_device_is_compatible(dn, "ohci-bigendian") || in ohci_hcd_ppc_of_probe()
104 of_device_is_compatible(dn, "ohci-be"); in ohci_hcd_ppc_of_probe()
106 dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n"); in ohci_hcd_ppc_of_probe()
112 hcd = usb_create_hcd(&ohci_ppc_of_hc_driver, &op->dev, "PPC-OF USB"); in ohci_hcd_ppc_of_probe()
114 return -ENOMEM; in ohci_hcd_ppc_of_probe()
116 hcd->rsrc_start = res.start; in ohci_hcd_ppc_of_probe()
117 hcd->rsrc_len = resource_size(&res); in ohci_hcd_ppc_of_probe()
119 hcd->regs = devm_ioremap_resource(&op->dev, &res); in ohci_hcd_ppc_of_probe()
120 if (IS_ERR(hcd->regs)) { in ohci_hcd_ppc_of_probe()
121 rv = PTR_ERR(hcd->regs); in ohci_hcd_ppc_of_probe()
127 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n", in ohci_hcd_ppc_of_probe()
129 rv = -EBUSY; in ohci_hcd_ppc_of_probe()
133 ohci = hcd_to_ohci(hcd); in ohci_hcd_ppc_of_probe()
135 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; in ohci_hcd_ppc_of_probe()
136 if (of_device_is_compatible(dn, "fsl,mpc5200-ohci")) in ohci_hcd_ppc_of_probe()
137 ohci->flags |= OHCI_QUIRK_FRAME_NO; in ohci_hcd_ppc_of_probe()
138 if (of_device_is_compatible(dn, "mpc5200-ohci")) in ohci_hcd_ppc_of_probe()
139 ohci->flags |= OHCI_QUIRK_FRAME_NO; in ohci_hcd_ppc_of_probe()
142 ohci_hcd_init(ohci); in ohci_hcd_ppc_of_probe()
146 device_wakeup_enable(hcd->self.controller); in ohci_hcd_ppc_of_probe()
151 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx"); in ohci_hcd_ppc_of_probe()
153 /* Work around - At this point ohci_run has executed, the in ohci_hcd_ppc_of_probe()
155 * set up. If the ehci driver is loaded, put the ohci core in in ohci_hcd_ppc_of_probe()
157 * suspended state when / if a non-high speed USB device is in ohci_hcd_ppc_of_probe()
165 writel_be((readl_be(&ohci->regs->control) | in ohci_hcd_ppc_of_probe()
166 OHCI_USB_SUSPEND), &ohci->regs->control); in ohci_hcd_ppc_of_probe()
167 (void) readl_be(&ohci->regs->control); in ohci_hcd_ppc_of_probe()
185 dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n"); in ohci_hcd_ppc_of_remove()
189 irq_dispose_mapping(hcd->irq); in ohci_hcd_ppc_of_remove()
200 .compatible = "ohci-bigendian",
204 .compatible = "ohci-be",
210 .compatible = "ohci-littledian",
214 .compatible = "ohci-le",
223 #error "No endianness selected for ppc-of-ohci"
232 .name = "ppc-of-ohci",