Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

i2c-prescalar-fix: i2c: fixed prescalar setting issue

Applied Steve's i2c prescalar fix patches.
See https://groups.google.com/d/msg/beagleboard/Q1pDr1lT7Gk/jvxOxgg8_2MJ

Signed-off-by: Al Pacifico <adpacifico@users.sourceforge.net>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
commit e2ffae464a99d597bf478da5dc3ca9af14c80a00 1 parent 17728de
@adpacifico adpacifico authored koenkooi committed
View
3  arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -1243,7 +1243,8 @@ static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
static struct omap_i2c_dev_attr i2c_dev_attr = {
.flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
- OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
+ OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
+ OMAP_I2C_FLAG_FORCE_12000_INT_CLK,
};
static struct omap_hwmod_class i2c_class = {
View
2  drivers/i2c/busses/i2c-omap.c
@@ -408,6 +408,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
if (dev->speed > 400 ||
pdata->flags & OMAP_I2C_FLAG_FORCE_19200_INT_CLK)
internal_clk = 19200;
+ else if (pdata->flags & OMAP_I2C_FLAG_FORCE_12000_INT_CLK)
+ internal_clk = 12000;
else if (dev->speed > 100)
internal_clk = 9600;
else
View
1  include/linux/i2c-omap.h
@@ -24,6 +24,7 @@
#define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4)
#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6)
+#define OMAP_I2C_FLAG_FORCE_12000_INT_CLK BIT(9)
/* how the CPU address bus must be translated for I2C unit access */
#define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
#define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7)
Please sign in to comment.
Something went wrong with that request. Please try again.