linux/drivers/usb/host/xhci-pci.h

11 lines
255 B
C
Raw Normal View History

usb: renesas-xhci: Add the renesas xhci driver This add a new driver for renesas xhci which is basically a firmware loader for uPD720201 and uPD720202 w/o ROM. The xhci-pci driver will invoke this driver for loading/unloading on relevant devices. This patch adds a firmware loader for the uPD720201K8-711-BAC-A and uPD720202K8-711-BAA-A variant. Both of these chips are listed in Renesas' R19UH0078EJ0500 Rev.5.00 "User's Manual: Hardware" as devices which need the firmware loader on page 2 in order to work as they "do not support the External ROM". The "Firmware Download Sequence" is describe in chapter "7.1 FW Download Interface" R19UH0078EJ0500 Rev.5.00 page 131. The firmware "K2013080.mem" is available from a USB3.0 Host to PCIe Adapter (PP2U-E card) "Firmware download" archive. An alternative version can be sourced from Netgear's WNDR4700 GPL archives. The release notes of the PP2U-E's "Firmware Download" ver 2.0.1.3 (2012-06-15) state that the firmware is for the following devices: - uPD720201 ES 2.0 sample whose revision ID is 2. - uPD720201 ES 2.1 sample & CS sample & Mass product, ID is 3. - uPD720202 ES 2.0 sample & CS sample & Mass product, ID is 2. [vkoul: fixed comments: used macros for timeout count and delay removed renesas_fw_alive_check cleaned renesas_fw_callback removed recursion for renesas_fw_download add register defines and field names move to a separate file make fw loader as sync probe so that we execute in probe and prevent race make xhci-pci-renesas a seprate module] Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200514122039.300417-3-vkoul@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-14 20:20:37 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2019-2020 Linaro Limited */
#ifndef XHCI_PCI_H
#define XHCI_PCI_H
xhci-pci: Make xhci-pci-renesas a proper modular driver If CONFIG_USB_XHCI_PCI_RENESAS is enabled, xhci-pci conditionally calls into the xhci-pci-renesas module, which means both modules must be loaded to use any xHCI PCI controller. The MODULE_FIRMWARE declaration in the base xhci-pci module causes initramfs-tools to check for and warn about missing firmware for the Renesas xHCI controllers, when any xHCI PCI controller is present. And because of the previous oddity, simply moving this declaration to xhci-pci-renesas wouldn't help. To fix this, reverse the relationship between the modules: - Remove the quirk for the Renesas xHCIs, and the driver_data structure used only for them - In xhci-pci: - Rename xhci_pci_probe() to xhci_pci_common_probe() - Export xhci_pci_common_probe() and xhci_pci_remove() - Use a new probe function that rejects the Renesas xHCIs and then calls the common probe function - In xhci-pci-renesas: - Stop exporting renesas_xhci_check_request_fw() - Add a probe function that calls renesas_xhci_check_request_fw() followed by xhci_pci_common_probe() - Add and register a new pci_driver matching only the Renesas xHCIs and using its own probe function, but with other operations the same as in xhci-pci - Make CONFIG_USB_XHCI_PCI_RENESAS depend on CONFIG_USB_XHCI_PCI, not the other way around Finally, move the MODULE_FIRMWARE declaration to xhci-pci-renesas. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Cyril Brulebois <cyril@debamax.com> Link: https://lore.kernel.org/r/ZqqfXYRJf7kGaqus@decadent.org.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-01 04:32:29 +08:00
int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id);
void xhci_pci_remove(struct pci_dev *dev);
usb: renesas-xhci: Add the renesas xhci driver This add a new driver for renesas xhci which is basically a firmware loader for uPD720201 and uPD720202 w/o ROM. The xhci-pci driver will invoke this driver for loading/unloading on relevant devices. This patch adds a firmware loader for the uPD720201K8-711-BAC-A and uPD720202K8-711-BAA-A variant. Both of these chips are listed in Renesas' R19UH0078EJ0500 Rev.5.00 "User's Manual: Hardware" as devices which need the firmware loader on page 2 in order to work as they "do not support the External ROM". The "Firmware Download Sequence" is describe in chapter "7.1 FW Download Interface" R19UH0078EJ0500 Rev.5.00 page 131. The firmware "K2013080.mem" is available from a USB3.0 Host to PCIe Adapter (PP2U-E card) "Firmware download" archive. An alternative version can be sourced from Netgear's WNDR4700 GPL archives. The release notes of the PP2U-E's "Firmware Download" ver 2.0.1.3 (2012-06-15) state that the firmware is for the following devices: - uPD720201 ES 2.0 sample whose revision ID is 2. - uPD720201 ES 2.1 sample & CS sample & Mass product, ID is 3. - uPD720202 ES 2.0 sample & CS sample & Mass product, ID is 2. [vkoul: fixed comments: used macros for timeout count and delay removed renesas_fw_alive_check cleaned renesas_fw_callback removed recursion for renesas_fw_download add register defines and field names move to a separate file make fw loader as sync probe so that we execute in probe and prevent race make xhci-pci-renesas a seprate module] Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200514122039.300417-3-vkoul@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-14 20:20:37 +08:00
#endif