tizen: amlogic: automatically set "dfu_device" env
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 17 Nov 2020 09:59:13 +0000 (10:59 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 04:19:25 +0000 (13:19 +0900)
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 <m.szyprowski@samsung.com>
Change-Id: I4378161c3ebf5377d50e1e28dd57d3d1511f3648

arch/arm/mach-meson/board-common.c
include/samsung/tizen_amlogic.h

index 8b769f5..274c687 100644 (file)
@@ -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");
index a86e013..034453e 100644 (file)
@@ -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
        "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