fix: avs: fix wrong failure message print
- AVS selection algorithm failure message printed falsely in
frequencies higher than 1600MHz.
- elaborated print info when reading EFUSE (frequency and version)
Change-Id: I9dddf13bd1d256f6af39401296518ea7f24b4a7f
Signed-off-by: Bassel Saba <basselsa@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/22040
Reviewed-by: Omri Itach <omrii@marvell.com>
Tested-by: Omri Itach <omrii@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/22207
diff --git a/tools/marvell/bin_hdr/src_init/a38x/generalInit.c b/tools/marvell/bin_hdr/src_init/a38x/generalInit.c
index 452f086..12fc0c7 100644
--- a/tools/marvell/bin_hdr/src_init/a38x/generalInit.c
+++ b/tools/marvell/bin_hdr/src_init/a38x/generalInit.c
@@ -186,7 +186,7 @@
versionVal = (MV_EFUSE_REG_READ(EFUSE_AVS_VERSION_REG) &
(EFUSE_AVS_VERSION_MASK << EFUSE_AVS_VERSION_OFFSET)) >> EFUSE_AVS_VERSION_OFFSET;
if (versionVal == 0) {
- mvPrintf("AVS from eFuse version is not supported\n");
+ mvPrintf("AVS from eFuse version is not supported (%u)\n", versionVal);
return MV_FALSE;
}
@@ -227,13 +227,18 @@
*avsVal = (MV_EFUSE_REG_READ(EFUSE_AVS_AND_BIN_REG) &
(EFUSE_AVS_VAL_MASK << EFUSE_AVS_VAL_OFFSET_AT_IND(i))) >>
EFUSE_AVS_VAL_OFFSET_AT_IND(i);
+ break;
}
}
if (i == EFUSE_FREQ_VAL_SIZE && satrFreq > efuse_freq_val[0].cpu_freq_mode) {
+ /* check if chip is configured to CPU frequency
+ * that is unsupported by AVS @ EFUSE mapping */
mvPrintf("ERROR: selected CPU frequency (mode 0x%X) is not supported\n", satrFreq);
return MV_FALSE;
}
- mvPrintf("Selected AVS value from eFuse: 0x%X\n", *avsVal);
+ mvPrintf("Selected AVS value from eFuse: 0x%X (corresponding to frequency %uMHz) ",
+ *avsVal, efuse_freq_val[i].cpu_freq);
+ mvPrintf("version %u\n", versionVal);
return MV_TRUE;
}
#endif /* CONFIG_ARMADA_38X */