[U-Boot] [PATCH 4/4] ARM: exynos5420: Add dfu_alt_info board specific callbacks to support DFU download

Lukasz Majewski l.majewski at samsung.com
Wed Mar 4 15:04:57 CET 2015


From: Inha Song <ideal.song at samsung.com>

This patch adds board specific code to provide dfu_alt_info handling for
Exynos5420.

Signed-off-by: Inha Song <ideal.song at samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
---
 board/samsung/smdk5420/smdk5420.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c
index ecd9b97..1df4b28 100644
--- a/board/samsung/smdk5420/smdk5420.c
+++ b/board/samsung/smdk5420/smdk5420.c
@@ -131,3 +131,29 @@ int board_usb_cleanup(int index, enum usb_init_type init)
 	dwc3_uboot_exit(index);
 	return 0;
 }
+
+#ifdef CONFIG_SET_DFU_ALT_INFO
+char *get_dfu_alt_system(void)
+{
+	return getenv("dfu_alt_system");
+}
+
+char *get_dfu_alt_boot(void)
+{
+	char *alt_boot;
+
+	switch (get_boot_mode()) {
+	case BOOT_MODE_SD:
+		alt_boot = CONFIG_DFU_ALT_BOOT_SD;
+		break;
+	case BOOT_MODE_EMMC:
+	case BOOT_MODE_EMMC_SD:
+		alt_boot = CONFIG_DFU_ALT_BOOT_EMMC;
+		break;
+	default:
+		alt_boot = NULL;
+		break;
+	}
+	return alt_boot;
+}
+#endif
-- 
2.0.0.rc2



More information about the U-Boot mailing list