memory: mtk-smi: Add sleep ctrl function
authorYong Wu <yong.wu@mediatek.com>
Thu, 13 Jan 2022 11:10:56 +0000 (19:10 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Tue, 25 Jan 2022 16:53:39 +0000 (17:53 +0100)
commit8956500e5d5bf541a945299999b0bf4866dc0daf
tree438c6e7b9e3a624aebe7a0e4c379f410c0dce2cf
parenta6945f4566d4f77a4054720f6649ff921fe1ae64
memory: mtk-smi: Add sleep ctrl function

Sleep control means that when the larb goes to sleep, we should wait a bit
until all the current commands are finished. Thus, when the larb runtime
suspends, we need to enable this function to wait until all the existed
commands are finished. When the larb resumes, just disable this function.
This function only improves the safety of bus. Add a new flag for this
function. Prepare for mt8186.

Signed-off-by: Anan Sun <anan.sun@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220113111057.29918-7-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
drivers/memory/mtk-smi.c