From af24d8a82c93f8a51f2d4c47a2fb5a300849f128 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 17 Nov 2020 10:59:13 +0100 Subject: [PATCH] tizen: amlogic: automatically set "dfu_device" env Automatically set "dfu_device" to the current boot MMC device number. This allows to call dfu/thor/ums commands without any parameters for the default storage device. Signed-off-by: Marek Szyprowski Change-Id: I4378161c3ebf5377d50e1e28dd57d3d1511f3648 --- arch/arm/mach-meson/board-common.c | 2 ++ include/samsung/tizen_amlogic.h | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index b0f6c68..b1d1fb9 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -115,6 +115,7 @@ static void meson_set_boot_source(void) case BOOT_DEVICE_EMMC: source = "emmc"; #ifdef CONFIG_TIZEN + env_set("dfu_device", "1"); env_set("devnum", "1"); env_set("mmcbootdev", "1"); env_set("mmcrootdev", "1"); @@ -132,6 +133,7 @@ static void meson_set_boot_source(void) case BOOT_DEVICE_SD: source = "sd"; #ifdef CONFIG_TIZEN + env_set("dfu_device", "0"); env_set("devnum", "0"); env_set("mmcbootdev", "0"); env_set("mmcrootdev", "0"); diff --git a/include/samsung/tizen_amlogic.h b/include/samsung/tizen_amlogic.h index 725ba49..36b3037 100644 --- a/include/samsung/tizen_amlogic.h +++ b/include/samsung/tizen_amlogic.h @@ -92,9 +92,6 @@ #define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_2M #endif -/* SD/MMC configuration */ -#define CONFIG_MMC_DEFAULT_DEV 1 - #ifdef CONFIG_TIZEN_KHADAS_VIM3 #define TIZEN_BOOT_PREFIX "/vim3/ /\0" #elif CONFIG_TIZEN_ODROID_N2 @@ -128,7 +125,6 @@ "dfu_usb_con=0\0" \ "dfu_interface=mmc\0" \ "boot_prefixes="TIZEN_BOOT_PREFIX \ - "dfu_device=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0" #define CONFIG_TIZEN -- 2.7.4