summaryrefslogtreecommitdiff
path: root/board/xilinx/common/board.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
committerTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
commit3bfd12008bef1a8353e7ceaca2cb06cf388527ed (patch)
treeac25e8db2f18bcba9f48518249fc020a05cb576c /board/xilinx/common/board.c
parent6d41f0a39d6423c8e57e92ebbe9f8c0333a63f72 (diff)
parentd6da3dbaef57fc1d319b6b552efa009e2489d7d9 (diff)
Merge branch 'next'
Diffstat (limited to 'board/xilinx/common/board.c')
-rw-r--r--board/xilinx/common/board.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index a12dccd4c51..deea6c71103 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -358,17 +358,17 @@ __maybe_unused int xilinx_read_eeprom(void)
}
#if defined(CONFIG_OF_BOARD)
-void *board_fdt_blob_setup(int *err)
+int board_fdt_blob_setup(void **fdtp)
{
void *fdt_blob;
- *err = 0;
-
if (IS_ENABLED(CONFIG_TARGET_XILINX_MBV)) {
fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR;
- if (fdt_magic(fdt_blob) == FDT_MAGIC)
- return fdt_blob;
+ if (fdt_magic(fdt_blob) == FDT_MAGIC) {
+ *fdtp = fdt_blob;
+ return 0;
+ }
}
if (!IS_ENABLED(CONFIG_XPL_BUILD) &&
@@ -376,8 +376,10 @@ void *board_fdt_blob_setup(int *err)
!IS_ENABLED(CONFIG_ZYNQMP_NO_DDR)) {
fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR;
- if (fdt_magic(fdt_blob) == FDT_MAGIC)
- return fdt_blob;
+ if (fdt_magic(fdt_blob) == FDT_MAGIC) {
+ *fdtp = fdt_blob;
+ return 0;
+ }
debug("DTB is not passed via %p\n", fdt_blob);
}
@@ -396,13 +398,15 @@ void *board_fdt_blob_setup(int *err)
fdt_blob = (ulong *)_end;
}
- if (fdt_magic(fdt_blob) == FDT_MAGIC)
- return fdt_blob;
+ if (fdt_magic(fdt_blob) == FDT_MAGIC) {
+ *fdtp = fdt_blob;
+
+ return 0;
+ }
debug("DTB is also not passed via %p\n", fdt_blob);
- *err = -EINVAL;
- return NULL;
+ return -EINVAL;
}
#endif