aspeed/i2c: improve command handling
commitddabca757a4eb29f342f7f1d01634ccdbe0e3844
authorCédric Le Goater <clg@kaod.org>
Fri, 2 Jun 2017 10:51:49 +0000 (2 11:51 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Jun 2017 10:51:49 +0000 (2 11:51 +0100)
tree11c83564eb5f6b0a72f9737cede731a67936ce76
parent3bef7012560a7f0ea27b265105de5090ba117514
aspeed/i2c: improve command handling

Multiple I2C commands can be fired simultaneously and the controller
execute the commands following these priorities:

  (1) Master Start Command
  (2) Master Transmit Command
  (3) Slave Transmit Command or Master Receive Command
  (4) Master Stop Command

The current code is incorrect with respect to the above sequence and
needs to be reworked to handle each individual command.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 1494827476-1487-2-git-send-email-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/i2c/aspeed_i2c.c