summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/cr50/board.c13
-rw-r--r--board/cr50/board.h1
-rw-r--r--board/cr50/u2f.c2
-rw-r--r--chip/g/uart.c4
-rw-r--r--common/flash.c2
-rw-r--r--common/tpm_registers.c2
6 files changed, 6 insertions, 18 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 5db1e70cf4..09a43901a4 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -639,17 +639,6 @@ static void configure_board_specific_gpios(void)
closed_source_set1_configure_gpios();
}
-void decrement_retry_counter(void)
-{
- uint32_t counter = GREG32(PMU, LONG_LIFE_SCRATCH0);
-
- if (counter) {
- GWRITE_FIELD(PMU, LONG_LIFE_SCRATCH_WR_EN, REG0, 1);
- GREG32(PMU, LONG_LIFE_SCRATCH0) = counter - 1;
- GWRITE_FIELD(PMU, LONG_LIFE_SCRATCH_WR_EN, REG0, 0);
- }
-}
-
static uint8_t mismatched_board_id;
int board_id_is_mismatched(void)
@@ -718,7 +707,7 @@ static void board_init(void)
* the rolling reboot count.
*/
if (system_get_reset_flags() & RESET_FLAG_HIBERNATE)
- decrement_retry_counter();
+ system_decrement_retry_counter();
configure_board_specific_gpios();
init_pmu();
reset_wake_logic();
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 2fa9bf3f47..2e75645138 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -250,7 +250,6 @@ enum nvmem_vars {
void board_configure_deep_sleep_wakepins(void);
void ap_detect_asserted(enum gpio_signal signal);
void ec_detect_asserted(enum gpio_signal signal);
-void ec_tx_cr50_rx(enum gpio_signal signal);
void servo_detect_asserted(enum gpio_signal signal);
void tpm_rst_deasserted(enum gpio_signal signal);
void tpm_rst_asserted(enum gpio_signal signal);
diff --git a/board/cr50/u2f.c b/board/cr50/u2f.c
index d9cc8c7989..a858edfa58 100644
--- a/board/cr50/u2f.c
+++ b/board/cr50/u2f.c
@@ -321,7 +321,7 @@ int u2f_gen_kek_seed(int commit)
/* ---- Send/receive U2F APDU over TPM vendor commands ---- */
-enum vendor_cmd_rc vc_u2f_apdu(enum vendor_cmd_cc code, void *body,
+static enum vendor_cmd_rc vc_u2f_apdu(enum vendor_cmd_cc code, void *body,
size_t cmd_size, size_t *response_size)
{
unsigned retlen;
diff --git a/chip/g/uart.c b/chip/g/uart.c
index e2cd2193b8..1048c4c836 100644
--- a/chip/g/uart.c
+++ b/chip/g/uart.c
@@ -74,7 +74,7 @@ int uart_read_char(void)
/**
* Interrupt handlers for UART0
*/
-void uart_ec_tx_interrupt(void)
+static void uart_ec_tx_interrupt(void)
{
/* Clear transmit interrupt status */
GR_UART_ISTATECLR(UARTN) = GC_UART_ISTATECLR_TX_MASK;
@@ -84,7 +84,7 @@ void uart_ec_tx_interrupt(void)
}
DECLARE_IRQ(GC_IRQNUM_UART0_TXINT, uart_ec_tx_interrupt, 1);
-void uart_ec_rx_interrupt(void)
+static void uart_ec_rx_interrupt(void)
{
/* Clear receive interrupt status */
GR_UART_ISTATECLR(UARTN) = GC_UART_ISTATECLR_RX_MASK;
diff --git a/common/flash.c b/common/flash.c
index 2eb5f265aa..fa5afa2072 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -157,7 +157,7 @@ int flash_bank_count(int offset, int size)
}
#endif /* CONFIG_FLASH_MULTIPLE_REGION */
-int flash_range_ok(int offset, int size_req, int align)
+static int flash_range_ok(int offset, int size_req, int align)
{
if (offset < 0 || size_req < 0 ||
offset > CONFIG_FLASH_SIZE ||
diff --git a/common/tpm_registers.c b/common/tpm_registers.c
index 8a7a4c5360..142261ecf3 100644
--- a/common/tpm_registers.c
+++ b/common/tpm_registers.c
@@ -448,7 +448,7 @@ void tpm_register_put(uint32_t regaddr, const uint8_t *data, uint32_t data_size)
}
-void fifo_reg_read(uint8_t *dest, uint32_t data_size)
+static void fifo_reg_read(uint8_t *dest, uint32_t data_size)
{
uint32_t still_in_fifo = tpm_.fifo_write_index -
tpm_.fifo_read_index;