From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ravi Babu Date: Fri, 27 May 2016 19:09:32 +0530 Subject: [U-Boot] [RFC PATCH 4/5] dfu: spl: add generic spl-dfu function in common-spl In-Reply-To: <1464356373-8375-1-git-send-email-ravibabu@ti.com> References: <1464356373-8375-1-git-send-email-ravibabu@ti.com> Message-ID: <1464356373-8375-5-git-send-email-ravibabu@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add generic spl-dfu function in common-spl, specific implemention for configuring dfu memory device is done in platform board specific source file. Signed-off-by: Ravi Babu --- common/spl/spl.c | 11 +++++++++++ include/spl.h | 1 + 2 files changed, 12 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 82e7f58..ef6d2d1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -273,6 +273,13 @@ static void announce_boot_device(u32 boot_device) static inline void announce_boot_device(u32 boot_device) { } #endif +#ifdef CONFIG_SPL_DFU +__weak int spl_run_dfu(void) +{ + return 0; +} +#endif + static int spl_load_image(u32 boot_device) { switch (boot_device) { @@ -367,6 +374,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2) spl_board_init(); #endif +#ifdef CONFIG_SPL_DFU + spl_run_dfu(); +#endif + board_boot_order(spl_boot_list); for (i = 0; i < ARRAY_SIZE(spl_boot_list) && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) { diff --git a/include/spl.h b/include/spl.h index 5f0b0db..5794b05 100644 --- a/include/spl.h +++ b/include/spl.h @@ -158,4 +158,5 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); +int spl_run_dfu(void); #endif -- 1.7.9.5