summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/ppc/nx20p3483.c3
-rw-r--r--driver/ppc/sn5s330.c14
2 files changed, 17 insertions, 0 deletions
diff --git a/driver/ppc/nx20p3483.c b/driver/ppc/nx20p3483.c
index 340418b632..e5d0055140 100644
--- a/driver/ppc/nx20p3483.c
+++ b/driver/ppc/nx20p3483.c
@@ -364,6 +364,9 @@ static int nx20p3483_dump(int port)
return rv;
}
ccprintf("[0x%02x]: 0x%02x\n", reg_addr, reg);
+
+ /* Flush every call otherwise buffer may get full */
+ cflush();
}
return EC_SUCCESS;
diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c
index 37c559ce67..4971ab798e 100644
--- a/driver/ppc/sn5s330.c
+++ b/driver/ppc/sn5s330.c
@@ -51,6 +51,8 @@ static int sn5s330_dump(int port)
const int i2c_port = ppc_chips[port].i2c_port;
const int i2c_addr = ppc_chips[port].i2c_addr;
+ /* Flush after every set otherwise console buffer may get full. */
+
for (i = SN5S330_FUNC_SET1; i <= SN5S330_FUNC_SET12; i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
ccprintf("FUNC_SET%d [%02Xh] = 0x%02x\n",
@@ -59,6 +61,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
for (i = SN5S330_INT_STATUS_REG1; i <= SN5S330_INT_STATUS_REG4; i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
ccprintf("INT_STATUS_REG%d [%02Xh] = 0x%02x\n",
@@ -67,6 +71,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
for (i = SN5S330_INT_TRIP_RISE_REG1; i <= SN5S330_INT_TRIP_RISE_REG3;
i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
@@ -76,6 +82,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
for (i = SN5S330_INT_TRIP_FALL_REG1; i <= SN5S330_INT_TRIP_FALL_REG3;
i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
@@ -85,6 +93,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
for (i = SN5S330_INT_MASK_RISE_REG1; i <= SN5S330_INT_MASK_RISE_REG3;
i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
@@ -94,6 +104,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
for (i = SN5S330_INT_MASK_FALL_REG1; i <= SN5S330_INT_MASK_FALL_REG3;
i++) {
i2c_read8(i2c_port, i2c_addr, i, &data);
@@ -103,6 +115,8 @@ static int sn5s330_dump(int port)
data);
}
+ cflush();
+
return EC_SUCCESS;
}
#endif /* defined(CONFIG_CMD_PPC_DUMP) */