mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
cleanup: Move chip/g-specific system() prototypes to system_chip.h
BUG=chromium:693148 BRANCH=None TEST=`make buildall -j` Change-Id: I7a758e6b5a04721d0422cfe8b767d85abddb1ad2 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/444264 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
bb184acdcc
commit
2062c99cd2
@@ -26,6 +26,7 @@
|
||||
#include "signed_header.h"
|
||||
#include "spi.h"
|
||||
#include "system.h"
|
||||
#include "system_chip.h"
|
||||
#include "task.h"
|
||||
#include "tpm_registers.h"
|
||||
#include "trng.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "registers.h"
|
||||
#include "scratch_reg1.h"
|
||||
#include "system.h"
|
||||
#include "system_chip.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "tpm_registers.h"
|
||||
|
||||
47
chip/g/system_chip.h
Normal file
47
chip/g/system_chip.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
/* chip/g-specific system function prototypes */
|
||||
|
||||
#ifndef __CROS_EC_SYSTEM_CHIP_H
|
||||
#define __CROS_EC_SYSTEM_CHIP_H
|
||||
|
||||
/**
|
||||
* On systems with protection from a failing RW update: read the retry counter
|
||||
* and act on it.
|
||||
*
|
||||
* @return EC_SUCCESS if no flash write errors were encounterd.
|
||||
*/
|
||||
int system_process_retry_counter(void);
|
||||
|
||||
/**
|
||||
* On systems with protection from a failing RW update: reset retry
|
||||
* counter, this is used after a new image upload is finished, to make
|
||||
* sure that the new image has a chance to run.
|
||||
*/
|
||||
void system_clear_retry_counter(void);
|
||||
|
||||
/**
|
||||
* A function provided by some platforms to hint that something is going
|
||||
* wrong.
|
||||
*
|
||||
* @return a boolean, set to True if rolling reboot condition is suspected.
|
||||
*/
|
||||
int system_rolling_reboot_suspected(void);
|
||||
|
||||
/**
|
||||
* Compare the rw headers to check if there was a rollback.
|
||||
*
|
||||
* @return a boolean, set to True if a rollback is detected.
|
||||
*/
|
||||
int system_rollback_detected(void);
|
||||
|
||||
/**
|
||||
* Returns non-zero value when firmware is expected to be abe to detect user
|
||||
* request to cut off battery supply.
|
||||
*/
|
||||
int system_battery_cutoff_support_required(void);
|
||||
|
||||
#endif /* __CROS_EC_SYSTEM_CHIP_H */
|
||||
@@ -4,13 +4,14 @@
|
||||
*/
|
||||
|
||||
#include "byteorder.h"
|
||||
#include "compile_time_macros.h"
|
||||
#include "console.h"
|
||||
#include "dcrypto/dcrypto.h"
|
||||
#include "extension.h"
|
||||
#include "flash.h"
|
||||
#include "hooks.h"
|
||||
#include "include/compile_time_macros.h"
|
||||
#include "system.h"
|
||||
#include "system_chip.h"
|
||||
#include "registers.h"
|
||||
#include "uart.h"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "printf.h"
|
||||
#include "signed_header.h"
|
||||
#include "system.h"
|
||||
#include "system_chip.h"
|
||||
#include "task.h"
|
||||
#include "tpm_manufacture.h"
|
||||
#include "tpm_registers.h"
|
||||
|
||||
@@ -476,40 +476,4 @@ uintptr_t system_get_fw_reset_vector(uintptr_t base);
|
||||
*/
|
||||
int system_is_reboot_warm(void);
|
||||
|
||||
/**
|
||||
* On systems with protection from a failing RW update: read the retry counter
|
||||
* and act on it.
|
||||
*
|
||||
* @return EC_SUCCESS if no flash write errors were encounterd.
|
||||
*/
|
||||
int system_process_retry_counter(void);
|
||||
|
||||
/**
|
||||
* On systems with protection from a failing RW update: reset retry
|
||||
* counter, this is used after a new image upload is finished, to make
|
||||
* sure that the new image has a chance to run.
|
||||
*/
|
||||
void system_clear_retry_counter(void);
|
||||
|
||||
/**
|
||||
* A function provided by some platforms to hint that something is going
|
||||
* wrong.
|
||||
*
|
||||
* @return a boolean, set to True if rolling reboot condition is suspected.
|
||||
*/
|
||||
int system_rolling_reboot_suspected(void);
|
||||
|
||||
/**
|
||||
* Compare the rw headers to check if there was a rollback.
|
||||
*
|
||||
* @return a boolean, set to True if a rollback is detected.
|
||||
*/
|
||||
int system_rollback_detected(void);
|
||||
|
||||
/**
|
||||
* Returns non-zero value when firmware is expected to be abe to detect user
|
||||
* request to cut off battery supply.
|
||||
*/
|
||||
int system_battery_cutoff_support_required(void);
|
||||
|
||||
#endif /* __CROS_EC_SYSTEM_H */
|
||||
|
||||
Reference in New Issue
Block a user