diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch index ba564e695..a5f4fa216 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0068-i2c-aspeed-add-H-W-timeout-support.patch @@ -1,4 +1,4 @@ -From 25a38287274f9c39eb8355d51ba06203efdb07aa Mon Sep 17 00:00:00 2001 +From 3e359be7e8a96b068479d01aa671ff642d291bca Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Date: Thu, 11 Jul 2019 13:53:34 -0700 Subject: [PATCH] i2c: aspeed: add H/W timeout support @@ -11,7 +11,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c -index 127bc69952ca..542b0f4017eb 100644 +index 891b2b5c4b7a..71ebf3bbf38b 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -55,6 +55,7 @@ @@ -59,7 +59,7 @@ index 127bc69952ca..542b0f4017eb 100644 ASPEED_I2CD_INTR_BUS_RECOVER_DONE | \ ASPEED_I2CD_INTR_SCL_TIMEOUT | \ ASPEED_I2CD_INTR_ABNORMAL | \ -@@ -180,6 +189,7 @@ struct aspeed_i2c_bus { +@@ -186,6 +195,7 @@ struct aspeed_i2c_bus { u32 divisor); unsigned long parent_clk_frequency; u32 bus_frequency; @@ -67,7 +67,7 @@ index 127bc69952ca..542b0f4017eb 100644 /* Transaction state. */ enum aspeed_i2c_master_state master_state; struct i2c_msg *msgs; -@@ -297,6 +307,14 @@ static int aspeed_i2c_recover_bus(struct aspeed_i2c_bus *bus) +@@ -303,6 +313,14 @@ static int aspeed_i2c_recover_bus(struct aspeed_i2c_bus *bus) } #if IS_ENABLED(CONFIG_I2C_SLAVE) @@ -82,7 +82,7 @@ index 127bc69952ca..542b0f4017eb 100644 static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) { u32 command, irq_handled = 0; -@@ -307,6 +325,14 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) +@@ -313,6 +331,14 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) if (!slave) return 0; @@ -97,7 +97,7 @@ index 127bc69952ca..542b0f4017eb 100644 command = readl(bus->base + ASPEED_I2C_CMD_REG); /* Slave was requested, restart state machine. */ -@@ -649,7 +675,7 @@ static void aspeed_i2c_next_msg_or_stop(struct aspeed_i2c_bus *bus) +@@ -655,7 +681,7 @@ static void aspeed_i2c_next_msg_or_stop(struct aspeed_i2c_bus *bus) } } @@ -106,7 +106,7 @@ index 127bc69952ca..542b0f4017eb 100644 { if (irq_status & ASPEED_I2CD_INTR_ARBIT_LOSS) return -EAGAIN; -@@ -680,9 +706,9 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status) +@@ -686,9 +712,9 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status) * should clear the command queue effectively taking us back to the * INACTIVE state. */ @@ -118,7 +118,7 @@ index 127bc69952ca..542b0f4017eb 100644 irq_status); irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS); if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) { -@@ -1251,6 +1277,7 @@ static u32 aspeed_i2c_25xx_get_clk_reg_val(struct device *dev, u32 divisor) +@@ -1264,6 +1290,7 @@ static u32 aspeed_i2c_25xx_get_clk_reg_val(struct device *dev, u32 divisor) /* precondition: bus.lock has been acquired. */ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus) { @@ -126,7 +126,7 @@ index 127bc69952ca..542b0f4017eb 100644 u32 divisor, clk_reg_val; divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency); -@@ -1259,8 +1286,46 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus) +@@ -1272,8 +1299,46 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus) ASPEED_I2CD_TIME_THDSTA_MASK | ASPEED_I2CD_TIME_TACST_MASK); clk_reg_val |= bus->get_clk_reg_val(bus->dev, divisor); @@ -174,7 +174,7 @@ index 127bc69952ca..542b0f4017eb 100644 return 0; } -@@ -1275,6 +1340,11 @@ static int aspeed_i2c_init(struct aspeed_i2c_bus *bus, +@@ -1288,6 +1353,11 @@ static int aspeed_i2c_init(struct aspeed_i2c_bus *bus, /* Disable everything. */ writel(0, bus->base + ASPEED_I2C_FUN_CTRL_REG); |