Add power_init function

This commit is contained in:
Jeremy Soller
2022-02-10 08:36:53 -07:00
parent 474b1c2191
commit cb341cfb2b
3 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,7 @@ enum PowerState {
extern enum PowerState power_state; extern enum PowerState power_state;
void power_init(void);
void power_on(void); void power_on(void);
void power_off(void); void power_off(void);
void power_set_limit(void); void power_set_limit(void);

View File

@ -81,6 +81,7 @@ void init(void) {
//TODO: INTC //TODO: INTC
// Must happen last // Must happen last
power_init();
board_init(); board_init();
} }

View File

@ -159,6 +159,18 @@ void update_power_state(void) {
} }
} }
void power_init(void) {
// See Figure 12-19 in Whiskey Lake Platform Design Guide
// | VCCRTC | RTCRST# | VccPRIM |
// | tPCH01---------- | |
// | tPCH04-------------------- |
// tPCH04 is the ideal delay
tPCH04;
update_power_state();
}
void power_on(void) { void power_on(void) {
DEBUG("%02X: power_on\n", main_cycle); DEBUG("%02X: power_on\n", main_cycle);