summaryrefslogtreecommitdiff
path: root/board/sifive
diff options
context:
space:
mode:
authorZong Li <zong.li@sifive.com>2021-09-01 10:01:42 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-09-07 05:34:29 +0300
commit835210a125bef56dacb687cb9f4deae61e68e79d (patch)
tree1e85616b1df155501a4d9b1b273eff6c71641457 /board/sifive
parent213ed175b0a97313982c8341c34e48f0ea59b60e (diff)
downloadu-boot-835210a125bef56dacb687cb9f4deae61e68e79d.tar.xz
board: sifive: use ccache driver instead of helper function
Invokes the common cache_init function to initialize ccache. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'board/sifive')
-rw-r--r--board/sifive/unleashed/unleashed.c10
-rw-r--r--board/sifive/unmatched/unmatched.c11
2 files changed, 5 insertions, 16 deletions
diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c
index fa65fcade0..8cd514df30 100644
--- a/board/sifive/unleashed/unleashed.c
+++ b/board/sifive/unleashed/unleashed.c
@@ -6,6 +6,7 @@
* Anup Patel <anup.patel@wdc.com>
*/
+#include <cpu_func.h>
#include <dm.h>
#include <env.h>
#include <init.h>
@@ -15,7 +16,6 @@
#include <linux/delay.h>
#include <misc.h>
#include <spl.h>
-#include <asm/arch/cache.h>
#include <asm/sections.h>
/*
@@ -126,14 +126,8 @@ void *board_fdt_blob_setup(void)
int board_init(void)
{
- int ret;
-
/* enable all cache ways */
- ret = cache_enable_ways();
- if (ret) {
- debug("%s: could not enable cache ways\n", __func__);
- return ret;
- }
+ enable_caches();
return 0;
}
diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c
index da23a6ce24..d90b252bae 100644
--- a/board/sifive/unmatched/unmatched.c
+++ b/board/sifive/unmatched/unmatched.c
@@ -7,8 +7,8 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
-#include <asm/arch/cache.h>
#include <asm/sections.h>
void *board_fdt_blob_setup(void)
@@ -23,13 +23,8 @@ void *board_fdt_blob_setup(void)
int board_init(void)
{
- int ret;
-
/* enable all cache ways */
- ret = cache_enable_ways();
- if (ret) {
- debug("%s: could not enable cache ways\n", __func__);
- return ret;
- }
+ enable_caches();
+
return 0;
}