From 6d365974c73b25976a5c5b7572af2dab13ad39d0 Mon Sep 17 00:00:00 2001 From: Sanjay R Mehta Date: Tue, 27 Sep 2016 16:14:53 +0530 Subject: [PATCH 2/2] yocto amd i2c dev add calls to enable and disable IMC from fetching BIOS code --- 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 2413ec9..6a3419d 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -34,6 +34,7 @@ #include #include #include +#include /* * An i2c_dev represents an i2c_adapter ... an I2C or SMBus master, not a @@ -510,6 +511,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; } @@ -521,6 +524,8 @@ static int i2cdev_release(struct inode *inode, struct file *file) kfree(client); file->private_data = NULL; + amd_imc_exit_scratch_ram(); + return 0; } -- 2.7.4