diff options
author | Samin Guo <samin.guo@starfivetech.com> | 2023-07-20 09:55:17 +0300 |
---|---|---|
committer | Samin Guo <samin.guo@starfivetech.com> | 2023-07-20 09:56:21 +0300 |
commit | 1994d19b79d10e8f1a7148ddca4f054ef2383631 (patch) | |
tree | 2f86e64c83afb24e3d8d1366567b4da5e77dd9c2 /board | |
parent | 0779dddc23560f08bae1dc15b04d9d79803e0d1a (diff) | |
download | u-boot-1994d19b79d10e8f1a7148ddca4f054ef2383631.tar.xz |
board: starfive: vf2: Modify arch/riscv/cpu/jh7110/spl.c
For integration with other Borad, move I2C to a board-level file
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/starfive/visionfive2/starfive_visionfive2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index 5349d1f276..1d14c618dc 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -512,11 +512,19 @@ static bool check_eeprom_dram_info(ulong size) static int resize_ddr_from_eeprom(void) { + struct udevice *dev; ulong size; u32 len = 1; u8 data = 0; int ret; + /* I2C init */ + ret = uclass_get_device(UCLASS_I2C, 0, &dev); + if (ret) { + debug("I2C init failed: %d\n", ret); + return 0; + } + /* read memory size info */ ret = get_data_from_eeprom(STARFIVE_JH7110_EEPROM_DDRINFO_OFFSET, len, &data); if (ret == len) { |