diff mbox series

[v4,6/9] Revert "USB: pci-quirks: Add Raspberry Pi 4 quirk"

Message ID 20200622103817.476-7-nsaenzjulienne@suse.de (mailing list archive)
State New, archived
Headers show
Series Raspberry Pi 4 USB firmware initialization rework | expand

Commit Message

Nicolas Saenz Julienne June 22, 2020, 10:38 a.m. UTC
This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc.

The initialization of Raspberry Pi 4's USB chip is now handled through a
reset controller. No need to directly call the firmware routine trough a
pci quirk.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/firmware/Kconfig      |  3 +--
 drivers/usb/host/pci-quirks.c | 16 ----------------
 2 files changed, 1 insertion(+), 18 deletions(-)

Comments

Andy Shevchenko June 22, 2020, 2:44 p.m. UTC | #1
On Mon, Jun 22, 2020 at 5:26 PM Nicolas Saenz Julienne
<nsaenzjulienne@suse.de> wrote:
>
> This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc.
>
> The initialization of Raspberry Pi 4's USB chip is now handled through a
> reset controller. No need to directly call the firmware routine trough a

trough -> through.

> pci quirk.

pci -> PCI.

...

> -
> -#include <soc/bcm2835/raspberrypi-firmware.h>
> -

Leave one blank line here.

>  #include "pci-quirks.h"
>  #include "xhci-ext-caps.h"
Nicolas Saenz Julienne June 22, 2020, 3:11 p.m. UTC | #2
Hi Andy,

On Mon, 2020-06-22 at 17:44 +0300, Andy Shevchenko wrote:
> On Mon, Jun 22, 2020 at 5:26 PM Nicolas Saenz Julienne
> <nsaenzjulienne@suse.de> wrote:
> > This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc.
> > 
> > The initialization of Raspberry Pi 4's USB chip is now handled through a
> > reset controller. No need to directly call the firmware routine trough a
> 
> trough -> through.
> 
> > pci quirk.
> 
> pci -> PCI.
> 

Noted

> ...
> 
> > -
> > -#include <soc/bcm2835/raspberrypi-firmware.h>
> > -
> 
> Leave one blank line here.

This being a revert, does it make sense to do so? If we are 100% strict about
it, the space should come from a separate patch.

That said, if you insist I'll be happy to edit it.

Regards,
Nicolas
Andy Shevchenko June 22, 2020, 3:51 p.m. UTC | #3
On Mon, Jun 22, 2020 at 6:11 PM Nicolas Saenz Julienne
<nsaenzjulienne@suse.de> wrote:
> On Mon, 2020-06-22 at 17:44 +0300, Andy Shevchenko wrote:
> > On Mon, Jun 22, 2020 at 5:26 PM Nicolas Saenz Julienne
> > <nsaenzjulienne@suse.de> wrote:
> > > This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc.
> > >
> > > The initialization of Raspberry Pi 4's USB chip is now handled through a
> > > reset controller. No need to directly call the firmware routine trough a
> >
> > trough -> through.
> >
> > > pci quirk.
> >
> > pci -> PCI.
> >
>
> Noted
>
> > ...
> >
> > > -
> > > -#include <soc/bcm2835/raspberrypi-firmware.h>
> > > -
> >
> > Leave one blank line here.
>
> This being a revert, does it make sense to do so? If we are 100% strict about
> it, the space should come from a separate patch.
>
> That said, if you insist I'll be happy to edit it.

Even though, this revert depends on the previous patches, so,
considered as a new patch.
I leave this to the maintainer to choose the best approach (update
themselves, request new version, ...).
diff mbox series

Patch

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index fbd785dd0513..4843e94713a4 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -178,9 +178,8 @@  config ISCSI_IBFT
 	  Otherwise, say N.
 
 config RASPBERRYPI_FIRMWARE
-	bool "Raspberry Pi Firmware Driver"
+	tristate "Raspberry Pi Firmware Driver"
 	depends on BCM2835_MBOX
-	default USB_PCI
 	help
 	  This option enables support for communicating with the firmware on the
 	  Raspberry Pi.
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 0b949acfa258..92150ecdb036 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -16,9 +16,6 @@ 
 #include <linux/export.h>
 #include <linux/acpi.h>
 #include <linux/dmi.h>
-
-#include <soc/bcm2835/raspberrypi-firmware.h>
-
 #include "pci-quirks.h"
 #include "xhci-ext-caps.h"
 
@@ -1246,24 +1243,11 @@  static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
 
 static void quirk_usb_early_handoff(struct pci_dev *pdev)
 {
-	int ret;
-
 	/* Skip Netlogic mips SoC's internal PCI USB controller.
 	 * This device does not need/support EHCI/OHCI handoff
 	 */
 	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
 		return;
-
-	if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
-		ret = rpi_firmware_init_vl805(pdev);
-		if (ret) {
-			/* Firmware might be outdated, or something failed */
-			dev_warn(&pdev->dev,
-				 "Failed to load VL805's firmware: %d. Will continue to attempt to work, but bad things might happen. You should fix this...\n",
-				 ret);
-		}
-	}
-
 	if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
 			pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&