Ver código fonte

vic7100: enable cache ways (L2 cache)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
David Abdurachmanov 3 anos atrás
pai
commit
4571f5a4e1
1 arquivos alterados com 12 adições e 1 exclusões
  1. 12 1
      board/starfive/vic7100/vic7100.c

+ 12 - 1
board/starfive/vic7100/vic7100.c

@@ -1144,9 +1144,20 @@ int board_hw_init(void)
 
 int board_init(void)
 {
+	int ret = 0;
+
 	gd->bd->bi_boot_params = PHYS_SDRAM_0;
 
-	return 0;
+#if CONFIG_IS_ENABLED(CACHE_WAYENABLE)
+	/* enable all cache ways */
+	ret = cache_enable_ways();
+	if (ret) {
+		debug("%s: could not enable cache ways\n", __func__);
+		return ret;
+	}
+#endif
+
+	return ret;
 }
 
 void reset_phy(void)