summaryrefslogtreecommitdiff
path: root/board/kunimitsu/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/kunimitsu/board.c')
-rw-r--r--board/kunimitsu/board.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/board/kunimitsu/board.c b/board/kunimitsu/board.c
index fc12d3c521..f4dcd3d1d3 100644
--- a/board/kunimitsu/board.c
+++ b/board/kunimitsu/board.c
@@ -379,15 +379,22 @@ static void board_pmic_init(void)
{
int ret;
int data;
+ int error_count = 0;
/* No need to re-init PMIC since settings are sticky across sysjump */
if (system_jumped_to_this_image())
return;
/* Read vendor ID */
- ret = I2C_PMIC_READ(TPS650830_REG_VENDORID, &data);
- if (ret || data != TPS650830_VENDOR_ID)
- goto pmic_error;
+ while (1) {
+ ret = I2C_PMIC_READ(TPS650830_REG_VENDORID, &data);
+ if (!ret && data == TPS650830_VENDOR_ID) {
+ break;
+ } else if (error_count > 5)
+ goto pmic_error;
+
+ error_count++;
+ }
/*
* VCCIOCNT register setting