[U-Boot] [RFC PATCH 4/5] dfu: spl: add generic spl-dfu function in common-spl

Lukasz Majewski l.majewski at samsung.com
Mon May 30 14:07:39 CEST 2016


Hi Ravi,

> 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 <ravibabu at ti.com>
> ---
>  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

Reviewed-by: Lukasz Majewski <l.majewski at samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group


More information about the U-Boot mailing list