mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-15 19:51:37 +00:00
fu740: add l2cc_get_base_addr for sharing with more functions
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
This commit is contained in:
parent
282b348110
commit
1962f02f52
1 changed files with 14 additions and 10 deletions
|
@ -20,24 +20,28 @@
|
|||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int cache_enable_ways(void)
|
||||
static fdt_addr_t l2cc_get_base_addr(void)
|
||||
{
|
||||
const void *blob = gd->fdt_blob;
|
||||
int node;
|
||||
int node = fdt_node_offset_by_compatible(blob, -1,
|
||||
"sifive,fu740-c000-ccache");
|
||||
|
||||
if (node < 0)
|
||||
return FDT_ADDR_T_NONE;
|
||||
|
||||
return fdtdec_get_addr_size_auto_parent(blob, 0, node, "reg", 0,
|
||||
NULL, false);
|
||||
}
|
||||
|
||||
int cache_enable_ways(void)
|
||||
{
|
||||
fdt_addr_t base;
|
||||
u32 config;
|
||||
u32 ways;
|
||||
|
||||
volatile u32 *enable;
|
||||
|
||||
node = fdt_node_offset_by_compatible(blob, -1,
|
||||
"sifive,fu740-c000-ccache");
|
||||
|
||||
if (node < 0)
|
||||
return node;
|
||||
|
||||
base = fdtdec_get_addr_size_auto_parent(blob, 0, node, "reg", 0,
|
||||
NULL, false);
|
||||
base = l2cc_get_base_addr();
|
||||
if (base == FDT_ADDR_T_NONE)
|
||||
return FDT_ADDR_T_NONE;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue