]> git.baikalelectronics.ru Git - uboot.git/commitdiff
stm32mp: stm32prog: correctly handle DM_PMIC
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 18 May 2021 13:12:09 +0000 (15:12 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 18 Jun 2021 08:09:41 +0000 (10:09 +0200)
Correctly handle number of alternate when DM_PMIC is not activated.
This patch remove the last UNKNOWN partition in this case.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c

index ea69d5dd16bc2df030f00b59174b1b61d4379f98..ab687c272df20e5ed096e3847364e7f58bf9d9c0 100644 (file)
@@ -1150,7 +1150,10 @@ static int dfu_init_entities(struct stm32prog_data *data)
        struct dfu_entity *dfu;
        int alt_nb;
 
-       alt_nb = 3; /* number of virtual = CMD, OTP, PMIC*/
+       alt_nb = 2; /* number of virtual = CMD, OTP*/
+       if (CONFIG_IS_ENABLED(DM_PMIC))
+               alt_nb++; /* PMIC NVMEM*/
+
        if (data->part_nb == 0)
                alt_nb++;  /* +1 for FlashLayout */
        else