diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-11-09 19:55:28 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-23 01:10:56 +0000 |
commit | 17639089434540ec760f92d4b017fd73d73b2b2a (patch) | |
tree | 6435dba5a08d449c31b6fb0c744f5b32833b840a /include | |
parent | 58d3d308a60f9221f5303c0b6fd5bad3112d67cf (diff) | |
download | chrome-ec-17639089434540ec760f92d4b017fd73d73b2b2a.tar.gz |
Revert "Add OTP support"
This reverts commit 1b25735b732e7766aceb3f060e4ca205aba6d358.
BUG=b:200823466
TEST=make buildall -j
Change-Id: I2e29902d7026c63f23871af0141a3ee7d319852d
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273456
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
(cherry picked from commit b92073532056f5c11d2369177ac0cc9b22b38295)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296978
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 10 | ||||
-rw-r--r-- | include/flash.h | 7 | ||||
-rw-r--r-- | include/otp.h | 32 | ||||
-rw-r--r-- | include/system.h | 7 | ||||
-rw-r--r-- | include/usb_descriptor.h | 3 |
5 files changed, 6 insertions, 53 deletions
diff --git a/include/config.h b/include/config.h index 98331cb453..128c0dc88b 100644 --- a/include/config.h +++ b/include/config.h @@ -2658,9 +2658,6 @@ /* Support one-wire interface */ #undef CONFIG_ONEWIRE -/* Support One Time Protection structure */ -#undef CONFIG_OTP - /* Support PECI interface to x86 processor */ #undef CONFIG_PECI @@ -2924,9 +2921,6 @@ #undef CONFIG_RW_SIG_ADDR #undef CONFIG_RW_SIG_SIZE -/* Size of the serial number if needed */ -#undef CONFIG_SERIALNO_LEN - /****************************************************************************/ /* Shared objects library. */ @@ -4603,10 +4597,6 @@ #error "CONFIG_AUX_TIMER_PERIOD_MS must be at least 2x HOOK_TICK_INTERVAL_MS" #endif -#ifdef CONFIG_USB_SERIALNO -#define CONFIG_SERIALNO_LEN 28 -#endif - #ifndef CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ #define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ \ CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ diff --git a/include/flash.h b/include/flash.h index e2c572d38f..0566c5914a 100644 --- a/include/flash.h +++ b/include/flash.h @@ -320,18 +320,17 @@ int flash_set_protect(uint32_t mask, uint32_t flags); * Get the serial number from flash. * * @return char * ascii serial number string. - * NULL if error. */ -const char *flash_read_pstate_serial(void); +const char *flash_read_serial(void); /** * Set the serial number in flash. * - * @param serialno ascii serial number string. + * @param serialno ascii serial number string < 30 char. * * @return success status. */ -int flash_write_pstate_serial(const char *serialno); +int flash_write_serial(const char *serialno); /** * Lock or unlock HW necessary for mapped storage read. diff --git a/include/otp.h b/include/otp.h deleted file mode 100644 index 7851411202..0000000000 --- a/include/otp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2017 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* OTP memory module for Chrome EC */ - -#ifndef __CROS_EC_OTP_H -#define __CROS_EC_OTP_H - -/* - * OTP: One Time Programable memory is used for storing persistent data. - */ - -/** - * Set the serial number in OTP memory. - * - * @param serialno ascii serial number string. - * - * @return success status. - */ -int otp_write_serial(const char *serialno); - -/** - * Get the serial number from flash. - * - * @return char * ascii serial number string. - * NULL if error. - */ -const char *otp_read_serial(void); - -#endif /* __CROS_EC_OTP_H */ diff --git a/include/system.h b/include/system.h index 98b580e19a..bf9e19130a 100644 --- a/include/system.h +++ b/include/system.h @@ -270,15 +270,10 @@ int system_get_chip_unique_id(uint8_t **id); /** * Optional board-level callback functions to read a unique serial number per - * chip. Default implementation reads from flash/otp (flash/otp_read_serial). + * chip. Default implementation reads from flash (flash_read_serial). */ const char *board_read_serial(void) __attribute__((weak)); -/** - * Optional board-level callback functions to write a unique serial number per - * chip. Default implementation reads from flash/otp (flash/otp_write_serial). - */ -int board_write_serial(const char *serial) __attribute__((weak)); /* * Common bbram entries. Chips don't necessarily need to implement * all of these, error will be returned from system_get/set_bbram if diff --git a/include/usb_descriptor.h b/include/usb_descriptor.h index 153c648085..06dfdbc0ed 100644 --- a/include/usb_descriptor.h +++ b/include/usb_descriptor.h @@ -312,10 +312,11 @@ struct usb_setup_packet { #ifdef CONFIG_USB_SERIALNO /* String Descriptor for USB, for editable strings. */ +#define USB_STRING_LEN 28 struct usb_string_desc { uint8_t _len; uint8_t _type; - wchar_t _data[CONFIG_SERIALNO_LEN]; + wchar_t _data[USB_STRING_LEN]; }; #define USB_WR_STRING_DESC(str) \ (&(struct usb_string_desc) { \ |