diff options
Diffstat (limited to 'configs/platform-v7a/patches/barebox-2020.01.0/0015-ARM-rpi-mailbox-Use-non-interruptible-timeout.patch')
-rw-r--r-- | configs/platform-v7a/patches/barebox-2020.01.0/0015-ARM-rpi-mailbox-Use-non-interruptible-timeout.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/configs/platform-v7a/patches/barebox-2020.01.0/0015-ARM-rpi-mailbox-Use-non-interruptible-timeout.patch b/configs/platform-v7a/patches/barebox-2020.01.0/0015-ARM-rpi-mailbox-Use-non-interruptible-timeout.patch new file mode 100644 index 0000000..88a7c53 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2020.01.0/0015-ARM-rpi-mailbox-Use-non-interruptible-timeout.patch @@ -0,0 +1,47 @@ +From: Sascha Hauer <s.hauer@pengutronix.de> +Date: Wed, 8 Jan 2020 10:29:16 +0100 +Subject: [PATCH] ARM: rpi mailbox: Use non interruptible timeout + +This makes sure that during a mailbox transfer no other mailbox transfer +is started. This happens on a raspberrypi3 where one GPIO on the +firmware GPIO controller (which is controlled via mailbox) is registered +as a heartbeat LED. With this it can happen that during a mailbox +transfer the poller which drives the heartbeat LED is triggered in +is_timeout() which results in corrupted transfers. + +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/mach-bcm283x/mbox.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c +index 1b1981f7cb67..22abbb0ca586 100644 +--- a/arch/arm/mach-bcm283x/mbox.c ++++ b/arch/arm/mach-bcm283x/mbox.c +@@ -37,7 +37,7 @@ static int bcm2835_mbox_call_raw(u32 chan, struct bcm2835_mbox_hdr *buffer, + val = readl(mbox_base + MAIL0_STA); + if (val & BCM2835_MBOX_STATUS_RD_EMPTY) + break; +- if (is_timeout(starttime, TIMEOUT)) { ++ if (is_timeout_non_interruptible(starttime, TIMEOUT)) { + pr_err("mbox: Timeout draining stale responses\n"); + return -ETIMEDOUT; + } +@@ -49,7 +49,7 @@ static int bcm2835_mbox_call_raw(u32 chan, struct bcm2835_mbox_hdr *buffer, + val = readl(mbox_base + MAIL0_STA); + if (!(val & BCM2835_MBOX_STATUS_WR_FULL)) + break; +- if (is_timeout(starttime, TIMEOUT)) { ++ if (is_timeout_non_interruptible(starttime, TIMEOUT)) { + pr_err("mbox: Timeout waiting for send space\n"); + return -ETIMEDOUT; + } +@@ -67,7 +67,7 @@ static int bcm2835_mbox_call_raw(u32 chan, struct bcm2835_mbox_hdr *buffer, + val = readl(mbox_base + MAIL0_STA); + if (!(val & BCM2835_MBOX_STATUS_RD_EMPTY)) + break; +- if (is_timeout(starttime, TIMEOUT)) { ++ if (is_timeout_non_interruptible(starttime, TIMEOUT)) { + pr_err("mbox: Timeout waiting for response\n"); + return -ETIMEDOUT; + } |