Working SPD reading in fwstart.img

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-17 21:10:58 +01:00
parent a1efcc79d3
commit 7517048135
8 changed files with 321 additions and 12 deletions

View file

@ -80,11 +80,11 @@ grub_cs5536_smbus_wait (grub_port_t smbbase)
{
grub_uint8_t status;
status = grub_inb (smbbase + GRUB_CS5536_SMB_REG_STATUS);
if (status & (1 << 6))
if (status & GRUB_CS5536_SMB_REG_STATUS_SDAST)
return GRUB_ERR_NONE;
if (status & (1 << 5))
if (status & GRUB_CS5536_SMB_REG_STATUS_BER)
return grub_error (GRUB_ERR_IO, "SM bus error");
if (status & (1 << 4))
if (status & GRUB_CS5536_SMB_REG_STATUS_NACK)
return grub_error (GRUB_ERR_IO, "NACK received");
if (grub_get_time_ms () > start + 40)
return grub_error (GRUB_ERR_IO, "SM stalled");