diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-11 11:26:48 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-11 11:26:48 -0400 |
commit | db76ec084de14238a43d822feaec802c181e342f (patch) | |
tree | 7867c3ea1c5556502462b1adf19a824d68f69f9b /drivers/core/read.c | |
parent | 67bbc1ecd311c78b06e845a3fd4e333806782367 (diff) | |
parent | f7553b0e808f38d6303445661db062b74e865de9 (diff) | |
download | u-boot-WIP/11Apr2020-next.tar.gz |
Merge tag 'dm-next-pull-10apr20' of git://git.denx.de/u-boot-dm into nextWIP/11Apr2020-next
Functions for reading indexed values from device tree
Enhancements to 'dm' command
Log test enhancements and syslog driver
DM change to read parent ofdata before children
Minor fixes
Diffstat (limited to 'drivers/core/read.c')
-rw-r--r-- | drivers/core/read.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/core/read.c b/drivers/core/read.c index 1f999b1b31..ce78f09d28 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -22,6 +22,19 @@ int dev_read_u32_default(const struct udevice *dev, const char *propname, return ofnode_read_u32_default(dev_ofnode(dev), propname, def); } +int dev_read_u32_index(struct udevice *dev, const char *propname, int index, + u32 *outp) +{ + return ofnode_read_u32_index(dev_ofnode(dev), propname, index, outp); +} + +u32 dev_read_u32_index_default(struct udevice *dev, const char *propname, + int index, u32 def) +{ + return ofnode_read_u32_index_default(dev_ofnode(dev), propname, index, + def); +} + int dev_read_s32(const struct udevice *dev, const char *propname, s32 *outp) { return ofnode_read_u32(dev_ofnode(dev), propname, (u32 *)outp); |