peci: Check FINISH for completed transaction
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>
This commit is contained in:
committed by
Jeremy Soller
parent
dd97946056
commit
3dde812dba
@ -295,8 +295,8 @@ bool peci_get_temp(int16_t *data) {
|
|||||||
// Start transaction
|
// Start transaction
|
||||||
HOCTLR |= 1;
|
HOCTLR |= 1;
|
||||||
|
|
||||||
// Wait for completion
|
// Wait for command completion
|
||||||
while (HOSTAR & 1) {}
|
while (!(HOSTAR & BIT(1))) {}
|
||||||
|
|
||||||
uint8_t status = HOSTAR;
|
uint8_t status = HOSTAR;
|
||||||
if (status & 0xEC) {
|
if (status & 0xEC) {
|
||||||
@ -346,8 +346,8 @@ int16_t peci_wr_pkg_config(uint8_t index, uint16_t param, uint32_t data) {
|
|||||||
// Start transaction
|
// Start transaction
|
||||||
HOCTLR |= 1;
|
HOCTLR |= 1;
|
||||||
|
|
||||||
// Wait for completion
|
// Wait for command completion
|
||||||
while (HOSTAR & 1) {}
|
while (!(HOSTAR & BIT(1))) {}
|
||||||
|
|
||||||
uint8_t status = HOSTAR;
|
uint8_t status = HOSTAR;
|
||||||
if (status & 0xEC) {
|
if (status & 0xEC) {
|
||||||
|
Reference in New Issue
Block a user