aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/mailbox_s10.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-24 16:11:12 -0400
committerTom Rini <trini@konsulko.com>2018-08-24 16:11:12 -0400
commita376702f761be51227bfc8d0ae06722ec40687d8 (patch)
treec53eb4f6d480387f52b68f9688cb02a9919d1367 /arch/arm/mach-socfpga/mailbox_s10.c
parent15fd1b7903a3090a03cfe453f661822a613a91ee (diff)
parenta029f540c54c39847c329fc70b1b2e0ab6dedbcd (diff)
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Diffstat (limited to 'arch/arm/mach-socfpga/mailbox_s10.c')
-rw-r--r--arch/arm/mach-socfpga/mailbox_s10.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index cccd1a4404..0d906c3480 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -160,15 +160,15 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,
u32 buf_len;
int ret;
- ret = mbox_prepare_cmd_only(id, cmd, is_indirect, len, arg);
- if (ret)
- return ret;
-
if (urgent) {
/* Read status because it is toggled */
status = MBOX_READL(MBOX_STATUS) & MBOX_STATUS_UA_MSK;
- /* Send command as urgent command */
- MBOX_WRITEL(1, MBOX_URG);
+ /* Write urgent command to urgent register */
+ MBOX_WRITEL(cmd, MBOX_URG);
+ } else {
+ ret = mbox_prepare_cmd_only(id, cmd, is_indirect, len, arg);
+ if (ret)
+ return ret;
}
/* write doorbell */
@@ -188,8 +188,7 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,
if (urgent) {
u32 new_status = MBOX_READL(MBOX_STATUS);
- /* urgent command doesn't have response */
- MBOX_WRITEL(0, MBOX_URG);
+
/* Urgent ACK is toggled */
if ((new_status & MBOX_STATUS_UA_MSK) ^ status)
return 0;