diff options
author | Tom Rini <trini@konsulko.com> | 2023-07-25 16:55:59 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-25 16:55:59 -0400 |
commit | 544dfc3c88f99aba0b23073d07182615658b4819 (patch) | |
tree | 72d50ff97f4f4a6b0079e761566f6ff2c7932622 /drivers/mailbox/k3-sec-proxy.c | |
parent | ad1c9b26a86bdccf6a10e3369b1009cde2b04365 (diff) | |
parent | fa5977103978aa1998aa7b9ffe9cf495451cbbe1 (diff) |
Merge branch '2023-07-25-assorted-general-updates'
- A number of MAINTAINER file updates, assorted driver/platform fixes,
performance improvements for sparse file writes, and 64bit time_t.
Diffstat (limited to 'drivers/mailbox/k3-sec-proxy.c')
-rw-r--r-- | drivers/mailbox/k3-sec-proxy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index a862e55bc39..815808498f2 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -94,11 +94,6 @@ static inline u32 sp_readl(void __iomem *addr, unsigned int offset) return readl(addr + offset); } -static inline void sp_writel(void __iomem *addr, unsigned int offset, u32 data) -{ - writel(data, addr + offset); -} - /** * k3_sec_proxy_of_xlate() - Translation of phandle to channel * @chan: Mailbox channel @@ -241,15 +236,20 @@ static int k3_sec_proxy_send(struct mbox_chan *chan, const void *data) /* Ensure all unused data is 0 */ data_trail &= 0xFFFFFFFF >> (8 * (sizeof(u32) - trail_bytes)); writel(data_trail, data_reg); - data_reg++; + data_reg += sizeof(u32); } /* * 'data_reg' indicates next register to write. If we did not already * write on tx complete reg(last reg), we must do so for transmit + * In addition, we also need to make sure all intermediate data + * registers(if any required), are reset to 0 for TISCI backward + * compatibility to be maintained. */ - if (data_reg <= (spt->data + spm->desc->data_end_offset)) - sp_writel(spt->data, spm->desc->data_end_offset, 0); + while (data_reg <= (spt->data + spm->desc->data_end_offset)) { + writel(0x0, data_reg); + data_reg += sizeof(u32); + } debug("%s: Message successfully sent on thread %ld\n", __func__, chan->id); |