aboutsummaryrefslogtreecommitdiffstats
path: root/meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch')
-rw-r--r--meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch b/meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch
new file mode 100644
index 00000000..6287c826
--- /dev/null
+++ b/meta-baldeagle/recipes-kernel/linux/linux-yocto/0047-yocto-poky-dora-10.0.0-amd-i2c-dev-add-calls-to-enable-and-disable-IMC-from-fetching-BIOS-code.patch
@@ -0,0 +1,51 @@
+From 38595e633e5a1237bdea9cb0aa9193aea40542a8 Mon Sep 17 00:00:00 2001
+From: Arindam Nath <arindam.nath@amd.com>
+Date: Mon, 4 Aug 2014 19:21:44 +0530
+Subject: [PATCH 2/2] yocto: amd: i2c-dev: add calls to enable and disable IMC
+ from fetching BIOS code
+
+The patch adds support to disable IMC from fetching BIOS code when
+we first open the SMBus device. We can perform SMBus transaction
+safely once IMC is disabled. Then when we close the device after
+the operation, we enable IMC to start fetching from BIOS ROM again.
+
+Upstream Status: None
+
+Signed-off-by: Arindam Nath <arindam.nath@amd.com>
+---
+ drivers/i2c/i2c-dev.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
+index c3ccdea..c92ec4c 100644
+--- a/drivers/i2c/i2c-dev.c
++++ b/drivers/i2c/i2c-dev.c
+@@ -39,6 +39,7 @@
+ #include <linux/i2c-dev.h>
+ #include <linux/jiffies.h>
+ #include <linux/uaccess.h>
++#include <linux/amd_imc.h>
+
+ /*
+ * An i2c_dev represents an i2c_adapter ... an I2C or SMBus master, not a
+@@ -512,6 +513,8 @@ static int i2cdev_open(struct inode *inode, struct file *file)
+ client->adapter = adap;
+ file->private_data = client;
+
++ amd_imc_enter_scratch_ram();
++
+ return 0;
+ }
+
+@@ -523,6 +526,8 @@ static int i2cdev_release(struct inode *inode, struct file *file)
+ kfree(client);
+ file->private_data = NULL;
+
++ amd_imc_exit_scratch_ram();
++
+ return 0;
+ }
+
+--
+1.9.1
+