]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fastboot: reinit partition after storing GPT or MBR
authorRoman Stratiienko <r.stratiienko@gmail.com>
Wed, 27 Jan 2021 15:40:16 +0000 (17:40 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 7 Feb 2021 18:22:55 +0000 (19:22 +0100)
In case MMC has MBR system and fastboot writes GPT,
MMC is still recognized as MBR.
Invoke part_init() to purge cached data and update
information about partition table type.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
drivers/fastboot/fb_mmc.c

index 611074a3e435bb92a153a56ff8534d1099fee5e7..50532acb847c617a7043a755cfb24dac9f4bfbe8 100644 (file)
@@ -504,6 +504,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
                                      response);
                        return;
                }
+               part_init(dev_desc);
                printf("........ success\n");
                fastboot_okay(NULL, response);
                return;
@@ -525,6 +526,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
                                      response);
                        return;
                }
+               part_init(dev_desc);
                printf("........ success\n");
                fastboot_okay(NULL, response);
                return;