From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Luca Weiss <luca@z3ntu.xyz>,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Brian Masney <masneyb@onstation.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: ocmem: Add OCMEM hardware version print
Date: Wed, 10 May 2023 00:34:07 +0200 [thread overview]
Message-ID: <42b9728c-2eba-89bf-d4ff-b9aec5067f84@linaro.org> (raw)
In-Reply-To: <20230509-ocmem-hwver-v1-1-b83ece3f2168@z3ntu.xyz>
On 9.05.2023 23:26, Luca Weiss wrote:
> 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@z3ntu.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);
Would you mind wrapping this into
#define REG_HW_VERSION_MAJ(ver) FIELD_GET(GENMASK(31, 28), ver)
etc.?
Konrad
> +
> 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,
prev parent reply other threads:[~2023-05-09 22:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 21:26 Luca Weiss
2023-05-09 22:34 ` Konrad Dybcio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42b9728c-2eba-89bf-d4ff-b9aec5067f84@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=masneyb@onstation.org \
--cc=phone-devel@vger.kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®