diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-05-23 15:07:03 +0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-06-01 06:21:59 +0000 |
commit | 603a269b8729f522c285015736607444e7daafc4 (patch) | |
tree | 54df7f7243874f19e1b4a0ff8051323f5a77ff36 | |
parent | 3197a6813f1e015db7da32e5fefc3e44e97466fb (diff) | |
download | chrome-ec-603a269b8729f522c285015736607444e7daafc4.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>
Reviewed-on: https://chromium-review.googlesource.com/1080575
-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) { |