aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch
new file mode 100644
index 00000000..e345941b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1359-amd-i2c-AMD-MP2-I2C-Bug-fix.patch
@@ -0,0 +1,54 @@
+From b7d990237a17d02b359ce5f5a2110ec8f9150739 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Fri, 2 Mar 2018 12:11:34 +0530
+Subject: [PATCH 1359/4131] amd-i2c : AMD-MP2-I2C Bug fix
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/i2c/busses/Kconfig | 2 +-
+ drivers/i2c/busses/i2c-amd-mp2.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
+index 29aa1f8..e6e7d9a 100755
+--- a/drivers/i2c/busses/Kconfig
++++ b/drivers/i2c/busses/Kconfig
+@@ -85,7 +85,7 @@ config I2C_AMD_MP2
+ I2C interface.
+
+ This driver can also be built as a module. If so, the module
+- will be called i2c-pcie_mp2_amd.
++ will be called pcie_mp2_amd and i2c-amd-mp2.
+
+
+ config I2C_HIX5HD2
+diff --git a/drivers/i2c/busses/i2c-amd-mp2.c b/drivers/i2c/busses/i2c-amd-mp2.c
+index f0fbbf7..8a43b35 100755
+--- a/drivers/i2c/busses/i2c-amd-mp2.c
++++ b/drivers/i2c/busses/i2c-amd-mp2.c
+@@ -40,7 +40,7 @@ struct amd_mp2_i2c {
+ struct amd_i2c_dev amd_mp2;
+ struct completion msg_complete;
+ struct i2c_msg *msg_buf;
+- bool is_configured;
++ unsigned short is_configured;
+ int bus_id;
+
+ };
+@@ -178,11 +178,11 @@ static int amd_mp2_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+
+ reinit_completion(&dev->msg_complete);
+
+- if (dev->is_configured == 0) {
++ if (dev->is_configured != msgs->addr) {
+ pr_devel(" call the configure\n");
+ mp2_i2c_pci_configure(dev, msgs->addr);
+ timeout = wait_for_completion_timeout(&dev->msg_complete, 50);
+- dev->is_configured = 1;
++ dev->is_configured = msgs->addr;
+ }
+ pr_devel(" %s:%s dev:%p dev->amd_mp2=%p dev->amd_mp2.pdev:%p\n num =%d",
+ DRIVER_NAME, __func__, dev, &dev->amd_mp2, dev->amd_mp2.pdev, num);
+--
+2.7.4
+