kernel_optimize_test/drivers/mailbox
Orson Zhai cadbba5ec8 mailbox: sprd: Introduce refcnt when clients requests/free channels
[ Upstream commit 9468ab84032f96496e998cfa173cd1d0ac316bcd ]

Unisoc mailbox has no way to be enabled/disabled for any single channel.
They can only be set to startup or shutdown as a whole device at same time.

Add a variable to count references to avoid mailbox FIFO being reset
unexpectedly when clients are requesting or freeing channels.

Also add a lock to dismiss possible conflicts from register r/w in
different startup or shutdown threads. And fix the crash problem when early
interrupts come from channel which has not been requested by client yet.

Fixes: ca27fc26cd ("mailbox: sprd: Add Spreadtrum mailbox driver")
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:27 +02:00
..
arm_mhu_db.c mailbox: arm_mhu_db: Fix mhu_db_shutdown by replacing kfree with devm_kfree 2020-12-30 11:53:28 +01:00
arm_mhu.c mailbox: arm_mhu: Match only if compatible is "arm,mhu" 2020-10-12 21:10:34 -05:00
armada-37xx-rwtm-mailbox.c
bcm-flexrm-mailbox.c
bcm-pdc-mailbox.c mailbox: bcm: convert tasklets to use new tasklet_setup() API 2020-10-12 21:10:34 -05:00
bcm2835-mailbox.c
hi3660-mailbox.c
hi6220-mailbox.c
imx-mailbox.c
Kconfig
mailbox-altera.c
mailbox-sti.c
mailbox-test.c
mailbox-xgene-slimpro.c
mailbox.c mailbox: avoid timer start from callback 2020-10-16 19:09:17 -05:00
mailbox.h
Makefile mailbox: arm_mhu: Add ARM MHU doorbell driver 2020-10-12 21:10:34 -05:00
mtk-cmdq-mailbox.c maiblox: mediatek: Fix handling of platform_get_irq() error 2020-10-12 21:10:34 -05:00
omap-mailbox.c
pcc.c
pl320-ipc.c
platform_mhu.c
qcom-apcs-ipc-mailbox.c mailbox: qcom: Add msm8994 apcs compatible 2020-08-03 23:31:34 -05:00
qcom-ipcc.c
rockchip-mailbox.c
sprd-mailbox.c mailbox: sprd: Introduce refcnt when clients requests/free channels 2021-05-14 09:50:27 +02:00
stm32-ipcc.c
sun6i-msgbox.c
tegra-hsp.c firmware: tegra: Enable BPMP support on Tegra234 2020-09-18 15:57:04 +02:00
ti-msgmgr.c
zynqmp-ipi-mailbox.c