| // SPDX-License-Identifier: GPL-2.0+ |
| * (C) Copyright 2016 Rockchip Electronics Co., Ltd |
| #include <asm/arch-rockchip/bootrom.h> |
| static int get_ethaddr_from_eeprom(u8 *addr) |
| ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev); |
| return i2c_eeprom_read(dev, 0, addr, 6); |
| int rk3288_board_late_init(void) |
| if (get_ethaddr_from_eeprom(ethaddr)) |
| if (is_valid_ethaddr(ethaddr)) |
| eth_env_set_enetaddr("ethaddr", ethaddr); |
| int mmc_get_env_dev(void) |
| u32 bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR); |
| if (bootdevice_brom_id == BROM_BOOTSOURCE_EMMC) |