Add power_init function
This commit is contained in:
@ -12,6 +12,7 @@ enum PowerState {
|
||||
|
||||
extern enum PowerState power_state;
|
||||
|
||||
void power_init(void);
|
||||
void power_on(void);
|
||||
void power_off(void);
|
||||
void power_set_limit(void);
|
||||
|
@ -81,6 +81,7 @@ void init(void) {
|
||||
//TODO: INTC
|
||||
|
||||
// Must happen last
|
||||
power_init();
|
||||
board_init();
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
DEBUG("%02X: power_on\n", main_cycle);
|
||||
|
||||
|
Reference in New Issue
Block a user