diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-01-08 10:29:16 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-01-08 10:45:24 +0100 |
commit | 0ae49b555e80debeb1587d19637a855bb13d32e3 (patch) | |
tree | ae6e7b3cdb1484146af42a637b2cdcdbaaf71378 /arch/arm/mach-bcm283x | |
parent | c4b36109ee5072ea40bc6d289f7936a998b4752b (diff) | |
download | barebox-0ae49b555e80debeb1587d19637a855bb13d32e3.tar.gz barebox-0ae49b555e80debeb1587d19637a855bb13d32e3.tar.xz |
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>
Diffstat (limited to 'arch/arm/mach-bcm283x')
-rw-r--r-- | arch/arm/mach-bcm283x/mbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c index 1b1981f7cb..22abbb0ca5 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; } |