Lines Matching +full:usb +full:- +full:ehci +full:- +full:440 +full:epx

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
12 * Modified for of_platform bus from ohci-sa1111.c
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()
89 struct device_node *dn = op->dev.of_node; in ohci_hcd_ppc_of_probe()
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()
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()
146 device_wakeup_enable(hcd->self.controller); in ohci_hcd_ppc_of_probe()
150 /* by now, 440epx is known to show usb_23 erratum */ 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()
156 * the suspended state. The ehci driver will bring it out of in ohci_hcd_ppc_of_probe()
157 * suspended state when / if a non-high speed USB device is in ohci_hcd_ppc_of_probe()
158 * attached to the USB Host port. If the ehci driver is not in ohci_hcd_ppc_of_probe()
160 * the ehci driver is loaded. 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()
171 pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); 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()
199 .name = "usb",
200 .compatible = "ohci-bigendian",
203 .name = "usb",
204 .compatible = "ohci-be",
209 .name = "usb",
210 .compatible = "ohci-littledian",
213 .name = "usb",
214 .compatible = "ohci-le",
223 #error "No endianness selected for ppc-of-ohci"
232 .name = "ppc-of-ohci",