From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v1 3/6] dfu: spl: add generic spl-dfu function in common-spl
Date: Fri, 24 Jun 2016 11:01:44 +0200 [thread overview]
Message-ID: <20160624110144.6b62bab5@amdc2363> (raw)
In-Reply-To: <1465902144-30934-4-git-send-email-ravibabu@ti.com>
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@ti.com>
> ---
> common/spl/spl.c | 9 +++++++++
> include/spl.h | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index 82e7f58..0726378 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -273,6 +273,11 @@ static void announce_boot_device(u32 boot_device)
> static inline void announce_boot_device(u32 boot_device) { }
> #endif
>
> +__weak int spl_run_dfu(void)
> +{
> + return 0;
> +}
> +
> static int spl_load_image(u32 boot_device)
> {
> switch (boot_device) {
> @@ -367,6 +372,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
> spl_board_init();
> #endif
>
> + if (spl_run_dfu())
> + goto os_boot;
> +
> board_boot_order(spl_boot_list);
> for (i = 0; i < ARRAY_SIZE(spl_boot_list) &&
> spl_boot_list[i] != BOOT_DEVICE_NONE; i++) {
> @@ -381,6 +389,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
> hang();
> }
>
> +os_boot:
> switch (spl_image.os) {
> case IH_OS_U_BOOT:
> debug("Jumping to U-Boot\n");
> diff --git a/include/spl.h b/include/spl.h
> index 8849678..f21a76a 100644
> --- a/include/spl.h
> +++ b/include/spl.h
> @@ -149,4 +149,5 @@ bool spl_was_boot_source(void);
> int spl_dfu_mmc(int usb_index, int mmc_dev, char *dfu_alt_info);
> int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface,
> char *devstr); int spl_dfu_ram_load_image(void);
> +int spl_run_dfu(void);
> #endif
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2016-06-24 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 11:02 [U-Boot] [RFC PATCH v1 0/6] SPL: DFU Support in SPL Ravi Babu
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 1/6] spl: dfu: add dfu support " Ravi Babu
2016-06-24 8:50 ` Lukasz Majewski
2016-06-24 8:54 ` B, Ravi
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 2/6] spl: dfu: adding dfu support functions for SPL-DFU Ravi Babu
2016-06-24 9:00 ` Lukasz Majewski
2016-06-24 9:02 ` B, Ravi
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 3/6] dfu: spl: add generic spl-dfu function in common-spl Ravi Babu
2016-06-24 9:01 ` Lukasz Majewski [this message]
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 4/6] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform Ravi Babu
2016-06-24 9:10 ` Lukasz Majewski
2016-06-24 9:27 ` B, Ravi
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 5/6] dfu: spl: dra7x: enable SPL-dfu " Ravi Babu
2016-06-24 9:12 ` Lukasz Majewski
2016-06-24 9:21 ` B, Ravi
2016-06-14 11:02 ` [U-Boot] [RFC PATCH v1 6/6] dfu: spl: am335x: SPL-DFU support for am335x Ravi Babu
2016-06-24 9:15 ` Lukasz Majewski
2016-06-24 9:29 ` B, Ravi
2016-06-21 8:39 ` [U-Boot] [RFC PATCH v1 0/6] SPL: DFU Support in SPL B, Ravi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160624110144.6b62bab5@amdc2363 \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.