From: Christian Taedcke <[email protected]> This way custom logic can be implemented per board after the fpga image is uploaded.
Signed-off-by: Christian Taedcke <[email protected]> --- common/spl/spl_fit.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 730639f756..3a1e3382ba 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -560,6 +560,16 @@ __weak void *spl_load_simple_fit_fix_load(const void *fit) return (void *)fit; } +/* + * Weak default function to allow implementing logic after fpga image is + * uploaded. + */ +__weak void board_spl_fit_post_upload_fpga(const void *fit, int node, + struct spl_image_info *fpga_image, + int ret) +{ +} + static void warn_deprecated(const char *msg) { printf("DEPRECATED: %s\n", msg); @@ -590,6 +600,9 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, ret = fpga_load(devnum, (void *)fpga_image->load_addr, fpga_image->size, BIT_FULL, flags); + + board_spl_fit_post_upload_fpga(ctx->fit, node, fpga_image, ret); + if (ret) { printf("%s: Cannot load the image to the FPGA\n", __func__); return ret; -- 2.34.1

