mailbox: mediatek: cmdq: clear the event in cmdq initial flow
authorBibby Hsieh <bibby.hsieh@mediatek.com>
Thu, 29 Aug 2019 01:48:12 +0000 (09:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:59:19 +0000 (18:59 +0200)
commit15786d677bbc22a7a02fa2f6c443fe1e36b5af7b
tree7ffca025cade0bd15ad9636f56fcc855d7b45ce3
parent1496f3d159342350e6aba4e2a89a0a5874f0d10d
mailbox: mediatek: cmdq: clear the event in cmdq initial flow

[ Upstream commit 6058f11870b8e6d4f5cc7b591097c00bf69a000d ]

GCE hardware stored event information in own internal sysram,
if the initial value in those sysram is not zero value
it will cause a situation that gce can wait the event immediately
after client ask gce to wait event but not really trigger the
corresponding hardware.

In order to make sure that the wait event function is
exactly correct, we need to clear the sysram value in
cmdq initial flow.

Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver")
Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/mtk-cmdq-mailbox.c
include/linux/mailbox/mtk-cmdq-mailbox.h
include/linux/soc/mediatek/mtk-cmdq.h