sb/intel/common: Fix SMBus block commands
Fix regression after commit
c38d543
sb/intel/common: SMBus complete_command()
When evaluating HSTSTS register, BYTE_DONE bit must
be excluded from transaction completion and error criteria.
Change-Id: I49cc43d1fa58250988cc41b2ca747b9f1d7586d6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31622
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
62b4b44961
commit
44206e38bf
|
@ -74,7 +74,10 @@ static int host_completed(u8 status)
|
||||||
{
|
{
|
||||||
if (status & SMBHSTSTS_HOST_BUSY)
|
if (status & SMBHSTSTS_HOST_BUSY)
|
||||||
return 0;
|
return 0;
|
||||||
status &= ~(SMBHSTSTS_SMBALERT_STS | SMBHSTSTS_INUSE_STS);
|
|
||||||
|
/* These status bits do not imply completion of transaction. */
|
||||||
|
status &= ~(SMBHSTSTS_BYTE_DONE | SMBHSTSTS_INUSE_STS |
|
||||||
|
SMBHSTSTS_SMBALERT_STS);
|
||||||
return status != 0;
|
return status != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,8 +92,9 @@ static int recover_master(int smbus_base, int ret)
|
||||||
|
|
||||||
static int cb_err_from_stat(u8 status)
|
static int cb_err_from_stat(u8 status)
|
||||||
{
|
{
|
||||||
/* Ignore the "In Use" status... */
|
/* These status bits do not imply errors. */
|
||||||
status &= ~(SMBHSTSTS_SMBALERT_STS | SMBHSTSTS_INUSE_STS);
|
status &= ~(SMBHSTSTS_BYTE_DONE | SMBHSTSTS_INUSE_STS |
|
||||||
|
SMBHSTSTS_SMBALERT_STS);
|
||||||
|
|
||||||
if (status == SMBHSTSTS_INTR)
|
if (status == SMBHSTSTS_INTR)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue