aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szyprowski2021-09-17 10:19:43 +0200
committerMatthias Brugger2021-09-29 15:44:16 +0200
commit33166054c72716e46d492a0588f00900a9684a97 (patch)
tree4064e68bbfe1d2337d417658b5478108895f0723
parent6f3a9227cc79009e125006890829496ce00726ea (diff)
arm: rpi: perform XHCI firmware upload only once
XHCI firmware upload must be performed only once after initializing the PCI bridge. This fixes USB stack initialization after calling "usb stop; usb start" on Raspberry Pi 4B. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
-rw-r--r--arch/arm/mach-bcm283x/msg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index 347aece3cd8..345f7fe2b77 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -170,6 +170,12 @@ int bcm2711_notify_vl805_reset(void)
ALLOC_CACHE_ALIGN_BUFFER(struct msg_notify_vl805_reset,
msg_notify_vl805_reset, 1);
int ret;
+ static int done = false;
+
+ if (done)
+ return 0;
+
+ done = true;
BCM2835_MBOX_INIT_HDR(msg_notify_vl805_reset);
BCM2835_MBOX_INIT_TAG(&msg_notify_vl805_reset->dev_addr,