summaryrefslogtreecommitdiff
path: root/common/version.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 /common/version.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 'common/version.c')
-rw-r--r--common/version.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/common/version.c b/common/version.c
index a80d843580..b6cc8e1d8b 100644
--- a/common/version.c
+++ b/common/version.c
@@ -7,8 +7,8 @@
#include <stdint.h>
#include "common.h"
+#include "ec_date.h"
#include "ec_version.h"
-#include "usb.h"
#include "version.h"
const struct version_struct version_data
@@ -21,11 +21,6 @@ const struct version_struct version_data
const char build_info[] __attribute__((section(".rodata.buildinfo"))) =
CROS_EC_VERSION " " DATE " " BUILDER;
-#ifdef CONFIG_USB
-/* UTF-16 encoded USB string descriptor */
-const void * const usb_fw_version = USB_STRING_DESC(CROS_EC_VERSION32);
-#endif
-
uint32_t ver_get_numcommits(void)
{
int i;