From: Pankit Garg Date: Thu, 30 Apr 2020 10:24:05 +0000 (+0530) Subject: board_r: Detect ifc-nor flash at run-time X-Git-Tag: v2020.07-rc3~10^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=62d3a58dcef90aeb2e2aae7349ecf6d7bce8d54a;p=oweals%2Fu-boot.git board_r: Detect ifc-nor flash at run-time CONFIG_MTD_NOR_FLASH flag needs to be enable for all boot sources,as all flash drivers need to compile in TFA Boot.Probe ifc nor flash only when there is nor flash available on board.So needs to detect ifc-nor flash at run-time for probing. Signed-off-by: Pankit Garg Reviewed-by: Priyanka Jain --- diff --git a/common/board_r.c b/common/board_r.c index 96034b874e..b04e6ad2a9 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -369,11 +369,19 @@ static int initr_binman(void) } #if defined(CONFIG_MTD_NOR_FLASH) +__weak int is_flash_available(void) +{ + return 1; +} + static int initr_flash(void) { ulong flash_size = 0; bd_t *bd = gd->bd; + if (!is_flash_available()) + return 0; + puts("Flash: "); if (board_flash_wp_on())