summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-05-25 16:54:08 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-05-25 18:58:49 -0700
commit6bbcf5b3f8fac6c6d4f8ea9edef470cf4887f1a7 (patch)
tree383f46d22d6c1230ad49bc2805f3f5d8daac5710
parent95a986ecad7ac67d6f7a8379f71fea7f99f87222 (diff)
downloadchrome-ec-stabilize-9592.15.B.tar.gz
hammer: Prefix configuration descriptor with RO/RW sectionstabilize-9592.15.B
It is useful for the updater to be able to determine which region is active without having to use the update interface. BRANCH=none BUG=b:35587171 TEST=lsusb -d 18d1:5022 -v -v | grep hammer shows either: RO:hammer_v1.1.6441-e58472daf+ or RW:hammer_v1.1.6441-e58472daf+ depending on the image used Change-Id: I8e1acfbc546330e10ba650b743e3a4c9986b0c30 Reviewed-on: https://chromium-review.googlesource.com/515242 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nick Sanders <nsanders@chromium.org>
-rw-r--r--board/hammer/board.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/board/hammer/board.c b/board/hammer/board.c
index 56aefc89e4..a178dbf66a 100644
--- a/board/hammer/board.c
+++ b/board/hammer/board.c
@@ -26,6 +26,12 @@
#include "gpio_list.h"
+#ifdef SECTION_IS_RW
+#define CROS_EC_SECTION "RW"
+#else
+#define CROS_EC_SECTION "RO"
+#endif
+
/******************************************************************************
* Define the strings used in our USB descriptors.
*/
@@ -34,7 +40,8 @@ const void *const usb_strings[] = {
[USB_STR_VENDOR] = USB_STRING_DESC("Google Inc."),
[USB_STR_PRODUCT] = USB_STRING_DESC("Hammer"),
[USB_STR_SERIALNO] = 0,
- [USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32),
+ [USB_STR_VERSION] =
+ USB_STRING_DESC(CROS_EC_SECTION ":" CROS_EC_VERSION32),
[USB_STR_I2C_NAME] = USB_STRING_DESC("I2C"),
[USB_STR_UPDATE_NAME] = USB_STRING_DESC("Firmware update"),
};