xilinx: Consolidate board_fit_config_name_match() for Xilinx platforms

Move board_fit_config_name_match() from Zynq/ZynqMP to common location.
This change will open a way to use it also by Microblaze and Versal.
Through this function there is a way to handle images with multiple DTBs.
For now match it with DEVICE_TREE as is done for Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek
2020-10-26 12:26:13 +01:00
parent 728d21b8c7
commit 05af4834ad
3 changed files with 11 additions and 24 deletions

View File

@@ -16,6 +16,7 @@
#include <dm.h>
#include <i2c_eeprom.h>
#include <net.h>
#include <generated/dt.h>
#include "fru.h"
@@ -425,3 +426,13 @@ int board_late_init_xilinx(void)
return 0;
}
#endif
int __maybe_unused board_fit_config_name_match(const char *name)
{
debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
if (!strcmp(name, DEVICE_TREE))
return 0;
return -1;
}