summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-23 16:01:18 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-06-01 06:22:01 +0000
commit4c6ea86a20b4cab1541d19708fbb97c82504b156 (patch)
treed1f621c31c7d37bf51edb18698f3918c01a9dc09
parent164537c795275024e34ff27bfc75578b8faebb31 (diff)
downloadchrome-ec-4c6ea86a20b4cab1541d19708fbb97c82504b156.tar.gz
hammer: Increase PDU size to 4k
Saves another ~1300 bytes of flash size, as the touchpad hashes can now be computed in blocks of 4K, instead of 1K. This costs 3K of SRAM, which we would not otherwise need on hammer. wand can only fit 2k PDU, so let's stick to that. Also, make sure that util/gen_touchpad_fw is regenerated when the configuration option changes (touchpad FW size, PDU size). Sadly, this will still break bisection from commit after this CL, to before this CL. BRANCH=poppy BUG=b:80167548 TEST=make buildall -j TEST=make BOARD=hammer/staff/wand/whiskers all tests -j TEST=Copy new staff image with old touchpad FW to DUT, verify that FW can be updated. Change-Id: Ic1763684da730dc986bbbcb3312088c8208c84b5 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1070953 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1080577
-rw-r--r--board/hammer/board.h8
-rw-r--r--util/build.mk2
2 files changed, 10 insertions, 0 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h
index 753602d08c..d6b35db695 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -97,6 +97,14 @@
#define CONFIG_STREAM_USB
#define CONFIG_USB_UPDATE
+#undef CONFIG_UPDATE_PDU_SIZE
+#ifdef BOARD_WAND
+/* Wand does not have enough space to fit 4k PDU. */
+#define CONFIG_UPDATE_PDU_SIZE 2048
+#else
+#define CONFIG_UPDATE_PDU_SIZE 4096
+#endif
+
#undef CONFIG_USB_MAXPOWER_MA
#define CONFIG_USB_MAXPOWER_MA 100
diff --git a/util/build.mk b/util/build.mk
index 10a97b17f5..f7f71c1087 100644
--- a/util/build.mk
+++ b/util/build.mk
@@ -57,6 +57,8 @@ OPENSSL_LDFLAGS := $(shell $(PKG_CONFIG) --libs openssl)
$(out)/util/gen_touchpad_hash: BUILD_CFLAGS += $(OPENSSL_CFLAGS)
$(out)/util/gen_touchpad_hash: BUILD_LDFLAGS += $(OPENSSL_LDFLAGS)
+
+deps-y += $(out)/util/gen_touchpad_hash.d
endif # CONFIG_TOUCHPAD_VIRTUAL_OFF
cbi-util-objs=../common/crc8.o ../common/cbi.o