diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-06-02 22:04:54 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-12 20:27:55 -0700 |
commit | aa15b8621d62b8926ca4853cdf9c336f0b892db9 (patch) | |
tree | 26dba45e2f53aad75d9ada9e5a3ee3278a4ee244 /include/system.h | |
parent | 3423baba30cf213a8458ca09c35c73880d3e3fc3 (diff) | |
download | chrome-ec-aa15b8621d62b8926ca4853cdf9c336f0b892db9.tar.gz |
stm32: Add function to fetch unique id
BRANCH=none
BUG=b:62280271
TEST=Flash hammer
lsusb -d 18d1:5022 -v -v | grep iSerial
shows different chip IDs on different boards.
Change-Id: Id56b4509f184eb722d04fef94079c150dc2016e2
Reviewed-on: https://chromium-review.googlesource.com/523044
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r-- | include/system.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h index 26a57d9d61..c7304a4d92 100644 --- a/include/system.h +++ b/include/system.h @@ -276,6 +276,15 @@ const char *system_get_chip_vendor(void); const char *system_get_chip_name(void); const char *system_get_chip_revision(void); +/** + * Get a unique per-chip id. + * + * @param id Set to the address of the unique id data (statically + * allocated, or register-backed). + * @return Number of bytes available at the provided address. + */ +int system_get_chip_unique_id(uint8_t **id); + /* * Common bbram entries. Chips don't necessarily need to implement * all of these, error will be returned from system_get/set_bbram if |