The functions which checked the status of a transfer would return success if the bus was no longer occupied, even if it's no longer occupied because the transfer failed. This change modifies those functions to return three possible values, 0 if the transfer isn't done, -1 if there was a fault, and 1 if the transaction completed successfully. BUG=chrome-os-partner:19420 TEST=Built and booted into depthcharge on pit and verified that the PMIC was initialized successfully by coreboot. Similar changes were tested in depthcharge when probing the tpm and when communicating with it and corrected some problems there. BRANCH=None Change-Id: If20e0f29688542ba03f08c1da3ebe0429103d33d Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/59733 Reviewed-by: Ronald G. Minnich <rminnich@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> |
||
|---|---|---|
| .. | ||
| amd | ||
| armltd | ||
| intel | ||
| samsung | ||
| via | ||
| x86 | ||
| Kconfig | ||
| Makefile.inc | ||