[PATCH 10/12] net: fm: fix compilation issue

Madalin Bucur madalin.bucur at oss.nxp.com
Thu Apr 23 15:25:20 CEST 2020


The NAND related code needs to be guarded with #ifdef CONFIG_NAND_BOOT
to avoid a compilation error when this configuration is not enabled.

Signed-off-by: Madalin Bucur <madalin.bucur at oss.nxp.com>
---
 drivers/net/fm/fm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index bf8d3d0..b39bdda 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -364,6 +364,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
 		addr = (void *)(CONFIG_SYS_FMAN_FW_ADDR +
 				CONFIG_SYS_FSL_IFC_BASE);
 	} else if (src == BOOT_SOURCE_IFC_NAND) {
+#ifdef CONFIG_NAND_BOOT
 		size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH;
 
 		addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
@@ -375,6 +376,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
 			printf("NAND read of FMAN firmware at offset 0x%x failed %d\n",
 			       CONFIG_SYS_FMAN_FW_ADDR, rc);
 		}
+#endif
 	} else if (src == BOOT_SOURCE_QSPI_NOR) {
 		struct spi_flash *ucode_flash;
 
-- 
2.1.0



More information about the U-Boot mailing list