diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-05-23 15:07:03 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-24 19:30:16 -0700 |
commit | 3db1b5ffb82d953886389acad765e08356a1678c (patch) | |
tree | 33301673672a9e00c12d1682141786c3dd267343 | |
parent | 89275aff034cc4fb03c14e5ada1674b5d5bcbbd5 (diff) | |
download | chrome-ec-3db1b5ffb82d953886389acad765e08356a1678c.tar.gz |
touchpad_elan: Reload watchdog when programming
When using larger block sizes (e.g. 4096 bytes), the write operations
take too long, which often causes a watchdog reset.
Fix this by reloading the watchdog after programming
every 64 bytes page.
BRANCH=poppy
BUG=b:80167548
TEST=Copy old touchpad FW to soraka, build staff, make sure FW
can be updated.
Change-Id: Ic6e7a3e3ef63877a4f2d5011e1fb0d49c04177a6
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1070952
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | driver/touchpad_elan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c index d8bf402ea4..d876c76fb9 100644 --- a/driver/touchpad_elan.c +++ b/driver/touchpad_elan.c @@ -18,6 +18,7 @@ #include "util.h" #include "usb_api.h" #include "usb_hid_touchpad.h" +#include "watchdog.h" /* Console output macros */ #define CPUTS(outstr) cputs(CC_TOUCHPAD, outstr) @@ -541,6 +542,7 @@ int touchpad_update_write(int offset, int size, const uint8_t *data) if (rv) return rv; CPRINTS("%s: page %d updated.", __func__, addr / FW_PAGE_SIZE); + watchdog_reload(); } if (offset + size == FW_SIZE) { |