2021-05-27 13:52:13 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2020-2021, SiFive Inc
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Pragnesh Patel <pragnesh.patel@sifive.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2021-09-01 07:01:42 +00:00
|
|
|
#include <cpu_func.h>
|
2021-05-27 13:52:13 +00:00
|
|
|
#include <dm.h>
|
2021-07-27 09:06:59 +00:00
|
|
|
#include <asm/sections.h>
|
|
|
|
|
2021-10-26 06:12:33 +00:00
|
|
|
void *board_fdt_blob_setup(int *err)
|
2021-07-27 09:06:59 +00:00
|
|
|
{
|
2021-10-26 06:12:33 +00:00
|
|
|
*err = 0;
|
2022-01-05 01:07:57 +00:00
|
|
|
if (IS_ENABLED(CONFIG_OF_SEPARATE) || IS_ENABLED(CONFIG_OF_BOARD)) {
|
2021-07-27 09:06:59 +00:00
|
|
|
if (gd->arch.firmware_fdt_addr)
|
2021-09-12 03:15:16 +00:00
|
|
|
return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
2021-07-27 09:06:59 +00:00
|
|
|
}
|
2021-09-11 14:31:23 +00:00
|
|
|
|
|
|
|
return (ulong *)&_end;
|
2021-07-27 09:06:59 +00:00
|
|
|
}
|
2021-05-27 13:52:13 +00:00
|
|
|
|
|
|
|
int board_init(void)
|
|
|
|
{
|
|
|
|
/* enable all cache ways */
|
2021-09-01 07:01:42 +00:00
|
|
|
enable_caches();
|
|
|
|
|
2021-05-27 13:52:13 +00:00
|
|
|
return 0;
|
|
|
|
}
|