blob: 8773b660faf08a422b53bbaff24beb6e87952af4 [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>
Zong Li835210a2021-09-01 15:01:42 +080010#include <cpu_func.h>
Green Wan70415e12021-05-27 06:52:13 -070011#include <dm.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;
Zong Li47d73ba2021-07-27 17:06:59 +080019 }
Bin Menga0cfe132021-09-11 22:31:23 +080020
21 return (ulong *)&_end;
Zong Li47d73ba2021-07-27 17:06:59 +080022}
Green Wan70415e12021-05-27 06:52:13 -070023
24int board_init(void)
25{
Green Wan70415e12021-05-27 06:52:13 -070026 /* enable all cache ways */
Zong Li835210a2021-09-01 15:01:42 +080027 enable_caches();
28
Green Wan70415e12021-05-27 06:52:13 -070029 return 0;
30}