Lines Matching +full:usb +full:- +full:host

1 // SPDX-License-Identifier: GPL-2.0+
3 * EHCI HCD (Host Controller Driver) for USB.
9 * Based on "ehci-ppc-of.c" by Valentine Barshak <vbarshak@ru.mvista.com>
10 * and "ehci-ppc-soc.c" by Stefan Roese <sr@denx.de>
11 * and "ohci-ppc-of.c" by Sylvain Munaut <tnt@246tNt.com>
23 * ehci_xilinx_port_handed_over - hand the port out if failed to enable it
24 * @hcd: Pointer to the usb_hcd device to which the host controller bound
27 * This function is used as a place to tell the user that the Xilinx USB host
32 * There are cases when the host controller fails to enable the port due to,
34 * the USB bus. In those cases, the messages printed here are not helpful.
40 dev_warn(hcd->self.controller, "port %d cannot be enabled\n", portnum); in ehci_xilinx_port_handed_over()
41 if (hcd->has_tt) { in ehci_xilinx_port_handed_over()
42 dev_warn(hcd->self.controller, in ehci_xilinx_port_handed_over()
45 dev_warn(hcd->self.controller, in ehci_xilinx_port_handed_over()
48 dev_warn(hcd->self.controller, in ehci_xilinx_port_handed_over()
50 dev_warn(hcd->self.controller, in ehci_xilinx_port_handed_over()
51 "The USB host controller does not support full speed nor low speed devices\n"); in ehci_xilinx_port_handed_over()
52 dev_warn(hcd->self.controller, in ehci_xilinx_port_handed_over()
53 "You can reconfigure the host controller to have full speed support\n"); in ehci_xilinx_port_handed_over()
108 * ehci_hcd_xilinx_of_probe - Probe method for the USB host controller
109 * @op: pointer to the platform_device bound to the host controller
112 * host controller. Because the Xilinx USB host controller can be configured
114 * entry, and sets an appropriate value for hcd->has_tt.
120 struct device_node *dn = op->dev.of_node; in ehci_hcd_xilinx_of_probe()
129 return -ENODEV; in ehci_hcd_xilinx_of_probe()
131 dev_dbg(&op->dev, "initializing XILINX-OF USB Controller\n"); in ehci_hcd_xilinx_of_probe()
137 hcd = usb_create_hcd(&ehci_xilinx_of_hc_driver, &op->dev, in ehci_hcd_xilinx_of_probe()
138 "XILINX-OF USB"); in ehci_hcd_xilinx_of_probe()
140 return -ENOMEM; in ehci_hcd_xilinx_of_probe()
142 hcd->rsrc_start = res.start; in ehci_hcd_xilinx_of_probe()
143 hcd->rsrc_len = resource_size(&res); in ehci_hcd_xilinx_of_probe()
147 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n", in ehci_hcd_xilinx_of_probe()
149 rv = -EBUSY; in ehci_hcd_xilinx_of_probe()
153 hcd->regs = devm_ioremap_resource(&op->dev, &res); in ehci_hcd_xilinx_of_probe()
154 if (IS_ERR(hcd->regs)) { in ehci_hcd_xilinx_of_probe()
155 rv = PTR_ERR(hcd->regs); in ehci_hcd_xilinx_of_probe()
161 /* This core always has big-endian register interface and uses in ehci_hcd_xilinx_of_probe()
162 * big-endian memory descriptors. in ehci_hcd_xilinx_of_probe()
164 ehci->big_endian_mmio = 1; in ehci_hcd_xilinx_of_probe()
165 ehci->big_endian_desc = 1; in ehci_hcd_xilinx_of_probe()
169 value = (int *)of_get_property(dn, "xlnx,support-usb-fs", NULL); in ehci_hcd_xilinx_of_probe()
171 ehci_dbg(ehci, "USB host controller supports FS devices\n"); in ehci_hcd_xilinx_of_probe()
172 hcd->has_tt = 1; in ehci_hcd_xilinx_of_probe()
175 "USB host controller is HS only\n"); in ehci_hcd_xilinx_of_probe()
176 hcd->has_tt = 0; in ehci_hcd_xilinx_of_probe()
181 ehci->caps = hcd->regs + 0x100; in ehci_hcd_xilinx_of_probe()
185 device_wakeup_enable(hcd->self.controller); in ehci_hcd_xilinx_of_probe()
196 * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources
208 dev_dbg(&op->dev, "stopping XILINX-OF USB Controller\n"); in ehci_hcd_xilinx_of_remove()
216 {.compatible = "xlnx,xps-usb-host-1.00.a",},
226 .name = "xilinx-of-ehci",