* [PATCH] arm: rpi: perform XHCI firmware upload only once
[not found] <CGME20210917081954eucas1p21f21f427d33607535b34389885a85fbc@eucas1p2.samsung.com>
@ 2021-09-17 8:19 ` Marek Szyprowski
2021-09-17 8:40 ` nicolas saenz julienne
2021-09-17 8:42 ` Matthias Brugger
0 siblings, 2 replies; 4+ messages in thread
From: Marek Szyprowski @ 2021-09-17 8:19 UTC (permalink / raw)
To: u-boot
Cc: Marek Szyprowski, Matthias Brugger, Nicolas Saenz Julienne,
Jaehoon Chung, Bartlomiej Zolnierkiewicz
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>
---
arch/arm/mach-bcm283x/msg.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index 347aece3cd..345f7fe2b7 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,
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: rpi: perform XHCI firmware upload only once
2021-09-17 8:19 ` [PATCH] arm: rpi: perform XHCI firmware upload only once Marek Szyprowski
@ 2021-09-17 8:40 ` nicolas saenz julienne
2021-09-17 8:42 ` Matthias Brugger
1 sibling, 0 replies; 4+ messages in thread
From: nicolas saenz julienne @ 2021-09-17 8:40 UTC (permalink / raw)
To: Marek Szyprowski, u-boot
Cc: Matthias Brugger, Jaehoon Chung, Bartlomiej Zolnierkiewicz
On Fri, 2021-09-17 at 10:19 +0200, Marek Szyprowski wrote:
> 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>
Regards,
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: rpi: perform XHCI firmware upload only once
2021-09-17 8:19 ` [PATCH] arm: rpi: perform XHCI firmware upload only once Marek Szyprowski
2021-09-17 8:40 ` nicolas saenz julienne
@ 2021-09-17 8:42 ` Matthias Brugger
2021-09-17 8:44 ` Matthias Brugger
1 sibling, 1 reply; 4+ messages in thread
From: Matthias Brugger @ 2021-09-17 8:42 UTC (permalink / raw)
To: Marek Szyprowski, u-boot
Cc: Nicolas Saenz Julienne, Jaehoon Chung, Bartlomiej Zolnierkiewicz
On 17/09/2021 10:19, Marek Szyprowski wrote:
> 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>
Looks good to me. I'll wait a bit more to see if Nicolas can do a review as well
before queuing it.
Regards,
Matthias
> ---
> arch/arm/mach-bcm283x/msg.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
> index 347aece3cd..345f7fe2b7 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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: rpi: perform XHCI firmware upload only once
2021-09-17 8:42 ` Matthias Brugger
@ 2021-09-17 8:44 ` Matthias Brugger
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2021-09-17 8:44 UTC (permalink / raw)
To: Marek Szyprowski, u-boot
Cc: Nicolas Saenz Julienne, Jaehoon Chung, Bartlomiej Zolnierkiewicz
On 17/09/2021 10:42, Matthias Brugger wrote:
>
>
> On 17/09/2021 10:19, Marek Szyprowski wrote:
>> 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>
>
> Looks good to me. I'll wait a bit more to see if Nicolas can do a review as well
> before queuing it.
>
There was a race condition, I'll queque it now :)
> Regards,
> Matthias
>
>> ---
>> arch/arm/mach-bcm283x/msg.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
>> index 347aece3cd..345f7fe2b7 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,
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-17 11:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20210917081954eucas1p21f21f427d33607535b34389885a85fbc@eucas1p2.samsung.com>
2021-09-17 8:19 ` [PATCH] arm: rpi: perform XHCI firmware upload only once Marek Szyprowski
2021-09-17 8:40 ` nicolas saenz julienne
2021-09-17 8:42 ` Matthias Brugger
2021-09-17 8:44 ` Matthias Brugger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox