blob: da23a6ce246cef61aead72f5227348bdbb496fe6 [file] [log] [blame]
Green Wan70415e12021-05-27 06:52:13 -07001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2020-2021, SiFive Inc
4 *
5 * Authors:
6 * Pragnesh Patel <pragnesh.patel@sifive.com>
7 */
8
9#include <common.h>
10#include <dm.h>
11#include <asm/arch/cache.h>
Zong Li47d73ba2021-07-27 17:06:59 +080012#include <asm/sections.h>
13
14void *board_fdt_blob_setup(void)
15{
16 if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
17 if (gd->arch.firmware_fdt_addr)
18 return (ulong *)gd->arch.firmware_fdt_addr;
19 else
20 return (ulong *)&_end;
21 }
22}
Green Wan70415e12021-05-27 06:52:13 -070023
24int board_init(void)
25{
26 int ret;
27
28 /* enable all cache ways */
29 ret = cache_enable_ways();
30 if (ret) {
31 debug("%s: could not enable cache ways\n", __func__);
32 return ret;
33 }
34 return 0;
35}