summaryrefslogtreecommitdiff
path: root/drivers/fastboot/fb_mmc.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-01-27 14:46:46 +0100
committerMarek Vasut <marex@denx.de>2021-02-07 19:22:55 +0100
commit7596696bc5c6062c52f07e2ed99e3b2eebb3a33e (patch)
tree08971212d392e2f632805c397516b44a56a267aa /drivers/fastboot/fb_mmc.c
parenta362ce214f03f965b05a9a89997294773cd6e908 (diff)
fastboot: mmc: Add CONFIG_FASTBOOT_MMC_USER_SUPPORT
Split userdata and boot partition support for eMMC update and correct the description (update is supported). The new configuration CONFIG_FASTBOOT_MMC_USER_SUPPORT allows to activate support of userdata partition update, based on target name=CONFIG_FASTBOOT_MMC_USER_NAME This patch also removes the unnecessary dependency with ARCH_MEDIATEK and EFI_PARTITION. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'drivers/fastboot/fb_mmc.c')
-rw-r--r--drivers/fastboot/fb_mmc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 4e26cef941..b5d4c90bfc 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -174,7 +174,8 @@ static void write_raw_image(struct blk_desc *dev_desc,
fastboot_okay(NULL, response);
}
-#ifdef CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT
+#if defined(CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT) || \
+ defined(CONFIG_FASTBOOT_MMC_USER_SUPPORT)
static int fb_mmc_erase_mmc_hwpart(struct blk_desc *dev_desc)
{
lbaint_t blks;
@@ -193,7 +194,9 @@ static int fb_mmc_erase_mmc_hwpart(struct blk_desc *dev_desc)
return 0;
}
+#endif
+#ifdef CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT
static void fb_mmc_boot1_ops(struct blk_desc *dev_desc, void *buffer,
u32 buff_sz, char *response)
{
@@ -473,7 +476,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
#endif
#if CONFIG_IS_ENABLED(EFI_PARTITION)
-#ifndef CONFIG_FASTBOOT_MMC_USER_NAME
+#ifndef CONFIG_FASTBOOT_MMC_USER_SUPPORT
if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) {
#else
if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0 ||
@@ -603,7 +606,7 @@ void fastboot_mmc_erase(const char *cmd, char *response)
}
#endif
-#ifdef CONFIG_FASTBOOT_MMC_USER_NAME
+#ifdef CONFIG_FASTBOOT_MMC_USER_SUPPORT
if (strcmp(cmd, CONFIG_FASTBOOT_MMC_USER_NAME) == 0) {
/* erase EMMC userdata */
if (fb_mmc_erase_mmc_hwpart(dev_desc))