diff mbox

[13/13] mach-ux500: set proper I2C platform data from MOP500s

Message ID BANLkTinyezaueqctkF1LZb=CrC7MXTR1kg@mail.gmail.com
State Accepted
Headers show

Commit Message

Linus Walleij May 10, 2011, 11:50 p.m. UTC
---------- Forwarded message ----------
From: Linus Walleij <linus.walleij@linaro.org>
Date: 2011/5/9
Subject: [PATCH 13/13] mach-ux500: set proper I2C platform data from MOP500s
To: Ben Dooks <ben-linux@fluff.org>, linux-i2c@vger.kernel.org
Kopia: Linus Walleij <linus.walleij@linaro.org>


This specifies the new per-platform timeout per I2C bus and
switches the I2C buses to fast mode, and increase the FIFO
depth to 8 for reads and writes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

        * slave data setup time, which is      \
@@ -219,19 +219,21 @@ static struct nmk_i2c_controller
u8500_i2c##id##_data = { \
       .rft            = _rft,         \
       /* std. mode operation */       \
       .clk_freq       = clk,          \
+       /* Slave response timeout(ms) */\
+       .timeout        = t_out,        \
       .sm             = _sm,          \
 }

 /*
 * The board uses 4 i2c controllers, initialize all of
 * them with slave data setup time of 250 ns,
- * Tx & Rx FIFO threshold values as 1 and standard
+ * Tx & Rx FIFO threshold values as 8 and standard
 * mode of operation
 */
-U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
-U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
-U8500_I2C_CONTROLLER(2,        0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
-U8500_I2C_CONTROLLER(3,        0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
+U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(2,        0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(3,        0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);

 static void __init mop500_i2c_init(void)
 {
--
1.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-ux500/board-mop500.c
b/arch/arm/mach-ux500/board-mop500.c
index 6e1907fa..bb26f40 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -204,7 +204,7 @@  static struct i2c_board_info __initdata
mop500_i2c2_devices[] = {
       },
 };

-#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
+#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm)   \
 static struct nmk_i2c_controller u8500_i2c##id##_data = { \
       /*                              \