diff options
Diffstat (limited to 'board/freescale/mx53_loco/mx53_loco.c')
-rw-r--r-- | board/freescale/mx53_loco/mx53_loco.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/board/freescale/mx53_loco/mx53_loco.c b/board/freescale/mx53_loco/mx53_loco.c index 5a5e820..c88412e 100644 --- a/board/freescale/mx53_loco/mx53_loco.c +++ b/board/freescale/mx53_loco/mx53_loco.c @@ -704,8 +704,9 @@ int check_recovery_cmd_file(void) int board_late_init(void) { - int value; + uchar value; unsigned char buf[4] = { 0 }; + int retries = 10, ret = -1; if (!i2c_probe(0x8)) { if (i2c_read(0x8, 24, 1, &buf[0], 3)) { @@ -735,7 +736,14 @@ int board_late_init(void) } else if (!i2c_probe(0x48)) { /* increase VDDGP as 1.25V for 1GHZ */ value = 0x5e; - i2c_write(0x48, 0x2e, 1, &value, 1); + do { + if (0 != i2c_write(0x48, 0x2e, 1, &value, 1)) { + printf("da9052_i2c_is_connected - i2c write failed.....\n"); + } else { + printf("da9052_i2c_is_connected - i2c write success....\n"); + ret = 0; + } + } while (ret != 0 && retries--); i2c_read(0x48, 60, 1, &value, 1); value |= 0x1; i2c_write(0x48, 60, 1, &value, 1); |