未验证 提交 29aab388 编写于 作者: S Shengjiu Wang 提交者: Mark Brown

ASoC: fsl_sai: fix getting version from VERID

The version information is at the bit31 ~ bit16 in the VERID
register, so need to right shift 16bit to get it, otherwise
the result of comparison "sai->verid.version >= 0x0301" is
wrong.

Fixes: 99c1e74f ("ASoC: fsl_sai: store full version instead of major/minor")
Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: NIuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: NFabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1675760664-25193-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 95ff4aad
...@@ -1141,6 +1141,7 @@ static int fsl_sai_check_version(struct device *dev) ...@@ -1141,6 +1141,7 @@ static int fsl_sai_check_version(struct device *dev)
sai->verid.version = val & sai->verid.version = val &
(FSL_SAI_VERID_MAJOR_MASK | FSL_SAI_VERID_MINOR_MASK); (FSL_SAI_VERID_MAJOR_MASK | FSL_SAI_VERID_MINOR_MASK);
sai->verid.version >>= FSL_SAI_VERID_MINOR_SHIFT;
sai->verid.feature = val & FSL_SAI_VERID_FEATURE_MASK; sai->verid.feature = val & FSL_SAI_VERID_FEATURE_MASK;
ret = regmap_read(sai->regmap, FSL_SAI_PARAM, &val); ret = regmap_read(sai->regmap, FSL_SAI_PARAM, &val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册