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>
|
|
|
|
|
|
|
|
void *board_fdt_blob_setup(void)
|
|
|
|
{
|
|
|
|
if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
|
|
|
|
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;
|
|
|
|
}
|