diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-06-02 08:07:15 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-06-05 06:33:02 +0300 |
commit | 72019ee2020fbc196a730dc4f52309e39d6b764a (patch) | |
tree | a4eae1590401db2daedc5efcd1800b410b1a78be | |
parent | 4e3876d5be1118aae5318c91e431e8cfedf580b1 (diff) | |
download | opensbi-72019ee2020fbc196a730dc4f52309e39d6b764a.tar.xz |
platform: kendryte/k210: Use new mechanism of builtin DTB
We update kendryte/k210 to use new mechanism of having builtin DTB
where we convert k210.dts to C source and further compile-n-link it
with libplatsbi.a.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
-rw-r--r-- | platform/kendryte/k210/config.mk | 1 | ||||
-rw-r--r-- | platform/kendryte/k210/objects.mk | 4 | ||||
-rw-r--r-- | platform/kendryte/k210/platform.c | 9 |
3 files changed, 12 insertions, 2 deletions
diff --git a/platform/kendryte/k210/config.mk b/platform/kendryte/k210/config.mk index e0f8d3a..8a9b814 100644 --- a/platform/kendryte/k210/config.mk +++ b/platform/kendryte/k210/config.mk @@ -17,4 +17,3 @@ platform-ldflags-y = FW_TEXT_START=0x80000000 FW_PAYLOAD=y FW_PAYLOAD_ALIGN=0x1000 -FW_PAYLOAD_FDT=k210.dtb diff --git a/platform/kendryte/k210/objects.mk b/platform/kendryte/k210/objects.mk index 7288e74..106f9f2 100644 --- a/platform/kendryte/k210/objects.mk +++ b/platform/kendryte/k210/objects.mk @@ -8,4 +8,6 @@ # platform-objs-y += platform.o -platform-dtb-y += k210.dtb + +platform-objs-y += k210.o +platform-varprefix-k210.o = dt_k210 diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c index ef0f18f..5c28fd9 100644 --- a/platform/kendryte/k210/platform.c +++ b/platform/kendryte/k210/platform.c @@ -17,6 +17,15 @@ #include <sbi_utils/sys/clint.h> #include "platform.h" +extern const char dt_k210_start[]; + +unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1, + unsigned long arg2, unsigned long arg3, + unsigned long arg4) +{ + return (unsigned long)&dt_k210_start[0]; +} + static struct plic_data plic = { .addr = K210_PLIC_BASE_ADDR, .num_src = K210_PLIC_NUM_SOURCES, |