From 0e59958dc02e4b119e567d5fdbbfcddf161cc028 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 30 Dec 2019 11:46:21 -0700 Subject: [PATCH] Increase timeouts --- src/board/system76/galp3-c/kbc.c | 2 +- src/board/system76/galp3-c/pmc.c | 2 +- src/ec/it8587e/i2c.c | 2 +- src/ec/it8587e/ps2.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/board/system76/galp3-c/kbc.c b/src/board/system76/galp3-c/kbc.c index 26a2cbc..a76b80b 100644 --- a/src/board/system76/galp3-c/kbc.c +++ b/src/board/system76/galp3-c/kbc.c @@ -10,7 +10,7 @@ void kbc_init(void) { *(KBC.control) = 0; } -#define KBC_TIMEOUT 1000 +#define KBC_TIMEOUT 10000 // System flag static bool kbc_system = false; diff --git a/src/board/system76/galp3-c/pmc.c b/src/board/system76/galp3-c/pmc.c index b6497fc..5e8c4b7 100644 --- a/src/board/system76/galp3-c/pmc.c +++ b/src/board/system76/galp3-c/pmc.c @@ -9,7 +9,7 @@ void pmc_init(void) { *(PMC_2.control) = 0x41; } -#define PMC_TIMEOUT 1000 +#define PMC_TIMEOUT 10000 enum PmcState { PMC_STATE_DEFAULT, diff --git a/src/ec/it8587e/i2c.c b/src/ec/it8587e/i2c.c index f072b0b..ae08476 100644 --- a/src/ec/it8587e/i2c.c +++ b/src/ec/it8587e/i2c.c @@ -4,7 +4,7 @@ #include //TODO: find best value -#define I2C_TIMEOUT 1000 +#define I2C_TIMEOUT 10000 void i2c_reset(bool kill) { if (HOSTAA & HOSTA_BUSY) { diff --git a/src/ec/it8587e/ps2.c b/src/ec/it8587e/ps2.c index 538e581..d9d7465 100644 --- a/src/ec/it8587e/ps2.c +++ b/src/ec/it8587e/ps2.c @@ -9,7 +9,7 @@ .data = &PSDAT ## NUM, \ } -#define TIMEOUT 1000 +#define PS2_TIMEOUT 10000 #define PSSTS_TIMEOUT_ERR (1 << 6) #define PSSTS_FRAME_ERR (1 << 5) @@ -45,7 +45,7 @@ static int ps2_transaction(struct Ps2 * ps2, uint8_t * data, int length, bool re } uint32_t timeout; - for (timeout = TIMEOUT; timeout > 0; timeout--) { + for (timeout = PS2_TIMEOUT; timeout > 0; timeout--) { uint8_t status = *(ps2->status); // If an error happened, clear status and return the error if (status & PSSTS_ALL_ERR) {