[Meego-kernel] [PATCH 1/4] i2c-mrst: update i2c frequency setting
Bin Yang
bin.yang at intel.com
Wed Oct 13 01:36:12 PDT 2010
Change internal controller frequency to 20Mhz for all I2C ports
except I2C Port 3 which needs to be run at 16.6Mhz from 100Mh
Signed-off-by: Bin Yang <bin.yang at intel.com>
---
drivers/i2c/busses/i2c-mrst.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mrst.c b/drivers/i2c/busses/i2c-mrst.c
index 75963a0..a7279b9 100644
--- a/drivers/i2c/busses/i2c-mrst.c
+++ b/drivers/i2c/busses/i2c-mrst.c
@@ -61,14 +61,14 @@
static int speed_mode[6] = {
+ FAST,
+ FAST,
+ FAST,
STANDARD,
- STANDARD,
- STANDARD,
- STANDARD,
- STANDARD,
- STANDARD
+ FAST,
+ FAST
};
-static int ctl_num;
+static int ctl_num = 6;
module_param_array(speed_mode, int, &ctl_num, S_IRUGO);
/**
@@ -138,11 +138,11 @@ static int mrst_i2c_hwinit(struct mrst_i2c_private *i2c)
int err = 0;
static const u16 hcnt[NUM_PLATFORMS][NUM_SPEEDS] = {
{ 0x75, 0x15, 0x07 },
- { 0x1EC, 0x70, 0x06 }
+ { 0x04c, 0x10, 0x06 }
};
static const u16 lcnt[NUM_PLATFORMS][NUM_SPEEDS] = {
{ 0x7C, 0x21, 0x0E },
- { 0x1F3, 0x81, 0x0F }
+ { 0x053, 0x19, 0x0F }
};
/* Disable i2c first */
@@ -280,6 +280,8 @@ static void mrst_i2c_abort(struct mrst_i2c_private *i2c)
"I2C slave device not acknowledge.\n");
break;
default:
+ dev_err(&adap->dev,
+ "I2C TX abort.\n");
;
}
--
1.7.0.4
More information about the Meego-kernel
mailing list