Enable POST codes in EC init instead of per-board
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
parent
d1db553e8c
commit
1fc832ca94
@ -26,9 +26,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -30,9 +30,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <board/gctrl.h>
|
||||
|
||||
void gctrl_init(void) {
|
||||
SPCTRL1 = 0x03;
|
||||
// Set I2EC as R/W
|
||||
SPCTRL1 |= 0x03;
|
||||
// Set PNPCFG base address
|
||||
BADRSEL = 0;
|
||||
}
|
||||
|
@ -27,9 +27,6 @@ void board_init(void) {
|
||||
// Assert SMI# and SWI#
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -33,9 +33,6 @@ void board_init(void) {
|
||||
// Assert SMI# and SWI#
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -26,9 +26,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -29,9 +29,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -30,9 +30,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -29,9 +29,6 @@ void board_init(void) {
|
||||
gpio_set(&SCI_N, true);
|
||||
gpio_set(&SMI_N, true);
|
||||
gpio_set(&SWI_N, true);
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= 0xC8;
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
|
@ -3,9 +3,13 @@
|
||||
#include <ec/ec.h>
|
||||
#include <ec/gctrl.h>
|
||||
#include <common/debug.h>
|
||||
#include <common/macro.h>
|
||||
|
||||
void ec_init(void) {
|
||||
RSTS = 0x44;
|
||||
|
||||
// Enable POST codes
|
||||
SPCTRL1 |= BIT(7) | BIT(6) | BIT(3);
|
||||
}
|
||||
|
||||
void ec_read_post_codes(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user