From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 5/5] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform
Date: Mon, 30 May 2016 14:19:49 +0200 [thread overview]
Message-ID: <20160530141949.623e67e6@amdc2363> (raw)
In-Reply-To: <1464356373-8375-6-git-send-email-ravibabu@ti.com>
Hi Ravi,
> Adding SPL-DFU support for dra7x platform. The DFU
> support for dra7x includes QSPI, MMC/SD and eMMC
> memory devices. The SPL-DFU memory devices can be
> selected through meunconfig->Boot Images.
>
> Signed-off-by: Ravi Babu <ravibabu@ti.com>
> ---
> board/ti/dra7xx/evm.c | 20 ++++++++++++++++++++
> include/configs/dra7xx_evm.h | 3 +--
> include/configs/ti_omap5_common.h | 2 --
> 3 files changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index f194999..0ce0e97 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -30,6 +30,7 @@
> #include <miiphy.h>
> #include <spl.h>
> #include <pcf8575.h>
> +#include <dfu.h>
>
> #include "mux_data.h"
> #include "../common/board_detect.h"
> @@ -619,6 +620,25 @@ int spl_start_uboot(void)
> }
> #endif
>
> +#ifdef CONFIG_SPL_DFU
> +int spl_run_dfu(void)
> +{
> +#ifdef CONFIG_SPL_DFU_EMMC
> + return dfu_run_mmc(0, 1, "dfu_alt_info_emmc");
Maybe dfu_run_mmc() -> dfu_spl_flash_mmc()?
Which would be dfu tunned command with minimal space footprint?
> +#endif
> +
> +#ifdef CONFIG_SPL_DFU_MMC
> + return dfu_run_mmc(0, 0, "dfu_alt_info_mmc");
> +#endif
> +
> +#ifdef CONFIG_SPL_DFU
> + return dfu_run_cmd("dfu_alt_info_qspi",
> + "dfu 0 sf 0:0:64000000:0");
I do feel like running commands in SPL context is the overkill.
However, I do not know what would be the SPL binary size reduction if
we re-implement the dfu_run_cmd() as a set of dedicated commands (like
dfu_spl_flash_sf(0, X, <sf proper alt setting @ envs>,
dfu_spl_flash_nand(0, X, <nand proper alt setting @ envs>), etc.).
If the difference is minimal, then we could leave dfu_run_cmd() in the
presented form.
As I've asked previously - what is the u-boot SPL binary size increase
after adding DFU SPL support to your platform?
> +#endif
> + return 0;
> +}
> +#endif
> +
> #ifdef CONFIG_DRIVER_TI_CPSW
> extern u32 *const omap_si_rev;
>
> diff --git a/include/configs/dra7xx_evm.h
> b/include/configs/dra7xx_evm.h index da84f1c..ec10cd8 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -44,7 +44,6 @@
>
> #define CONFIG_SYS_OMAP_ABE_SYSCK
>
> -#ifndef CONFIG_SPL_BUILD
> /* Define the default GPT table for eMMC */
> #define PARTS_DEFAULT \
> /* Linux partitions */ \
> @@ -122,6 +121,7 @@
> DFU_ALT_INFO_QSPI
>
> /* Fastboot */
> +#ifndef CONFIG_SPL_BUILD
> #define CONFIG_USB_FUNCTION_FASTBOOT
> #define CONFIG_CMD_FASTBOOT
> #define CONFIG_ANDROID_BOOT_IMAGE
> @@ -331,5 +331,4 @@
> /* pcf support */
> #define CONFIG_PCF8575
> #define CONFIG_SYS_I2C_PCF8575_CHIP { {0x21, 0xeaf7} }
> -
> #endif /* __CONFIG_DRA7XX_EVM_H */
> diff --git a/include/configs/ti_omap5_common.h
> b/include/configs/ti_omap5_common.h index 59f0f70..f9c6576 100644
> --- a/include/configs/ti_omap5_common.h
> +++ b/include/configs/ti_omap5_common.h
> @@ -66,7 +66,6 @@
> #define DFUARGS
> #endif
>
> -#ifndef CONFIG_SPL_BUILD
> #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
> #define CONFIG_EXTRA_ENV_SETTINGS \
> DEFAULT_LINUX_BOOT_ENV \
> @@ -136,7 +135,6 @@
> "setenv mmcroot /dev/mmcblk0p2 rw; " \
> "run mmcboot;" \
> ""
> -#endif
>
> /*
> * SPL related defines. The Public RAM memory map the ROM defines
> the
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2016-05-30 12:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 13:39 [U-Boot] [RFC PATCH 0/5] SPL: DFU Support in SPL Ravi Babu
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 1/5] spl: dfu: add dfu support " Ravi Babu
2016-05-30 11:54 ` Lukasz Majewski
2016-05-30 13:43 ` B, Ravi
2016-05-30 14:59 ` Lukasz Majewski
2016-05-31 6:39 ` B, Ravi
2016-05-31 8:39 ` Lukasz Majewski
2016-05-31 9:04 ` B, Ravi
2016-05-31 9:55 ` Lukasz Majewski
2016-05-31 10:34 ` B, Ravi
2016-05-31 12:47 ` Lukasz Majewski
2016-05-31 13:31 ` B, Ravi
2016-05-31 15:13 ` Lukasz Majewski
2016-06-02 12:39 ` B, Ravi
2016-06-02 14:14 ` Lukasz Majewski
2016-06-02 14:22 ` B, Ravi
2016-06-03 9:27 ` Lukasz Majewski
2016-06-03 11:35 ` B, Ravi
2016-06-03 11:45 ` Lukasz Majewski
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 2/5] spl: dfu: fs: adding ext4/fat filesystem support for SPL-DFU Ravi Babu
2016-05-30 11:59 ` Lukasz Majewski
2016-05-30 12:52 ` B, Ravi
2016-05-30 13:20 ` Lukasz Majewski
2016-05-30 13:52 ` B, Ravi
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 3/5] spl: dfu: adding dfu support functions " Ravi Babu
2016-05-30 5:27 ` Heiko Schocher
2016-05-30 12:04 ` Lukasz Majewski
2016-05-30 12:49 ` B, Ravi
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 4/5] dfu: spl: add generic spl-dfu function in common-spl Ravi Babu
2016-05-30 12:07 ` Lukasz Majewski
2016-05-27 13:39 ` [U-Boot] [RFC PATCH 5/5] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform Ravi Babu
2016-05-30 12:19 ` Lukasz Majewski [this message]
2016-05-27 13:42 ` [U-Boot] [RFC PATCH 0/5] SPL: DFU Support in SPL Marek Vasut
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=20160530141949.623e67e6@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox