blob: d90b252baef728b8a75fa6ba37eeb259e36a3ee2 [file] [log] [blame]
Green Wan2e5da522021-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>
Zong Liec348492021-09-01 15:01:42 +080010#include <cpu_func.h>
Green Wan2e5da522021-05-27 06:52:13 -070011#include <dm.h>
Zong Li5cc6af22021-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 Wan2e5da522021-05-27 06:52:13 -070023
24int board_init(void)
25{
Green Wan2e5da522021-05-27 06:52:13 -070026 /* enable all cache ways */
Zong Liec348492021-09-01 15:01:42 +080027 enable_caches();
28
Green Wan2e5da522021-05-27 06:52:13 -070029 return 0;
30}