summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h89
1 files changed, 0 insertions, 89 deletions
diff --git a/include/system.h b/include/system.h
index cf936d64bf..26e61932c0 100644
--- a/include/system.h
+++ b/include/system.h
@@ -8,9 +8,7 @@
#ifndef __CROS_EC_SYSTEM_H
#define __CROS_EC_SYSTEM_H
-#include "atomic.h"
#include "common.h"
-#include "timer.h"
/* Reset causes */
#define RESET_FLAG_OTHER (1 << 0) /* Other known reason */
@@ -270,91 +268,4 @@ void system_hibernate(uint32_t seconds, uint32_t microseconds);
int system_get_console_force_enabled(void);
int system_set_console_force_enabled(int enabled);
-/**
- * Read the real-time clock.
- *
- * @return The real-time clock value as a timestamp.
- */
-timestamp_t system_get_rtc(void);
-
-/**
- * Enable hibernate interrupt
- */
-void system_enable_hib_interrupt(void);
-
-/* Low power modes for idle API */
-enum {
- /*
- * Sleep masks to prevent going in to deep sleep.
- */
- SLEEP_MASK_AP_RUN = (1 << 0), /* the main CPU is running */
- SLEEP_MASK_UART = (1 << 1), /* UART communication on-going */
- SLEEP_MASK_I2C = (1 << 2), /* I2C master communication on-going */
- SLEEP_MASK_CHARGING = (1 << 3), /* Charging loop on-going */
- SLEEP_MASK_USB_PWR = (1 << 4), /* USB power loop on-going */
-
- SLEEP_MASK_FORCE_NO_DSLEEP = (1 << 15), /* Force disable. */
-
-
- /*
- * Sleep masks to prevent using slow speed clock in deep sleep.
- */
- SLEEP_MASK_JTAG = (1 << 16), /* JTAG is in use. */
- SLEEP_MASK_CONSOLE = (1 << 17), /* Console is in use. */
-
- SLEEP_MASK_FORCE_NO_LOW_SPEED = (1 << 31) /* Force disable. */
-};
-
-/*
- * Current sleep mask. You may read from this variable, but must NOT
- * modify it; use enable_sleep() or disable_sleep() to do that.
- */
-extern uint32_t sleep_mask;
-
-/*
- * Macros to use to get whether deep sleep is allowed or whether
- * low speed deep sleep is allowed.
- */
-#define DEEP_SLEEP_ALLOWED (!(sleep_mask & 0x0000ffff))
-#define LOW_SPEED_DEEP_SLEEP_ALLOWED (!(sleep_mask & 0xffff0000))
-
-/**
- * Enable low power sleep mask. For low power sleep to take affect, all masks
- * in the sleep mask enum above must be enabled.
- *
- * @param Sleep mask to enable.
- */
-static inline void enable_sleep(uint32_t mask)
-{
- atomic_clear(&sleep_mask, mask);
-}
-
-/**
- * Disable low power sleep mask. For low power sleep to take affect, all masks
- * in the sleep mask enum above must be enabled.
- *
- * @param Sleep mask to enable.
- */
-static inline void disable_sleep(uint32_t mask)
-{
- atomic_or(&sleep_mask, mask);
-}
-
-/**
- * Use hibernate module to set up an RTC interrupt at a given
- * time from now
- *
- * Note: If time given is less than HIB_SET_RTC_MATCH_DELAY_USEC, then it will
- * set the interrupt at exactly HIB_SET_RTC_MATCH_DELAY_USEC.
- *
- * @param seconds Number of seconds before RTC interrupt
- * @param microseconds Number of microseconds before RTC interrupt
- */
-void system_set_rtc_alarm(uint32_t seconds, uint32_t microseconds);
-
-/**
- * Disable and clear the RTC interrupt.
- */
-void system_reset_rtc_alarm(void);
-
#endif /* __CROS_EC_SYSTEM_H */