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 <osk...@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
signature.asc
Description: PGP signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot