[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230509-ocmem-hwver-v1-1-b83ece3f2168@z3ntu.xyz>
Date: Tue, 09 May 2023 23:26:26 +0200
From: Luca Weiss <luca@...tu.xyz>
To: ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Brian Masney <masneyb@...tation.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
Luca Weiss <luca@...tu.xyz>
Subject: [PATCH] soc: qcom: ocmem: Add OCMEM hardware version print
It might be useful to know what hardware version of the OCMEM block the
SoC contains. Add a debug print for that.
Signed-off-by: Luca Weiss <luca@...tu.xyz>
---
drivers/soc/qcom/ocmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index 199fe9872035..aa9b3c2c1322 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -355,6 +355,10 @@ static int ocmem_dev_probe(struct platform_device *pdev)
}
}
+ reg = ocmem_read(ocmem, OCMEM_REG_HW_VERSION);
+ dev_dbg(dev, "OCMEM hardware version: %ld.%ld.%ld\n",
+ (reg >> 28) & 0x0F, (reg >> 16) & 0xFFF, reg & 0xFFFF);
+
reg = ocmem_read(ocmem, OCMEM_REG_HW_PROFILE);
ocmem->num_ports = OCMEM_HW_PROFILE_NUM_PORTS(reg);
ocmem->num_macros = OCMEM_HW_PROFILE_NUM_MACROS(reg);
---
base-commit: ac9a78681b921877518763ba0e89202254349d1b
change-id: 20230509-ocmem-hwver-99bcb33b028b
Best regards,
--
Luca Weiss <luca@...tu.xyz>
Powered by blists - more mailing lists