Lines Matching +full:generic +full:- +full:ehci

1 // SPDX-License-Identifier: GPL-1.0+
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
33 dev_err(hcd->self.controller, "can't start %s\n", in ohci_ppc_of_start()
34 hcd->self.bus_name); in ohci_ppc_of_start()
48 * generic hardware linkage
87 struct device_node *dn = op->dev.of_node; in ohci_hcd_ppc_of_probe()
98 return -ENODEV; in ohci_hcd_ppc_of_probe()
101 of_device_is_compatible(dn, "ohci-bigendian") || in ohci_hcd_ppc_of_probe()
102 of_device_is_compatible(dn, "ohci-be"); in ohci_hcd_ppc_of_probe()
104 dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n"); in ohci_hcd_ppc_of_probe()
110 hcd = usb_create_hcd(&ohci_ppc_of_hc_driver, &op->dev, "PPC-OF USB"); in ohci_hcd_ppc_of_probe()
112 return -ENOMEM; in ohci_hcd_ppc_of_probe()
114 hcd->rsrc_start = res.start; in ohci_hcd_ppc_of_probe()
115 hcd->rsrc_len = resource_size(&res); in ohci_hcd_ppc_of_probe()
117 hcd->regs = devm_ioremap_resource(&op->dev, &res); in ohci_hcd_ppc_of_probe()
118 if (IS_ERR(hcd->regs)) { in ohci_hcd_ppc_of_probe()
119 rv = PTR_ERR(hcd->regs); in ohci_hcd_ppc_of_probe()
125 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n", in ohci_hcd_ppc_of_probe()
127 rv = -EBUSY; in ohci_hcd_ppc_of_probe()
133 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; in ohci_hcd_ppc_of_probe()
134 if (of_device_is_compatible(dn, "fsl,mpc5200-ohci")) in ohci_hcd_ppc_of_probe()
135 ohci->flags |= OHCI_QUIRK_FRAME_NO; in ohci_hcd_ppc_of_probe()
136 if (of_device_is_compatible(dn, "mpc5200-ohci")) in ohci_hcd_ppc_of_probe()
137 ohci->flags |= OHCI_QUIRK_FRAME_NO; in ohci_hcd_ppc_of_probe()
144 device_wakeup_enable(hcd->self.controller); in ohci_hcd_ppc_of_probe()
149 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx"); in ohci_hcd_ppc_of_probe()
151 /* Work around - At this point ohci_run has executed, the in ohci_hcd_ppc_of_probe()
153 * set up. If the ehci driver is loaded, put the ohci core in in ohci_hcd_ppc_of_probe()
154 * the suspended state. The ehci driver will bring it out of in ohci_hcd_ppc_of_probe()
155 * suspended state when / if a non-high speed USB device is in ohci_hcd_ppc_of_probe()
156 * attached to the USB Host port. If the ehci driver is not in ohci_hcd_ppc_of_probe()
158 * the ehci driver is loaded. in ohci_hcd_ppc_of_probe()
163 writel_be((readl_be(&ohci->regs->control) | in ohci_hcd_ppc_of_probe()
164 OHCI_USB_SUSPEND), &ohci->regs->control); in ohci_hcd_ppc_of_probe()
165 (void) readl_be(&ohci->regs->control); in ohci_hcd_ppc_of_probe()
169 pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); in ohci_hcd_ppc_of_probe()
184 dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n"); in ohci_hcd_ppc_of_remove()
188 irq_dispose_mapping(hcd->irq); in ohci_hcd_ppc_of_remove()
197 .compatible = "ohci-bigendian",
201 .compatible = "ohci-be",
207 .compatible = "ohci-le",
216 #error "No endianness selected for ppc-of-ohci"
225 .name = "ppc-of-ohci",