summaryrefslogtreecommitdiff
path: root/common/spl/spl_spi.c
AgeCommit message (Collapse)Author
2017-05-12spl: spi: override CONFIG_SYS_SPI_U_BOOT_OFFS via /config-propertyPhilipp Tomsich
For the RK3399-Q7, we need some flexibility (depending on the feature set we include in the SPL stage and how large our SPI flash is) in positioning the SPL payload (i.e. the FIT image containing U-Boot, ATF and the M0 payload) in our SPI flash. To avoid having to deal with this through different U-Boot images, we introduce a the '/config/u-boot,spl-payload-offset' property node allow it to override the default setting. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-02-06spl: spi: Add a debug message if loading failsSimon Glass
This currently fails silently. Add a debug message to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-12-09spl: Add a name to the SPL load-image methodsSimon Glass
It is useful to name each method so that we can print out this name when using the method. Currently this happens using a separate function. In preparation for unifying this, add a name to each method. The name is only available if we have libcommon support (i.e can use printf()). Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-28spl: add check for FIT-header when loading imagetomas.melin@vaisala.com
Add check for FDT_MAGIC, otherwise also legacy images will be loaded as a FIT. With this check in place, the loader works correct both with legacy and FIT images. Signed-off-by: Tomas Melin <tomas.melin@vaisala.com> Acked-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-06spl: Update spl_load_simple_fit() to take an spl_image paramSimon Glass
Upda the SPL FIT code to use the spl_image parameter. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-06spl: Pass spl_image as a parameter to load_image() methodsSimon Glass
Rather than having a global variable, pass the spl_image as a parameter. This avoids BSS use, and makes it clearer what the function is actually doing. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-06spl: Convert spl_spi_load_image() to use linker listSimon Glass
Add a linker list declaration for this method and remove the explicit switch() code. Also set up the sunxi function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-06spl: spi: Move the generic SPI loader into common/splSimon Glass
All the other SPL loaders are in this directory, so move the SPI one in there too. There are two board-specific SPI loaders (fsl and sunxi). These remain in the drivers/mtd/spi directory, since they do not contain generic code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>