]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: fm: fix build error when not using nand
authorFrancois Gervais <fgervais@distech-controls.com>
Wed, 8 Apr 2020 13:48:12 +0000 (09:48 -0400)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 17 Apr 2020 09:43:19 +0000 (15:13 +0530)
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>
drivers/net/fm/fm.c

index 926cf81a07f0f06a7e8d0a87e30712ceead55fba..7a081b9d03035c686574fc71de5b2f3ed6157a74 100644 (file)
@@ -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;