remoteproc: mediatek: Enable cache for mt8186 SCP
authorAllen-KH Cheng <allen-kh.cheng@mediatek.com>
Fri, 1 Jul 2022 12:12:29 +0000 (20:12 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 4 Jul 2022 17:25:45 +0000 (11:25 -0600)
commit54439d20c027f17ff022e828cb0c05b25ee2d124
tree3831b67f4394d2aa0eddf2b1f2b0dff6af0d2525
parent50d6281ce9b8412f7ef02d1bc9d23aa62ae0cf98
remoteproc: mediatek: Enable cache for mt8186 SCP

This patch is for enabling cache in SCP. There is not enough space
on the SRAM of SCP. We need to run programs in DRAM. The DRAM power
and latency is much larger than SRAM, so cache is used to mitigate
the negative effects for performance. We set SCP registers for cache
size before loading SCP FW. (8KB+8KB) and also adjust ipi_buf_offset
in SRAM from 0x7bdb0 to 0x3bdb0 for enabling cache.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Tested-by: TingHan Shen <tinghan.shen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220701121229.22756-2-allen-kh.cheng@mediatek.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/mtk_scp.c