diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/devicetree.cb | 2 | ||||
-rw-r--r-- | src/soc/sifive/fu540/chip.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/mainboard/sifive/hifive-unleashed/devicetree.cb b/src/mainboard/sifive/hifive-unleashed/devicetree.cb index 796c232c2d..02d8dee58f 100644 --- a/src/mainboard/sifive/hifive-unleashed/devicetree.cb +++ b/src/mainboard/sifive/hifive-unleashed/devicetree.cb @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only chip soc/sifive/fu540 - device cpu_cluster 0 on end + device cpu_cluster 0 on ops fu540_cpu_ops end end diff --git a/src/soc/sifive/fu540/chip.c b/src/soc/sifive/fu540/chip.c index e33b4a3b0f..1733b20aa7 100644 --- a/src/soc/sifive/fu540/chip.c +++ b/src/soc/sifive/fu540/chip.c @@ -1,6 +1,18 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <cbmem.h> #include <device/device.h> +#include <soc/addressmap.h> + +static void fu540_read_resources(struct device *dev) +{ + int index = 0; + ram_from_to(dev, index++, FU540_DRAM, (uintptr_t)cbmem_top()); +} + +struct device_operations fu540_cpu_ops = { + .read_resources = fu540_read_resources, +}; struct chip_operations soc_sifive_fu540_ops = { .name = "SIFIVE FU540", |