Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 1 | // 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 | |||||
Zong Li | ec34849 | 2021-09-01 15:01:42 +0800 | [diff] [blame] | 9 | #include <cpu_func.h> |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 10 | #include <dm.h> |
Zong Li | 5cc6af2 | 2021-07-27 17:06:59 +0800 | [diff] [blame] | 11 | #include <asm/sections.h> |
12 | |||||
Simon Glass | 94086b2 | 2024-11-02 11:49:42 -0600 | [diff] [blame] | 13 | int board_fdt_blob_setup(void **fdtp) |
Zong Li | 5cc6af2 | 2021-07-27 17:06:59 +0800 | [diff] [blame] | 14 | { |
Simon Glass | 94086b2 | 2024-11-02 11:49:42 -0600 | [diff] [blame] | 15 | if (gd->arch.firmware_fdt_addr) { |
16 | *fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; | ||||
17 | return 0; | ||||
Zong Li | 5cc6af2 | 2021-07-27 17:06:59 +0800 | [diff] [blame] | 18 | } |
Bin Meng | 50753b4 | 2021-09-11 22:31:23 +0800 | [diff] [blame] | 19 | |
Simon Glass | 94086b2 | 2024-11-02 11:49:42 -0600 | [diff] [blame] | 20 | return -EEXIST; |
Zong Li | 5cc6af2 | 2021-07-27 17:06:59 +0800 | [diff] [blame] | 21 | } |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 22 | |
23 | int board_init(void) | ||||
24 | { | ||||
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 25 | /* enable all cache ways */ |
Zong Li | ec34849 | 2021-09-01 15:01:42 +0800 | [diff] [blame] | 26 | enable_caches(); |
27 | |||||
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 28 | return 0; |
29 | } |