Must wait on I2C controller before checking status

We have to wait until the controller is no longer busy before we announce
that we're done. Just waiting for the first interrupt isn't enough, because
that's often just an error indicator and the controller still has to stop.

BUG=none
TEST=none

Change-Id: I065c049111d7de276bf8f7cd0eed39c3f5cff5f4
This commit is contained in:
Bill Richardson
2012-02-10 14:54:41 -08:00
parent 6063ad473c
commit ee7fce76b0

View File

@@ -26,7 +26,7 @@ static int wait_idle(int port)
int wait_msg;
i = LM4_I2C_MCS(port);
if (i & 0x01) {
while (i & 0x01) {
/* Port is busy, so wait for the interrupt */
task_waiting_on_port[port] = task_get_current();
LM4_I2C_MIMR(port) = 0x03;