Per the flow charts for PECI programming guide, clear the status
register after the command has completed.
Ref: IT5570E V0.3.2 datasheet
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Per the IT5570E datasheet, FINISH should be used to check if a
transaction completed, not HOBY.
> For the polling mode, software continues reading the Host Status
> Register to check whether the transaction is completed or not (the
> Finish bit in the Host Status Register will be set when the
> transaction is completed).
Ref: IT5570E V0.3.2 datasheet
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Check if any hardware error bits are set instead of checking for only
command completion.
Move logging of WrPkgConfig() errors from power to peci.
Ref: IT5570E V0.3.2 datasheet
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Step 2 for data transmission (both RX and TX) is to enable the
Transaction Done interrupt.
Ref: IT5570 V0.3.2, 7.9.3.1 Hardware Mode Selected
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Whatever the issue was appears to be fixed after rebasing coreboot on
the 4.19 release. lemp11 has successfully reached S0ix with SLP_S0#
asserted when booted on battery power for 100 cycles.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Groups 1, 3, and 4 require explicitly enabling the wake-up function
before unmasking them in INTC.
Signed-off-by: Tim Crawford <tcrawford@system76.com>