memory: tegra: add check if MRQ_EMC_DVFS_LATENCY is supported
authorSumit Gupta <sumitg@nvidia.com>
Wed, 21 Jun 2023 13:43:59 +0000 (19:13 +0530)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 25 Jul 2023 20:09:36 +0000 (22:09 +0200)
commit0a7e4578567a3270ba35ebde4e0ce2795fa55384
tree49a20645dbff0fe5bf38cddaa5fcc25caf0c3f65
parentb18e525990acb67f214f6b2528fae292ac9cf641
memory: tegra: add check if MRQ_EMC_DVFS_LATENCY is supported

Add check to ensure that "MRQ_EMC_DVFS_LATENCY" is supported by the
BPMP-FW before making the MRQ request. Currently, if the BPMP-FW
doesn't support this MRQ, then the "tegra186_emc_probe" fails.
Due to this the Memory Interconnect initialization also doesn't
happen. Memory Interconnect is not dependent on this MRQ and can
initialize even when this MRQ is not supported in any platform.
The check ensures that the MRQ is called only when it is supported
by the BPMP-FW and Interconnect initializes independent of this MRQ.
Also, moved the code to new function for better readability.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230621134400.23070-4-sumitg@nvidia.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/memory/tegra/tegra186-emc.c