[U-Boot] [PATCH] sunxi: add spi flash bootcmd
Maxime Ripard
maxime.ripard at bootlin.com
Mon Jan 7 13:16:23 UTC 2019
On Sat, Jan 05, 2019 at 08:03:46PM +0200, Oskari Lemmela wrote:
> Enable SPI bootcmd if CONFIG_DM_SPI_FLASH is defined.
>
> Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
> ---
> include/configs/sunxi-common.h | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 9819d9980c..b2443ef678 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -401,6 +401,21 @@ extern int soft_i2c_gpio_scl;
> #define BOOT_TARGET_DEVICES_USB(func)
> #endif
>
> +#ifdef CONFIG_DM_SPI_FLASH
> +#define BOOT_TARGET_DEVICES_SPI(func) func(SPI, spi, 0)
> +#define BOOTENV_DEV_SPI(devtypeu, devtypel, instance) \
This belongs more in include/config_distro_bootcmd.h, there's nothing
really sunxi specific here.
> + "image_addr=0x100000\0" \
> + "image_size=0x700000\0" \
image_addr and image_size usually come from Kconfig, instead of being
hardcoded
> + "bootcmd_" #devtypel #instance "=" \
> + "if sf probe " #instance "; then " \
> + "sf read ${ramdisk_addr_r} ${image_addr} ${image_size}; " \
s/ramdisk_addr_r/kernel_addr_r/
Thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190107/11d45255/attachment.sig>
More information about the U-Boot
mailing list