summaryrefslogtreecommitdiff
path: root/include/cros_board_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cros_board_info.h')
-rw-r--r--include/cros_board_info.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/cros_board_info.h b/include/cros_board_info.h
index 9ed5e1777b..992192e910 100644
--- a/include/cros_board_info.h
+++ b/include/cros_board_info.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -10,21 +10,22 @@
#include "common.h"
#include "ec_commands.h"
-#define CBI_VERSION_MAJOR 0
-#define CBI_VERSION_MINOR 0
+#define CBI_VERSION_MAJOR 0
+#define CBI_VERSION_MINOR 0
#ifdef CONFIG_CBI_GPIO
/*
* if CBI is sourced from GPIO, the CBI cache only needs to accomondate
* BOARD_VERSION and SKU_ID
*/
-#define CBI_IMAGE_SIZE (sizeof(struct cbi_header) + (2 * \
- (sizeof(struct cbi_data) + sizeof(uint32_t))))
+#define CBI_IMAGE_SIZE \
+ (sizeof(struct cbi_header) + \
+ (2 * (sizeof(struct cbi_data) + sizeof(uint32_t))))
#else
-#define CBI_IMAGE_SIZE 256
+#define CBI_IMAGE_SIZE 256
#endif
-static const uint8_t cbi_magic[] = { 0x43, 0x42, 0x49 }; /* 'C' 'B' 'I' */
+static const uint8_t cbi_magic[] = { 0x43, 0x42, 0x49 }; /* 'C' 'B' 'I' */
struct cbi_header {
uint8_t magic[3];
@@ -47,9 +48,9 @@ struct cbi_header {
} __attribute__((packed));
struct cbi_data {
- uint8_t tag; /* enum cbi_data_tag */
- uint8_t size; /* size of value[] */
- uint8_t value[]; /* data value */
+ uint8_t tag; /* enum cbi_data_tag */
+ uint8_t size; /* size of value[] */
+ uint8_t value[]; /* data value */
} __attribute__((packed));
enum cbi_cache_status {
@@ -98,6 +99,7 @@ int cbi_get_fw_config(uint32_t *fw_config);
int cbi_get_pcb_supplier(uint32_t *pcb_supplier);
int cbi_get_ssfc(uint32_t *ssfc);
int cbi_get_rework_id(uint64_t *id);
+int cbi_get_factory_calibration_data(uint32_t *calibration_data);
/**
* Get data from CBI store
@@ -143,8 +145,8 @@ uint8_t cbi_crc8(const struct cbi_header *h);
* @return Address of the byte following the stored data in the
* destination buffer
*/
-uint8_t *cbi_set_data(uint8_t *p, enum cbi_data_tag tag,
- const void *buf, int size);
+uint8_t *cbi_set_data(uint8_t *p, enum cbi_data_tag tag, const void *buf,
+ int size);
/**
* Store string data in memory in CBI data format.