From patchwork Thu Apr 23 13:25:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madalin Bucur \(OSS\)" X-Patchwork-Id: 238391 List-Id: U-Boot discussion From: madalin.bucur at oss.nxp.com (Madalin Bucur) Date: Thu, 23 Apr 2020 16:25:20 +0300 Subject: [PATCH 10/12] net: fm: fix compilation issue In-Reply-To: <1587648322-24795-1-git-send-email-madalin.bucur@oss.nxp.com> References: <1587648322-24795-1-git-send-email-madalin.bucur@oss.nxp.com> Message-ID: <1587648322-24795-11-git-send-email-madalin.bucur@oss.nxp.com> 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 --- 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;