// SPDX-License-Identifier: GPL-2.0+
/*
- * (C) Copyright 2014 - 2020 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * (C) Copyright 2014 - 2022, Xilinx, Inc.
+ * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
#include <i2c_eeprom.h>
#include <net.h>
#include <generated/dt.h>
+#include <slre.h>
#include <soc.h>
#include <linux/ctype.h>
#include <linux/kernel.h>
{
debug("%s: Check %s, default %s\n", __func__, name, board_name);
+#if !defined(CONFIG_SPL_BUILD)
+ if (CONFIG_IS_ENABLED(REGEX)) {
+ struct slre slre;
+ int ret;
+
+ ret = slre_compile(&slre, name);
+ if (ret) {
+ ret = slre_match(&slre, board_name, strlen(board_name),
+ NULL);
+ debug("%s: name match ret = %d\n", __func__, ret);
+ return !ret;
+ }
+ }
+#endif
+
if (!strcmp(name, board_name))
return 0;