qca: arm: fix compiler error when eMMC is disabled

Change-Id: I24aadfb70efbe48bb5d33c76ed29a873b0975b2b
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
diff --git a/board/qca/arm/ipq6018/ipq6018.c b/board/qca/arm/ipq6018/ipq6018.c
index 0f14255..ef329fc 100644
--- a/board/qca/arm/ipq6018/ipq6018.c
+++ b/board/qca/arm/ipq6018/ipq6018.c
@@ -225,6 +225,7 @@
 	return;
 }
 
+#ifdef CONFIG_QCA_MMC
 void emmc_clock_config(void)
 {
 	/* Enable root clock generator */
@@ -316,6 +317,13 @@
 
 	return ret;
 }
+#else
+int board_mmc_init(bd_t *bis)
+{
+	return 0;
+}
+#endif
+
 void board_nand_init(void)
 {
 #ifdef CONFIG_QCA_SPI
@@ -780,6 +788,7 @@
 /**
  * Set the uuid in bootargs variable for mounting rootfilesystem
  */
+#ifdef CONFIG_QCA_MMC
 int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_flag)
 {
 	int ret, len;
@@ -826,6 +835,12 @@
 
 	return 0;
 }
+#else
+int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_flag)
+{
+	return 0;
+}
+#endif
 
 int get_aquantia_gpio(void)
 {
diff --git a/common/cmd_flashwrite.c b/common/cmd_flashwrite.c
index 669da3a..8c9654e 100644
--- a/common/cmd_flashwrite.c
+++ b/common/cmd_flashwrite.c
@@ -138,7 +138,9 @@
 	layout = "default";
 	retn = CMD_RET_FAILURE;
 
+#ifdef CONFIG_QCA_MMC
 	block_dev_desc_t *blk_dev;
+#endif
 	disk_partition_t disk_info = {0};
 	qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
 	nand_info_t *nand = &nand_info[CONFIG_NAND_FLASH_INFO_IDX];
@@ -204,6 +206,7 @@
 			layout = "sbl";
 #endif
 
+#ifdef CONFIG_QCA_MMC
 	} else if (sfi->flash_type == SMEM_BOOT_MMC_FLASH) {
 
 		blk_dev = mmc_get_dev(mmc_host.dev_num);
@@ -218,6 +221,7 @@
 			part_size = (ulong)disk_info.size;
 		}
 
+#endif
 	} else if (sfi->flash_type == SMEM_BOOT_SPI_FLASH) {
 
 		if (get_which_flash_param(part_name)) {
@@ -242,7 +246,8 @@
 				part_size = (ulong) IPQ_NAND_ROOTFS_SIZE;
 			}
 
-		}else if ((smem_getpart(part_name, &start_block, &size_block)
+#ifdef CONFIG_QCA_MMC
+		} else if ((smem_getpart(part_name, &start_block, &size_block)
 				== -ENOENT) && (sfi->rootfs.offset == 0xBAD0FF5E)){
 
 			/* NOR + EMMC */
@@ -259,6 +264,7 @@
 				offset = (ulong)disk_info.start;
 				part_size = (ulong)disk_info.size;
 			}
+#endif
 		} else {
 
 			ret = smem_getpart(part_name, &start_block,