ec/it5570e: Add function to read POST codes
Logic for reading port 0x80/0x81 is common to the IT5570E. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
parent
43651cf2c2
commit
f8d81a1e1b
@ -2,7 +2,18 @@
|
||||
|
||||
#include <ec/ec.h>
|
||||
#include <ec/gctrl.h>
|
||||
#include <common/debug.h>
|
||||
|
||||
void ec_init(void) {
|
||||
RSTS = 0x44;
|
||||
}
|
||||
|
||||
void ec_read_post_codes(void) {
|
||||
while (P80H81HS & 1) {
|
||||
uint8_t p80h = P80HD;
|
||||
uint8_t p81h = P81HD;
|
||||
P80H81HS |= 1;
|
||||
|
||||
DEBUG("POST %02X%02X\n", p81h, p80h);
|
||||
}
|
||||
}
|
||||
|
@ -4,5 +4,6 @@
|
||||
#define _EC_EC_H
|
||||
|
||||
void ec_init(void);
|
||||
void ec_read_post_codes(void);
|
||||
|
||||
#endif // _EC_EC_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user