diff mbox series

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

Message ID 1587648322-24795-11-git-send-email-madalin.bucur@oss.nxp.com
State New
Headers show
Series Enable DM_ETH on the DPAA1 ARM platforms | expand

Commit Message

Madalin Bucur (OSS) April 23, 2020, 1:25 p.m. UTC
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 mbox series

Patch

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;