diff options
Diffstat (limited to 'driver/ppc/sn5s330.c')
-rw-r--r-- | driver/ppc/sn5s330.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) */ |