aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-01 09:47:30 -0400
committerTom Rini <trini@konsulko.com>2020-04-01 09:47:30 -0400
commite88c9e6ff15144f64f031f6a7b9323a096ab5a4d (patch)
tree12ecfe575ea56f5827d92b555157b1e893e6336e /board
parent7dbafe06348ebf28044ef9769bf24866a3deedea (diff)
parent2f3c4b8a0f303edbea9fc112a49e546cf03776b0 (diff)
downloadu-boot-e88c9e6ff15144f64f031f6a7b9323a096ab5a4d.zip
u-boot-e88c9e6ff15144f64f031f6a7b9323a096ab5a4d.tar.gz
u-boot-e88c9e6ff15144f64f031f6a7b9323a096ab5a4d.tar.bz2
Merge tag 'u-boot-stm32-20200401' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- Fix device tree of Avenger96 board from Arrow Electronics and add compatibility with stm32mp15_dhcom_basic_defconfig
Diffstat (limited to 'board')
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index b663696..7bcd713 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -78,22 +78,21 @@ DECLARE_GLOBAL_DATA_PTR;
int setup_mac_address(void)
{
- struct udevice *dev;
- ofnode eeprom;
unsigned char enetaddr[6];
- int ret;
+ struct udevice *dev;
+ int off, ret;
ret = eth_env_get_enetaddr("ethaddr", enetaddr);
if (ret) /* ethaddr is already set */
return 0;
- eeprom = ofnode_path("/soc/i2c@5c002000/eeprom@50");
- if (!ofnode_valid(eeprom)) {
- printf("Invalid hardware path to EEPROM!\n");
- return -ENODEV;
+ off = fdt_path_offset(gd->fdt_blob, "eeprom0");
+ if (off < 0) {
+ printf("%s: No eeprom0 path offset\n", __func__);
+ return off;
}
- ret = uclass_get_device_by_ofnode(UCLASS_I2C_EEPROM, eeprom, &dev);
+ ret = uclass_get_device_by_of_offset(UCLASS_I2C_EEPROM, off, &dev);
if (ret) {
printf("Cannot find EEPROM!\n");
return ret;