aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2020-02-28 19:59:52 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-02-29 08:28:42 +0100
commitc56ae22db09e76db6e05d16dcc7637958ab88b1b (patch)
treee120b3e65f54d5d6696e6bdcdb923803f6f71ccf /target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch
parent8f5d714a7f2019c55439ff58c1dcb7be3170dfca (diff)
downloadupstream-c56ae22db09e76db6e05d16dcc7637958ab88b1b.tar.gz
upstream-c56ae22db09e76db6e05d16dcc7637958ab88b1b.tar.bz2
upstream-c56ae22db09e76db6e05d16dcc7637958ab88b1b.zip
bcm27xx: update to latest patches from RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch84
1 files changed, 0 insertions, 84 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch b/target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch
deleted file mode 100644
index ba1e9d4af4..0000000000
--- a/target/linux/bcm27xx/patches-4.19/950-0808-usb-xhci-Raspberry-Pi-FW-loader-for-VIA-VL805.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From fd483c4e43a983d90c308c4d668e83be4fd6a392 Mon Sep 17 00:00:00 2001
-From: Tim Gover <990920+timg236@users.noreply.github.com>
-Date: Wed, 15 Jan 2020 11:26:19 +0000
-Subject: [PATCH] usb: xhci: Raspberry Pi FW loader for VIA VL805
-
-The VL805 FW may either be loaded from an SPI EEPROM or alternatively
-loaded directly by the VideoCore firmware. A PCI reset will reset
-the VL805 XHCI controller on the Raspberry Pi4 requiring the firmware
-to be reloaded if an SPI EEPROM is not present.
-
-Use a VideoCore mailbox to trigger the loading of the VL805
-firmware (if necessary) after a PCI reset.
-
-Signed-off-by: Tim Gover <tim.gover@raspberrypi.org>
----
- drivers/usb/host/pci-quirks.c | 31 +++++++++++++++++++++-
- include/soc/bcm2835/raspberrypi-firmware.h | 2 +-
- 2 files changed, 31 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/host/pci-quirks.c
-+++ b/drivers/usb/host/pci-quirks.c
-@@ -18,7 +18,7 @@
- #include <linux/dmi.h>
- #include "pci-quirks.h"
- #include "xhci-ext-caps.h"
--
-+#include <soc/bcm2835/raspberrypi-firmware.h>
-
- #define UHCI_USBLEGSUP 0xc0 /* legacy support */
- #define UHCI_USBCMD 0 /* command register */
-@@ -632,6 +632,32 @@ EXPORT_SYMBOL_GPL(usb_amd_pt_check_port)
-
- #endif /* CONFIG_PCI_DISABLE_COMMON_QUIRKS */
-
-+/* The VL805 firmware may either be loaded from an EEPROM or by the BIOS into
-+ * memory. If run from memory it must be reloaded after a PCI fundmental reset.
-+ * The Raspberry Pi firmware acts as the BIOS in this case.
-+ */
-+static void usb_vl805_init(struct pci_dev *pdev)
-+{
-+#if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE)
-+ struct rpi_firmware *fw;
-+ struct {
-+ u32 dev_addr;
-+ } packet;
-+ int ret;
-+
-+ fw = rpi_firmware_get(NULL);
-+ if (!fw)
-+ return;
-+
-+ packet.dev_addr = (pdev->bus->number << 20) |
-+ (PCI_SLOT(pdev->devfn) << 15) | (PCI_FUNC(pdev->devfn) << 12);
-+
-+ dev_dbg(&pdev->dev, "RPI_FIRMWARE_NOTIFY_XHCI_RESET %x", packet.dev_addr);
-+ ret = rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_XHCI_RESET,
-+ &packet, sizeof(packet));
-+#endif
-+}
-+
- #if IS_ENABLED(CONFIG_USB_UHCI_HCD)
-
- /*
-@@ -1226,6 +1252,9 @@ hc_init:
- if (pdev->vendor == PCI_VENDOR_ID_INTEL)
- usb_enable_intel_xhci_ports(pdev);
-
-+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483)
-+ usb_vl805_init(pdev);
-+
- op_reg_base = base + XHCI_HC_LENGTH(readl(base));
-
- /* Wait for the host controller to be ready before writing any
---- a/include/soc/bcm2835/raspberrypi-firmware.h
-+++ b/include/soc/bcm2835/raspberrypi-firmware.h
-@@ -98,7 +98,7 @@ enum rpi_firmware_property_tag {
- RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045,
- RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049,
- RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050,
--
-+ RPI_FIRMWARE_NOTIFY_XHCI_RESET = 0x00030058,
-
- /* Dispmanx TAGS */
- RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,