summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-27 18:49:43 +0300
committerSimon Glass <sjg@chromium.org>2020-02-06 05:33:45 +0300
commit14ca9f7f5abf7b94d71cfd466fb339bf64f58bda (patch)
tree83895f7de742e7fd0c77cfa0374086f13cd1abda /board
parent74d594a20e035a2dfce232093774c50d986cb9ff (diff)
downloadu-boot-14ca9f7f5abf7b94d71cfd466fb339bf64f58bda.tar.xz
dm: core: Rename ofnode_get_chosen_prop()
This function is actually intended to read a string rather than a property. All of its current callers use it that way. Also there is no way to return the length of the property from this function. Rename it to better indicate its purpose, using ofnode_read as the prefix since this matches most other functions. Also add some tests which are missing for these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/theobroma-systems/puma_rk3399/puma-rk3399.c2
-rw-r--r--board/xilinx/common/board.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 9887d20207..7ff4766947 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -49,7 +49,7 @@ static void setup_iodomain(void)
static int setup_boottargets(void)
{
const char *boot_device =
- ofnode_get_chosen_prop("u-boot,spl-boot-device");
+ ofnode_read_chosen_string("u-boot,spl-boot-device");
char *env_default, *env;
if (!boot_device) {
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index ae5fe2729f..f87e2e9105 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -22,7 +22,7 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
return -ENODEV;
debug("%s: Path to EEPROM %s\n", __func__,
- ofnode_get_chosen_prop("xlnx,eeprom"));
+ ofnode_read_chosen_string("xlnx,eeprom"));
ret = uclass_get_device_by_ofnode(UCLASS_I2C_EEPROM, eeprom, &dev);
if (ret)