[PATCH 1/2] pfuze: Fix the pmic_get() parameter in the DM case

Igor Opaniuk igor.opaniuk at gmail.com
Fri Dec 20 15:30:06 CET 2019


Hi Fabio,

On Thu, Dec 19, 2019 at 8:00 PM Fabio Estevam <festevam at gmail.com> wrote:
>
> Currently the following hang is observed when booting a imx6sx-sdb
> board:
>
> U-Boot 2020.01-rc5-00004-g643366bcd5 (Dec 19 2019 - 14:56:23 -0300)
>
> CPU:   Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz)
> CPU:   Extended Commercial temperature grade (-20C to 105C) at 32C
> Reset cause: POR
> Model: Freescale i.MX6 SoloX SDB RevB Board
> Board: MX6SX SABRE SDB revA
> DRAM:  1 GiB
> initcall sequence bffd8514 failed at call 87804cc0 (err=-19)
> ### ERROR ### Please RESET the board ###
>
> When pmic_get() is used with DM the first parameter must be
> the complete node name plus the unit address.
>
> Fix the pmic_get() parameter to fix the boot regression.
>
> Tested on a imx6sx-sdb and imx6q-sabresd boards.
>
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
>  board/freescale/common/pfuze.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c
> index 03ebe4e7b5..6dca22960b 100644
> --- a/board/freescale/common/pfuze.c
> +++ b/board/freescale/common/pfuze.c
> @@ -136,7 +136,7 @@ struct udevice *pfuze_common_init(void)
>         int ret;
>         unsigned int reg, dev_id, rev_id;
>
> -       ret = pmic_get("pfuze100", &dev);
> +       ret = pmic_get("pfuze100 at 8", &dev);
>         if (ret == -ENODEV)
>                 return NULL;
>
> --
> 2.17.1
>

Reviewed-by: Igor Opaniuk <igor.opaniuk at toradex.com>

BTW,
there're also other potential places with the same problem:

$ grep -ne pmic_get -r ./board/freescale
./board/freescale/mx6sllevk/mx6sllevk.c:60: ret = pmic_get("pfuze100", &dev);
./board/freescale/imx8mq_evk/spl.c:165: p = pmic_get("PFUZE100");
./board/freescale/mx53loco/mx53loco.c:208: p = pmic_get("DIALOG_PMIC");
./board/freescale/mx53loco/mx53loco.c:251: p = pmic_get("FSL_PMIC");
./board/freescale/mx51evk/mx51evk.c:182: p = pmic_get("FSL_PMIC");
./board/freescale/mx6sxsabreauto/mx6sxsabreauto.c:138: ret =
pmic_get("pfuze100", &dev);
./board/freescale/imx8mm_evk/spl.c:90: ret = pmic_get("pmic at 4b", &dev);
./board/freescale/common/pfuze.c:60: p = pmic_get("PFUZE100");
./board/freescale/common/pfuze.c:139: ret = pmic_get("pfuze100", &dev);
./board/freescale/common/mc34vr500.c:35: p = pmic_get("MC34VR500");
./board/freescale/common/mc34vr500.c:72: p = pmic_get("MC34VR500");
./board/freescale/mx6slevk/mx6slevk.c:148: ret = pmic_get("pfuze100", &dev);
./board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c:75: ret =
pmic_get("pfuze3000", &dev);
./board/freescale/mx31pdk/mx31pdk.c:92: p = pmic_get("FSL_PMIC");
./board/freescale/mx7dsabresd/mx7dsabresd.c:329: ret =
pmic_get("pfuze3000", &dev);
./board/freescale/mx25pdk/mx25pdk.c:145: p = pmic_get("FSL_PMIC");
./board/freescale/mx35pdk/mx35pdk.c:191: struct pmic *p = pmic_get("FSL_PMIC");
./board/freescale/mx35pdk/mx35pdk.c:224: p = pmic_get("FSL_PMIC");
./board/freescale/mx53evk/mx53evk.c:88: p = pmic_get("FSL_PMIC");


Thanks
-- 
Best regards - Freundliche GrĂ¼sse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk


More information about the U-Boot mailing list