]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: rpi: perform XHCI firmware upload only once
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 17 Sep 2021 08:19:43 +0000 (10:19 +0200)
committerMatthias Brugger <mbrugger@suse.com>
Wed, 29 Sep 2021 13:44:16 +0000 (15:44 +0200)
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>
arch/arm/mach-bcm283x/msg.c

index 347aece3cd8d996827f8527cc98ad6aa5ab7467c..345f7fe2b77f0c9f1723514b25fd7f6158ccb1fc 100644 (file)
@@ -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,