Revert "i2c: aspeed: Update the stop sw state when the bus recovery occurs"
This reverts commit e1c2b064e3
.
This commit is contained in:
parent
0d59e15c6b
commit
0bd52cb48d
1 changed files with 8 additions and 8 deletions
|
@ -172,13 +172,6 @@ struct aspeed_i2c_bus {
|
|||
|
||||
static int aspeed_i2c_reset(struct aspeed_i2c_bus *bus);
|
||||
|
||||
/* precondition: bus.lock has been acquired. */
|
||||
static void aspeed_i2c_do_stop(struct aspeed_i2c_bus *bus)
|
||||
{
|
||||
bus->master_state = ASPEED_I2C_MASTER_STOP;
|
||||
writel(ASPEED_I2CD_M_STOP_CMD, bus->base + ASPEED_I2C_CMD_REG);
|
||||
}
|
||||
|
||||
static int aspeed_i2c_recover_bus(struct aspeed_i2c_bus *bus)
|
||||
{
|
||||
unsigned long time_left, flags;
|
||||
|
@ -196,7 +189,7 @@ static int aspeed_i2c_recover_bus(struct aspeed_i2c_bus *bus)
|
|||
command);
|
||||
|
||||
reinit_completion(&bus->cmd_complete);
|
||||
aspeed_i2c_do_stop(bus);
|
||||
writel(ASPEED_I2CD_M_STOP_CMD, bus->base + ASPEED_I2C_CMD_REG);
|
||||
spin_unlock_irqrestore(&bus->lock, flags);
|
||||
|
||||
time_left = wait_for_completion_timeout(
|
||||
|
@ -392,6 +385,13 @@ static void aspeed_i2c_do_start(struct aspeed_i2c_bus *bus)
|
|||
writel(command, bus->base + ASPEED_I2C_CMD_REG);
|
||||
}
|
||||
|
||||
/* precondition: bus.lock has been acquired. */
|
||||
static void aspeed_i2c_do_stop(struct aspeed_i2c_bus *bus)
|
||||
{
|
||||
bus->master_state = ASPEED_I2C_MASTER_STOP;
|
||||
writel(ASPEED_I2CD_M_STOP_CMD, bus->base + ASPEED_I2C_CMD_REG);
|
||||
}
|
||||
|
||||
/* precondition: bus.lock has been acquired. */
|
||||
static void aspeed_i2c_next_msg_or_stop(struct aspeed_i2c_bus *bus)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue