]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros
authorLuca Weiss <luca@z3ntu.xyz>
Wed, 14 Jun 2023 16:35:47 +0000 (18:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:10 +0000 (09:48 +0200)
commit735f8ad47c41b4372e368e388e387dfe07ce1ebe
tree9b6d7ed92640ba7eb1e6b1cc77f6b40f45f7d412
parent9971747dee9a20ac689efe6c29bda15f5c9b03a2
soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros

[ Upstream commit a7b484b1c9332a1ee12e8799d62a11ee3f8e0801 ]

Since we're using these two macros to read a value from a register, we
need to use the FIELD_GET instead of the FIELD_PREP macro, otherwise
we're getting wrong values.

So instead of:

  [    3.111779] ocmem fdd00000.sram: 2 ports, 1 regions, 512 macros, not interleaved

we now get the correct value of:

  [    3.129672] ocmem fdd00000.sram: 2 ports, 1 regions, 2 macros, not interleaved

Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20230506-msm8226-ocmem-v3-1-79da95a2581f@z3ntu.xyz
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/qcom/ocmem.c