
On 6/4/24 16:27, lukas.funke-oss@weidmueller.com wrote:
From: Lukas Funke lukas.funke@weidmueller.com
Use common zynqmp_pm_get_chipid() function to get the chip revision
Signed-off-by: Lukas Funke lukas.funke@weidmueller.com
(no changes since v1)
drivers/soc/soc_xilinx_versal.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/soc/soc_xilinx_versal.c b/drivers/soc/soc_xilinx_versal.c index 3d8c25c19bb..3d949c4e612 100644 --- a/drivers/soc/soc_xilinx_versal.c +++ b/drivers/soc/soc_xilinx_versal.c @@ -45,23 +45,22 @@ static const struct soc_ops soc_xilinx_versal_ops = { static int soc_xilinx_versal_probe(struct udevice *dev) { struct soc_xilinx_versal_priv *priv = dev_get_priv(dev);
- u32 ret_payload[PAYLOAD_ARG_CNT];
u32 idcode, version; int ret;
priv->family = versal_family;
- if (IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) {
ret = xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0,
ret_payload);
- if (CONFIG_IS_ENABLED(ZYNQMP_FIRMWARE)) {
ret = zynqmp_pm_get_chipid(&idcode, &version);
This function is defined in 6/7 that's why this will fail when it compiles which end up in non bisectable tree.
if (ret) return ret;
} else {
ret_payload[2] = readl(VERSAL_PS_PMC_VERSION);
if (!ret_payload[2])
version = readl(VERSAL_PS_PMC_VERSION);
}if (!version) return -EINVAL;
- priv->revision = ret_payload[2] >> VERSAL_PS_VER_SHIFT;
priv->revision = version >> VERSAL_PS_VER_SHIFT;
return 0; }
But code is ok.
M