From d0d6073f533f5959f49e77b23e3148a2c55e9464 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 8b769f5..274c687 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -113,6 +113,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"); @@ -130,6 +131,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 a86e013..034453e 100644 --- a/include/samsung/tizen_amlogic.h +++ b/include/samsung/tizen_amlogic.h @@ -85,9 +85,6 @@ "u-boot-n2.bin skip 0 0" #define DFU_ALT_BOOT_SD "" -/* 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 @@ -121,7 +118,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