summaryrefslogtreecommitdiff
path: root/chip/stm32/usb.c
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2014-11-03 15:31:24 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-04 21:34:39 +0000
commit8513e23df17be689c42b6d904d57694fbe2ffd88 (patch)
tree2ca7b8c54d8a4ec0c809eaacfae93dec26d6104d /chip/stm32/usb.c
parentbde06f7697fcbe09d061e1c77515f962ef09452b (diff)
downloadchrome-ec-8513e23df17be689c42b6d904d57694fbe2ffd88.tar.gz
USB: Remove special case for iVersion string descriptor
Previously the version string was special cased in the USB stack because the build system prevented the inclusion of ec_version.h in any file other than common/version.c. This lead to common/version.c being the only place that the USB version string could be computed and thus the special case of filling in the version string descriptor at run time. This made the USB stack more complex, and lead to the common/version.c file including usb.h, which is actually STM32 specific. Now, the portion of ec_version.h that is deterministic is only updated when something in the tree actually changes (by way of a conditional in the makefile), and ec_version.h no longer has to depend on all object files (other than the special version.o). This allows anyone to include ec_version.h as needed. In particular, each board that wants to define a USB version string can directly include ec_version.h and do so. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j touch files and verify rebuilds happen correctly Change-Id: Ic84d0b9da90f82ebb4630fb550ec841071e25a49 Reviewed-on: https://chromium-review.googlesource.com/227211 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'chip/stm32/usb.c')
-rw-r--r--chip/stm32/usb.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c
index 8cb01a002b..18193d4ffa 100644
--- a/chip/stm32/usb.c
+++ b/chip/stm32/usb.c
@@ -125,12 +125,6 @@ static void ep0_rx(void)
if (idx >= USB_STR_COUNT)
/* The string does not exist : STALL */
goto unknown_req;
- if (idx == USB_STR_VERSION) {
- /* use the generated firmware version string */
- desc = usb_fw_version;
- len = desc[0];
- break;
- }
desc = usb_strings[idx];
len = desc[0];
break;