diff options
author | Tom Rini <trini@konsulko.com> | 2020-03-31 17:04:39 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-03-31 17:04:39 +0300 |
commit | 962bb2e31bc8d7e4d3885c22b75bdf258c1b6b8a (patch) | |
tree | b8103067295825530b876c451d3bed51eea066ad /board | |
parent | 93330d4ce416208fe202e304e5a18166c57ac569 (diff) | |
parent | 264398b2ec5dd5ee045939e11e14caeece4c8dde (diff) | |
download | u-boot-962bb2e31bc8d7e4d3885c22b75bdf258c1b6b8a.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-sh
- Fixes for Gen 2 V2H Blanche
Diffstat (limited to 'board')
-rw-r--r-- | board/renesas/blanche/blanche.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c index 7232370d6f..c15387366c 100644 --- a/board/renesas/blanche/blanche.c +++ b/board/renesas/blanche/blanche.c @@ -20,6 +20,7 @@ #include <dm.h> #include <dm/platform_data/serial_sh.h> #include <env.h> +#include <hang.h> #include <i2c.h> #include <linux/errno.h> #include <malloc.h> @@ -313,6 +314,7 @@ int board_init(void) } /* Added for BLANCHE(R-CarV2H board) */ +#ifndef CONFIG_DM_ETH int board_eth_init(bd_t *bis) { int rc = 0; @@ -337,6 +339,7 @@ int board_eth_init(bd_t *bis) return rc; } +#endif int dram_init(void) { @@ -355,4 +358,23 @@ int dram_init_banksize(void) void reset_cpu(ulong addr) { + struct udevice *dev; + const u8 pmic_bus = 6; + const u8 pmic_addr = 0x58; + u8 data; + int ret; + + ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev); + if (ret) + hang(); + + ret = dm_i2c_read(dev, 0x13, &data, 1); + if (ret) + hang(); + + data |= BIT(1); + + ret = dm_i2c_write(dev, 0x13, &data, 1); + if (ret) + hang(); } |