diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/chipset.h | 21 | ||||
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/config.h | 3 |
3 files changed, 26 insertions, 0 deletions
diff --git a/include/chipset.h b/include/chipset.h index 9b30b7f454..7b684598cb 100644 --- a/include/chipset.h +++ b/include/chipset.h @@ -15,7 +15,9 @@ #include "common.h" #include "compile_time_macros.h" +#include "ec_commands.h" #include "gpio.h" +#include "stddef.h" /* * Chipset state mask @@ -256,10 +258,29 @@ __override_proto enum critical_shutdown board_system_is_idle( */ void report_ap_reset(enum chipset_shutdown_reason reason); +/** + * Get statistics about AP resets. + * + * @param reset_log_entries Pointer to array of log entries. + * @param num_reset_log_entries Number of items in reset_log_entries. + * @param resets_since_ec_boot Number of AP resets since EC boot. + */ +test_mockable enum ec_error_list +get_ap_reset_stats(struct ap_reset_log_entry *reset_log_entries, + size_t num_reset_log_entries, + uint32_t *resets_since_ec_boot); + #else static inline void report_ap_reset(enum chipset_shutdown_reason reason) { } +test_mockable_static_inline enum ec_error_list +get_ap_reset_stats(struct ap_reset_log_entry *reset_log_entries, + size_t num_reset_log_entries, uint32_t *resets_since_ec_boot) +{ + return EC_SUCCESS; +} + #endif /* !CONFIG_CMD_AP_RESET_LOG */ #endif /* __CROS_EC_CHIPSET_H */ diff --git a/include/common.h b/include/common.h index fab97f17b4..37d6db9fb8 100644 --- a/include/common.h +++ b/include/common.h @@ -225,10 +225,12 @@ enum ec_error_list { #ifdef TEST_BUILD #define test_mockable __attribute__((weak)) #define test_mockable_static __attribute__((weak)) +#define test_mockable_static_inline __attribute__((weak)) #define test_export_static #else #define test_mockable #define test_mockable_static static +#define test_mockable_static_inline static inline #define test_export_static static #endif diff --git a/include/config.h b/include/config.h index ff91073ea5..d3547dde72 100644 --- a/include/config.h +++ b/include/config.h @@ -2127,6 +2127,9 @@ #define CONFIG_HOSTCMD_LOCATE_CHIP #endif +/* Command to get the EC uptime (and optionally AP reset stats) */ +#define CONFIG_HOSTCMD_GET_UPTIME_INFO + /* List of host commands whose debug output will be suppressed */ #undef CONFIG_SUPPRESSED_HOST_COMMANDS |