memory: tegra: Make CPU cluster BW request a multiple of MC channels
authorSumit Gupta <sumitg@nvidia.com>
Thu, 11 May 2023 17:32:08 +0000 (23:02 +0530)
committerThierry Reding <treding@nvidia.com>
Tue, 16 May 2023 10:11:01 +0000 (12:11 +0200)
commite852af72a7f21f4d25994365af86a92438d68014
tree7f4ec2c4a51772f511c8736c779f2439cef2632e
parent80b19e09c8fb04a6397278b1c16403042629614f
memory: tegra: Make CPU cluster BW request a multiple of MC channels

Make CPU cluster's bandwidth (BW) request a multiple of MC channels.
CPU OPP tables have BW info per MC channel. But, the actual BW depends
on the number of MC channels which can change as per the boot config.
Get the number of MC channels which are actually enabled in current
boot configuration and multiply the BW request from a CPU cluster with
the number of enabled MC channels. This is not required to be done for
other MC clients.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/memory/tegra/mc.c
drivers/memory/tegra/mc.h
drivers/memory/tegra/tegra234.c
include/soc/tegra/mc.h