* [PATCH] kvx: Fix SoC version/revision string
@ 2024-09-27 13:07 Julian Vetter
2024-09-27 13:16 ` Yann Sionneau
0 siblings, 1 reply; 2+ messages in thread
From: Julian Vetter @ 2024-09-27 13:07 UTC (permalink / raw)
To: barebox; +Cc: Yann Sionneau, Julian Vetter
In the register $PCR the bitfield SV (SoC Version) determines on which
SoC interation we are (e.g., KV2, KV3, etc.), whereas CAR (Core
ARchitecture Revision) determines the Revision within each interation,
e.g., KV3-1, KV3-2, etc. Since this port is only for KV3, SV should not
change anway. But CAR changes depending on the revision. So fix the SoC
info driver to give out the right SoC version/revision string.
Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
---
drivers/soc/kvx/kvx_socinfo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/kvx/kvx_socinfo.c b/drivers/soc/kvx/kvx_socinfo.c
index 87c20c327b..5f28f08bfb 100644
--- a/drivers/soc/kvx/kvx_socinfo.c
+++ b/drivers/soc/kvx/kvx_socinfo.c
@@ -46,13 +46,14 @@ static void kvx_soc_info_read_revision(void)
u8 car = kvx_sfr_field_val(pcr, PCR, CAR);
const char *car_str = "", *ver_str = "";
- switch (car) {
+ switch (sv) {
case 0:
+ case 1:
car_str = "kv3";
break;
}
- switch (sv) {
+ switch (car) {
case 0:
ver_str = "1";
break;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kvx: Fix SoC version/revision string
2024-09-27 13:07 [PATCH] kvx: Fix SoC version/revision string Julian Vetter
@ 2024-09-27 13:16 ` Yann Sionneau
0 siblings, 0 replies; 2+ messages in thread
From: Yann Sionneau @ 2024-09-27 13:16 UTC (permalink / raw)
To: Julian Vetter, barebox
On 27/09/2024 15:07, Julian Vetter wrote:
> In the register $PCR the bitfield SV (SoC Version) determines on which
> SoC interation we are (e.g., KV2, KV3, etc.), whereas CAR (Core
> ARchitecture Revision) determines the Revision within each interation,
> e.g., KV3-1, KV3-2, etc. Since this port is only for KV3, SV should not
> change anway. But CAR changes depending on the revision. So fix the SoC
> info driver to give out the right SoC version/revision string.
>
> Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
> ---
Thanks Julian,
Small typos in commit msg (interation -> iteration several times)
otherwise:
Reviewed-by: Yann Sionneau <ysionneau@kalrayinc.com>
--
Yann
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-27 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-27 13:07 [PATCH] kvx: Fix SoC version/revision string Julian Vetter
2024-09-27 13:16 ` Yann Sionneau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox