summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Gervais <fgervais@distech-controls.com>2020-04-08 09:48:12 -0400
committerPriyanka Jain <priyanka.jain@nxp.com>2020-04-17 15:13:19 +0530
commit402ef4d2447fee1d615c9689bc545e537d21e46f (patch)
treecb28f256a7ffb092eeae2123f223d414473d5b60 /drivers/net
parent0f238dab6d17caabe4f9781d23aaa6087139f2bd (diff)
net: fm: fix build error when not using nand
If CONFIG_CMD_NAND is disabled, get_nand_dev_by_index() is not accessible. This fix allows the build to succeed in this case. Signed-off-by: Francois Gervais <fgervais@distech-controls.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fm/fm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 926cf81a07..7a081b9d03 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -360,6 +360,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
if (src == BOOT_SOURCE_IFC_NOR) {
addr = (void *)(CONFIG_SYS_FMAN_FW_ADDR +
CONFIG_SYS_FSL_IFC_BASE);
+#ifdef CONFIG_CMD_NAND
} else if (src == BOOT_SOURCE_IFC_NAND) {
size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH;
@@ -372,6 +373,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;