ipq5018: Add cache support

Change-Id: Ib4388e63da3f9a3ef7cced5d7485df49aef62f53
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
diff --git a/board/qca/arm/ipq5018/ipq5018.c b/board/qca/arm/ipq5018/ipq5018.c
index 0efbd86..dfc827d 100644
--- a/board/qca/arm/ipq5018/ipq5018.c
+++ b/board/qca/arm/ipq5018/ipq5018.c
@@ -143,12 +143,22 @@
 
 void enable_caches(void)
 {
+	qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
+	smem_get_boot_flash(&sfi->flash_type,
+		&sfi->flash_index,
+		&sfi->flash_chip_select,
+		&sfi->flash_block_size,
+		&sfi->flash_density);
 	icache_enable();
+	/*Skips dcache_enable during JTAG recovery */
+	if (sfi->flash_type)
+		dcache_enable();
 }
 
 void disable_caches(void)
 {
 	icache_disable();
+	dcache_disable();
 }
 /**
  * * Set the uuid in bootargs variable for mounting rootfilesystem
diff --git a/board/qca/arm/ipq5018/ipq5018.h b/board/qca/arm/ipq5018/ipq5018.h
index 55032f2..581cd71 100644
--- a/board/qca/arm/ipq5018/ipq5018.h
+++ b/board/qca/arm/ipq5018/ipq5018.h
@@ -83,6 +83,9 @@
 
 __weak void aquantia_phy_reset_init_done(void) {}
 __weak void aquantia_phy_reset_init(void) {}
+__weak void qgic_init(void) {}
+__weak void handle_noc_err(void) {}
+__weak void board_pcie_clock_init(int id) {}
 
 struct smem_ram_ptable {
 	#define _SMEM_RAM_PTABLE_MAGIC_1	0x9DA5E0A8
diff --git a/include/configs/ipq5018.h b/include/configs/ipq5018.h
index e1eb73d..209e42f 100644
--- a/include/configs/ipq5018.h
+++ b/include/configs/ipq5018.h
@@ -22,6 +22,7 @@
 #define IPQ5018_EMULATION
 #define CONFIG_SYS_NO_FLASH
 #define CONFIG_SYS_CACHELINE_SIZE		64
+#define CONFIG_CMD_CACHE
 
 #define CONFIG_IPQ5018_UART
 #define CONFIG_NR_DRAM_BANKS			1