diff options
author | Ibai Erkiaga | 2019-10-02 15:57:36 +0100 |
---|---|---|
committer | Michal Simek | 2019-10-08 13:14:54 +0200 |
commit | fec657bebd77d789a7f9708b79f95225a9c4eeef (patch) | |
tree | 5ae44a57d9071404bf5cd7ef65e5530a2f3a7f1b /board/xilinx | |
parent | a3e552b53fb85abce33a8e00bc430d014d7ee733 (diff) |
arm64: versal: Move common board dtb search
Move the exisiting function of getting board dtb from versal to a common
Xilinx folder.
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r-- | board/xilinx/Kconfig | 7 | ||||
-rw-r--r-- | board/xilinx/common/board.c | 14 | ||||
-rw-r--r-- | board/xilinx/versal/Makefile | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig index 37bec5fae29..4f290339a09 100644 --- a/board/xilinx/Kconfig +++ b/board/xilinx/Kconfig @@ -39,3 +39,10 @@ config XILINX_PS_INIT_FILE before the build. endif + +config VERSAL_OF_BOARD_DTB_ADDR + hex + default 0x1000 + depends on OF_BOARD + help + Offset in the memory where the board configuration DTB is placed. diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 7e6340bad6d..f66973bc66c 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -36,3 +36,17 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr) return ret; } + +#if defined(CONFIG_OF_BOARD) +void *board_fdt_blob_setup(void) +{ + static void *fw_dtb = (void *)CONFIG_VERSAL_OF_BOARD_DTB_ADDR; + + if (fdt_magic(fw_dtb) != FDT_MAGIC) { + printf("DTB is not passed via %p\n", fw_dtb); + return NULL; + } + + return fw_dtb; +} +#endif diff --git a/board/xilinx/versal/Makefile b/board/xilinx/versal/Makefile index 2b812765ee2..e9307d7fa69 100644 --- a/board/xilinx/versal/Makefile +++ b/board/xilinx/versal/Makefile @@ -5,3 +5,4 @@ # obj-y := board.o +obj-y += ../common/board.o |