aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-11-23 16:45:59 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-24 16:47:16 +1100
commit441ddb9b4719a092bbbf81fcf775632f282a3fca (patch)
tree437302f687eb23d881e59013e62464956533b622 /platforms
parent2981a7bfc9dc3b1b642a868b09a75d011c49063a (diff)
downloadskiboot-441ddb9b4719a092bbbf81fcf775632f282a3fca.zip
skiboot-441ddb9b4719a092bbbf81fcf775632f282a3fca.tar.gz
skiboot-441ddb9b4719a092bbbf81fcf775632f282a3fca.tar.bz2
i2c: Add i2c_run_req() to crank the state machine for a request
Doing everything asynchronously is brilliant, it's exactly what we want to do. Except... the tpm driver wants to do things synchronously, which isn't so cool. For reasons that are not yet completely known, we spend an awful lot of time in the main thread *not* running pollers (potentially seconds), which doesn't bode well for I2C timeouts. Since the TPM measure is done in a secondary thread, we do *not* run pollers there either (as of 323c8aeb54bd4e0b9004091fcbb4a9daeda2f576 - which is roughly as of skiboot 2.1.1). But we still need to crank the i2c state machine, so we introduce a call to do just that. It will return how long the poll interval should be, so that we can time_wait() for a more appropriate time for whatever i2c implementation is sitting behind things. Without this, it was "easy" to get to a situation where the i2c state machine wasn't cranked at all, and you'd hit the i2c timeout (for the issued operation) before the poller to crank i2c was ever called. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Tested-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
0 files changed, 0 insertions, 0 deletions