aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorTom Rini2021-07-29 08:20:06 -0400
committerTom Rini2021-07-29 08:20:06 -0400
commit38436abd5e58044eccddbcd7ec3610a9104e86b6 (patch)
tree328cb2b1b355964ab196f3d5ba4bb7134d74d8a3 /drivers/core
parentbbcacdf4cd23f2e5deb9ef916096c956c955243d (diff)
parenta6c64d255e5117bcf78aec6911d7c034fbfe46f7 (diff)
Merge tag 'ti-v2021.10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-ti
- Add MMC High speed modes for AM64 and J7200 - Add Sierra/Torrent SERDES driver - Minor clean-ups for R5F boot from SPL
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/ofnode.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index dda6c76e834..701b23e2c91 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -18,6 +18,19 @@
#include <linux/ioport.h>
#include <asm/global_data.h>
+bool ofnode_name_eq(ofnode node, const char *name)
+{
+ const char *node_name;
+ size_t len;
+
+ assert(ofnode_valid(node));
+
+ node_name = ofnode_get_name(node);
+ len = strchrnul(node_name, '@') - node_name;
+
+ return (strlen(name) == len) && !strncmp(node_name, name, len);
+}
+
int ofnode_read_u32(ofnode node, const char *propname, u32 *outp)
{
return ofnode_read_u32_index(node, propname, 0, outp);