]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mailbox: pcc: Use mbox_bind_client
authorElliot Berman <quic_eberman@quicinc.com>
Mon, 10 Apr 2023 16:16:54 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:42 +0000 (06:12 +0900)
commitcff5c84114edcfe30dd83a25006cd8b426a64458
treeb2bf3a4d1e41ecc6000ce1393ea381e5bfdab3d3
parent0130f77fd2daccdba7bbe7c7a79728206d01222c
mailbox: pcc: Use mbox_bind_client

[ Upstream commit 76d4adacd52e78bea2e393081f2a5766261d1e3a ]

Use generic mbox_bind_client() to bind omap mailbox channel to a client.

mbox_bind_client is identical to the replaced lines, except that it:
 - Does the operation under con_mutex which prevents possible races in
   removal path
 - Sets TXDONE_BY_ACK if pcc uses TXDONE_BY_POLL and the client knows
   when tx is done. TXDONE_BY_ACK is already set if there's no interrupt,
   so this is not applicable.
 - Calls chan->mbox->ops->startup. This is usecase for requesting irq:
   move the devm_request_irq into the startup callback and unregister it
   in the shutdown path.

Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Stable-dep-of: ff0e4d4c97c9 ("mailbox: pcc: don't zero error register")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/pcc.c