linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] at91sam9g45: fix i2c bus speed
@ 2010-09-22  9:31 Peter Korsgaard
  2010-09-22 10:48 ` Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Peter Korsgaard @ 2010-09-22  9:31 UTC (permalink / raw)
  To: linux-arm-kernel

Use a correct udelay value to get bus speed around 100KHz. The udelay
value was most likely copied from the older devices, but the 9g45
is signicantly faster (400MHz, DDR, ..), so a udelay of 2 gives a
bus speed of around 190KHz, which is too fast for some devices.
A udelay value of 5 gives a bus speed of around 90KHz here.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 arch/arm/mach-at91/at91sam9g45_devices.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 5e71ccd..1276bab 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -426,7 +426,7 @@ static struct i2c_gpio_platform_data pdata_i2c0 = {
 	.sda_is_open_drain	= 1,
 	.scl_pin		= AT91_PIN_PA21,
 	.scl_is_open_drain	= 1,
-	.udelay			= 2,		/* ~100 kHz */
+	.udelay			= 5,		/* ~100 kHz */
 };
 
 static struct platform_device at91sam9g45_twi0_device = {
@@ -440,7 +440,7 @@ static struct i2c_gpio_platform_data pdata_i2c1 = {
 	.sda_is_open_drain	= 1,
 	.scl_pin		= AT91_PIN_PB11,
 	.scl_is_open_drain	= 1,
-	.udelay			= 2,		/* ~100 kHz */
+	.udelay			= 5,		/* ~100 kHz */
 };
 
 static struct platform_device at91sam9g45_twi1_device = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-09-23 12:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-22  9:31 [PATCH] at91sam9g45: fix i2c bus speed Peter Korsgaard
2010-09-22 10:48 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 11:08   ` Peter Korsgaard
2010-09-22 14:34     ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 14:54       ` Wolfgang Wegner
2010-09-22 16:09         ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 15:18       ` Peter Korsgaard
2010-09-22 16:05         ` Nicolas Ferre
2010-09-22 16:10         ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 16:06 ` Nicolas Ferre
2010-09-23  8:18 ` Nicolas Ferre
2010-09-23  9:22   ` Peter Korsgaard
2010-09-23  9:31     ` Russell King - ARM Linux
2010-09-23 10:09       ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-23 10:24         ` Peter Korsgaard
2010-09-23 10:21       ` Peter Korsgaard
2010-09-23 10:36         ` Russell King - ARM Linux
2010-09-23 10:54           ` Peter Korsgaard
2010-09-23 11:16             ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-23 11:32               ` Peter Korsgaard
2010-09-23 12:00                 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-23 11:07           ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).