All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: omap4: i2c reset regs postidle
@ 2011-04-21 11:47 Jan Weitzel
  2011-04-21 12:13 ` Andy Green
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-04-21 11:47 UTC (permalink / raw)
  To: linux-omap, andy.green, patches
  Cc: andy, tony, peter.maydell, ben-linux, Jan Weitzel

Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
timeouts on each accsess after an NACK message.
Taking this flag fix it.

This patch is on top of the i2c feature implementation flags
patches

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 5f4a1b2..3d3b4f4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2130,7 +2130,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
+		  OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
 };
 
 /* i2c1 */
-- 
1.7.0.4


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

* Re: [PATCH] ARM: omap4: i2c reset regs postidle
  2011-04-21 11:47 [PATCH] ARM: omap4: i2c reset regs postidle Jan Weitzel
@ 2011-04-21 12:13 ` Andy Green
  2011-05-16  7:56   ` Jan Weitzel
  0 siblings, 1 reply; 15+ messages in thread
From: Andy Green @ 2011-04-21 12:13 UTC (permalink / raw)
  To: Jan Weitzel; +Cc: linux-omap, patches, andy, tony, peter.maydell, ben-linux

On 04/21/2011 12:47 PM, Somebody in the thread at some point said:
> Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
> timeouts on each accsess after an NACK message.
> Taking this flag fix it.

Ahhh that will explain why if you accidentally configure LM75 system 
monitor support, which isn't there on Panda, the I2C controllers die 
slowly on boot.  Good catch!

-Andy

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

* Re: [PATCH] ARM: omap4: i2c reset regs postidle
  2011-04-21 12:13 ` Andy Green
@ 2011-05-16  7:56   ` Jan Weitzel
  2011-05-16  8:13     ` Andy Green
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-05-16  7:56 UTC (permalink / raw)
  To: andy.green; +Cc: linux-omap, patches, andy, tony, peter.maydell, ben-linux

Am Donnerstag, den 21.04.2011, 13:13 +0100 schrieb Andy Green:
> On 04/21/2011 12:47 PM, Somebody in the thread at some point said:
> > Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
> > timeouts on each accsess after an NACK message.
> > Taking this flag fix it.
> 
> Ahhh that will explain why if you accidentally configure LM75 system 
> monitor support, which isn't there on Panda, the I2C controllers die 
> slowly on boot.  Good catch!

Can I get an Acked-by ?

Jan



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

* Re: [PATCH] ARM: omap4: i2c reset regs postidle
  2011-05-16  7:56   ` Jan Weitzel
@ 2011-05-16  8:13     ` Andy Green
  2011-05-16  9:18       ` [PATCH v2] " Jan Weitzel
  0 siblings, 1 reply; 15+ messages in thread
From: Andy Green @ 2011-05-16  8:13 UTC (permalink / raw)
  To: J.Weitzel; +Cc: linux-omap, patches, tony, peter.maydell, ben-linux

On 05/16/2011 09:56 AM, Somebody in the thread at some point said:
> Am Donnerstag, den 21.04.2011, 13:13 +0100 schrieb Andy Green:
>> On 04/21/2011 12:47 PM, Somebody in the thread at some point said:
>>> Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
>>> timeouts on each accsess after an NACK message.
>>> Taking this flag fix it.
>>
>> Ahhh that will explain why if you accidentally configure LM75 system
>> monitor support, which isn't there on Panda, the I2C controllers die
>> slowly on boot.  Good catch!
>
> Can I get an Acked-by ?

Sure, I had it on my tree for a while too.

Tested-by: Andy Green <andy.green@linaro.org>
Acked-by: Andy Green <andy.green@linaro.org>

-Andy


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

* [PATCH v2] ARM: omap4: i2c reset regs postidle
  2011-05-16  8:13     ` Andy Green
@ 2011-05-16  9:18       ` Jan Weitzel
  2011-05-16 17:16         ` Cousson, Benoit
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-05-16  9:18 UTC (permalink / raw)
  To: linux-omap, b-cousson, andy.green, patches
  Cc: andy, tony, peter.maydell, ben-linux, Jan Weitzel

Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
timeouts on each accsess after an NACK message.
Taking this flag fix it.

This patch is on top of the i2c feature implementation flags
patches

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Tested-by: Andy Green <andy.green@linaro.org>
Acked-by: Andy Green <andy.green@linaro.org>
---
v2: add Tested-by / Acked-by

 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 5f4a1b2..3d3b4f4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2130,7 +2130,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
+		  OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
 };
 
 /* i2c1 */
-- 
1.7.0.4


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

* Re: [PATCH v2] ARM: omap4: i2c reset regs postidle
  2011-05-16  9:18       ` [PATCH v2] " Jan Weitzel
@ 2011-05-16 17:16         ` Cousson, Benoit
  2011-05-17  9:26           ` [PATCH v3] " Jan Weitzel
  0 siblings, 1 reply; 15+ messages in thread
From: Cousson, Benoit @ 2011-05-16 17:16 UTC (permalink / raw)
  To: Jan Weitzel
  Cc: linux-omap, andy.green, patches, andy, tony, peter.maydell, ben-linux

Hi Jan,

On 5/16/2011 11:18 AM, Jan Weitzel wrote:
> Without OMAP_I2C_FLAG_RESET_REGS_POSTIDLE I got i2c controller
> timeouts on each accsess after an NACK message.
> Taking this flag fix it.
>
> This patch is on top of the i2c feature implementation flags
> patches

Could you please give us more information and potentially provide a link 
to the patches you are referring to?
It will help us assessing the need for such flag in the hwmod data.

Please note that the changelog will stay forever in the GIT tree, so you 
should avoid using "the patch" or making reference to something that is 
not an existing commit id or email archive.
You should fix as well the typo.

Thanks,
Benoit


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

* [PATCH v3] ARM: omap4: i2c reset regs postidle
  2011-05-16 17:16         ` Cousson, Benoit
@ 2011-05-17  9:26           ` Jan Weitzel
  2011-05-17 14:12             ` Kevin Hilman
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-05-17  9:26 UTC (permalink / raw)
  To: linux-omap, b-cousson, andy.green, patches
  Cc: andy, tony, peter.maydell, ben-linux, Jan Weitzel

omap4430 get i2c timeouts at each access after an NACK message.
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE fix it.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Tested-by: Andy Green <andy.green@linaro.org>
Acked-by: Andy Green <andy.green@linaro.org>
---
Works on top of tmlind linux-omap-2.6.git
v3: commit message
v2: add Tested-by / Acked-by

 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 5f4a1b2..3d3b4f4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2130,7 +2130,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
+		  OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
 };
 
 /* i2c1 */
-- 
1.7.0.4


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

* Re: [PATCH v3] ARM: omap4: i2c reset regs postidle
  2011-05-17  9:26           ` [PATCH v3] " Jan Weitzel
@ 2011-05-17 14:12             ` Kevin Hilman
  2011-05-18 13:07               ` Jan Weitzel
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin Hilman @ 2011-05-17 14:12 UTC (permalink / raw)
  To: Jan Weitzel
  Cc: linux-omap, b-cousson, andy.green, patches, andy, tony,
	peter.maydell, ben-linux

Jan Weitzel <j.weitzel@phytec.de> writes:

> omap4430 get i2c timeouts at each access after an NACK message.
> OMAP_I2C_FLAG_RESET_REGS_POSTIDLE fix it.

We need a little better changelog here.  Specifically, *why* does this
flag fix the problem?   What exactly is going wrong such that this fix
is needed.

Does this happen all the time?  only when off-mode is used?  etc.

Looking closer at how this flag is used in the driver, I think the
driver's usage of runtime PM is a bit broken.  I'm not sure if it's
related to this problem, but I'll send a short series in a little bit to
clean up the runtime PM usage, and get rid of the dev->idle flag which
duplicates usage counting already provided by runtime PM.

Kevin

> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
> Tested-by: Andy Green <andy.green@linaro.org>
> Acked-by: Andy Green <andy.green@linaro.org>
> ---
> Works on top of tmlind linux-omap-2.6.git
> v3: commit message
> v2: add Tested-by / Acked-by
>
>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> index 5f4a1b2..3d3b4f4 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> @@ -2130,7 +2130,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
>  };
>  
>  static struct omap_i2c_dev_attr i2c_dev_attr = {
> -	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
> +	.flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
> +		  OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
>  };
>  
>  /* i2c1 */

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

* Re: [PATCH v3] ARM: omap4: i2c reset regs postidle
  2011-05-17 14:12             ` Kevin Hilman
@ 2011-05-18 13:07               ` Jan Weitzel
  2011-05-18 14:09                 ` Kevin Hilman
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-05-18 13:07 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: linux-omap, b-cousson, andy.green, patches, andy, tony,
	peter.maydell, ben-linux

Am Dienstag, den 17.05.2011, 16:12 +0200 schrieb Kevin Hilman:
> Jan Weitzel <j.weitzel@phytec.de> writes:
> 
> > omap4430 get i2c timeouts at each access after an NACK message.
> > OMAP_I2C_FLAG_RESET_REGS_POSTIDLE fix it.
> 
> We need a little better changelog here.  Specifically, *why* does this
> flag fix the problem?   What exactly is going wrong such that this fix
> is needed.
> 
> Does this happen all the time?  only when off-mode is used?  etc.
Yes all time. i2cdetect say "controller timed out" every two adresses.

> Looking closer at how this flag is used in the driver, I think the
> driver's usage of runtime PM is a bit broken.  I'm not sure if it's
> related to this problem, but I'll send a short series in a little bit to
> clean up the runtime PM usage, and get rid of the dev->idle flag which
> duplicates usage counting already provided by runtime PM.
In the isr OMAP_I2C_STAT_NACK set OMAP_I2C_CON_REG to OMAP_I2C_CON_STP,
clearing all other flags. Maybe this is wrong?

On OMAP3 the OMAP_I2C_CON_REG flags are set again in the
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE path of omap_i2c_unidle.
I am not sure if this is also the right place for OMAP4 

Jan



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

* Re: [PATCH v3] ARM: omap4: i2c reset regs postidle
  2011-05-18 13:07               ` Jan Weitzel
@ 2011-05-18 14:09                 ` Kevin Hilman
  2011-06-14 10:05                   ` [RFC] ARM: OMAP2+ i2c NACK without STP Jan Weitzel
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin Hilman @ 2011-05-18 14:09 UTC (permalink / raw)
  To: J.Weitzel
  Cc: linux-omap, b-cousson, andy.green, patches, andy, tony,
	peter.maydell, ben-linux

Jan Weitzel <J.Weitzel@phytec.de> writes:

> Am Dienstag, den 17.05.2011, 16:12 +0200 schrieb Kevin Hilman:
>> Jan Weitzel <j.weitzel@phytec.de> writes:
>> 
>> > omap4430 get i2c timeouts at each access after an NACK message.
>> > OMAP_I2C_FLAG_RESET_REGS_POSTIDLE fix it.
>> 
>> We need a little better changelog here.  Specifically, *why* does this
>> flag fix the problem?   What exactly is going wrong such that this fix
>> is needed.
>> 
>> Does this happen all the time?  only when off-mode is used?  etc.
> Yes all time. i2cdetect say "controller timed out" every two adresses.
>
>> Looking closer at how this flag is used in the driver, I think the
>> driver's usage of runtime PM is a bit broken.  I'm not sure if it's
>> related to this problem, but I'll send a short series in a little bit to
>> clean up the runtime PM usage, and get rid of the dev->idle flag which
>> duplicates usage counting already provided by runtime PM.
> In the isr OMAP_I2C_STAT_NACK set OMAP_I2C_CON_REG to OMAP_I2C_CON_STP,
> clearing all other flags. Maybe this is wrong?
>
> On OMAP3 the OMAP_I2C_CON_REG flags are set again in the
> OMAP_I2C_FLAG_RESET_REGS_POSTIDLE path of omap_i2c_unidle.
> I am not sure if this is also the right place for OMAP4 

Right, and I'm not sure either.  That's why we need a better
explanation/changelog about exactly what is happening and why this is
the right fix.

Kevin

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

* [RFC] ARM: OMAP2+ i2c NACK without STP
  2011-05-18 14:09                 ` Kevin Hilman
@ 2011-06-14 10:05                   ` Jan Weitzel
  2011-06-14 10:24                     ` Tony Lindgren
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-06-14 10:05 UTC (permalink / raw)
  To: linux-omap, b-cousson, andy.green, patches
  Cc: andy, tony, peter.maydell, khilman, Jan Weitzel

On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.

According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
OMAP_I2C_STAT_AL are nearly the same.
Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 drivers/i2c/busses/i2c-omap.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 58a58c7..670f2a2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -836,11 +836,9 @@ complete:
 				~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
 				OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
 
-		if (stat & OMAP_I2C_STAT_NACK) {
+		if (stat & OMAP_I2C_STAT_NACK)
 			err |= OMAP_I2C_STAT_NACK;
-			omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
-					   OMAP_I2C_CON_STP);
-		}
+
 		if (stat & OMAP_I2C_STAT_AL) {
 			dev_err(dev->dev, "Arbitration lost\n");
 			err |= OMAP_I2C_STAT_AL;
-- 
1.7.0.4


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

* Re: [RFC] ARM: OMAP2+ i2c NACK without STP
  2011-06-14 10:05                   ` [RFC] ARM: OMAP2+ i2c NACK without STP Jan Weitzel
@ 2011-06-14 10:24                     ` Tony Lindgren
       [not found]                       ` <20110614102409.GN3352-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2011-06-14 10:24 UTC (permalink / raw)
  To: Jan Weitzel
  Cc: linux-omap, b-cousson, andy.green, patches, andy, peter.maydell, khilman

* Jan Weitzel <j.weitzel@phytec.de> [110614 03:01]:
> On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
> The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
> OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.
> 
> According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
> OMAP_I2C_STAT_AL are nearly the same.
> Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
> Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
> 
> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>

Please resend this to Ben Dooks and linux-i2c list Cc'd and also mention
that this fixes booting on 2430sdp that's been failing for a while now.

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  drivers/i2c/busses/i2c-omap.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 58a58c7..670f2a2 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -836,11 +836,9 @@ complete:
>  				~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
>  				OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
>  
> -		if (stat & OMAP_I2C_STAT_NACK) {
> +		if (stat & OMAP_I2C_STAT_NACK)
>  			err |= OMAP_I2C_STAT_NACK;
> -			omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
> -					   OMAP_I2C_CON_STP);
> -		}
> +
>  		if (stat & OMAP_I2C_STAT_AL) {
>  			dev_err(dev->dev, "Arbitration lost\n");
>  			err |= OMAP_I2C_STAT_AL;
> -- 
> 1.7.0.4
> 

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

* [PATCH] ARM: OMAP2+ i2c NACK without STP
       [not found]                       ` <20110614102409.GN3352-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2011-06-14 10:54                         ` Jan Weitzel
  2011-12-27 14:48                           ` T Krishnamoorthy, Balaji
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Weitzel @ 2011-06-14 10:54 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA, b-cousson-l0cyMroinI0,
	andy.green-QSEj5FYQhm4dnm+yROfE0A,
	patches-QSEj5FYQhm4dnm+yROfE0A
  Cc: andy-/Zus8d0mwwtBDgjK7y7TUQ, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	peter.maydell-QSEj5FYQhm4dnm+yROfE0A, khilman-l0cyMroinI0,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Jan Weitzel

On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.

According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
OMAP_I2C_STAT_AL are nearly the same.
Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
Fixes also booting on 2430sdp.

Signed-off-by: Jan Weitzel <j.weitzel-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
---
 drivers/i2c/busses/i2c-omap.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 58a58c7..670f2a2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -836,11 +836,9 @@ complete:
 				~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
 				OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
 
-		if (stat & OMAP_I2C_STAT_NACK) {
+		if (stat & OMAP_I2C_STAT_NACK)
 			err |= OMAP_I2C_STAT_NACK;
-			omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
-					   OMAP_I2C_CON_STP);
-		}
+
 		if (stat & OMAP_I2C_STAT_AL) {
 			dev_err(dev->dev, "Arbitration lost\n");
 			err |= OMAP_I2C_STAT_AL;
-- 
1.7.0.4

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

* Re: [PATCH] ARM: OMAP2+ i2c NACK without STP
  2011-06-14 10:54                         ` [PATCH] " Jan Weitzel
@ 2011-12-27 14:48                           ` T Krishnamoorthy, Balaji
       [not found]                             ` <CANrkHUZ530H+0+YKy2QJPFbwUQ1zqD=OaSrF6ByTbpx6eU421Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: T Krishnamoorthy, Balaji @ 2011-12-27 14:48 UTC (permalink / raw)
  To: ben-linux, linux-i2c
  Cc: linux-omap, b-cousson, andy.green, patches, andy, tony,
	peter.maydell, khilman, Jan Weitzel, Shubhrajyoti Datta

On Tue, Jun 14, 2011 at 4:24 PM, Jan Weitzel <j.weitzel@phytec.de> wrote:
> On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
> The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
> OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.
>
> According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
> OMAP_I2C_STAT_AL are nearly the same.
> Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
> Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
> Fixes also booting on 2430sdp.
>
> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
> Acked-by: Tony Lindgren <tony@atomide.com>

Acked-by: Balaji T K <balajitk@ti.com>
Can you please queue this patch

This patch has been tested in linux-omap tree
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;a=commit;h=464fca36d98b97ccd05e4f200ab7483d3acc8345

> ---
>  drivers/i2c/busses/i2c-omap.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 58a58c7..670f2a2 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -836,11 +836,9 @@ complete:
>                                ~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
>                                OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
>
> -               if (stat & OMAP_I2C_STAT_NACK) {
> +               if (stat & OMAP_I2C_STAT_NACK)
>                        err |= OMAP_I2C_STAT_NACK;
> -                       omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
> -                                          OMAP_I2C_CON_STP);
> -               }
> +
>                if (stat & OMAP_I2C_STAT_AL) {
>                        dev_err(dev->dev, "Arbitration lost\n");
>                        err |= OMAP_I2C_STAT_AL;
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: OMAP2+ i2c NACK without STP
       [not found]                             ` <CANrkHUZ530H+0+YKy2QJPFbwUQ1zqD=OaSrF6ByTbpx6eU421Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-01-04  0:07                               ` Kevin Hilman
  0 siblings, 0 replies; 15+ messages in thread
From: Kevin Hilman @ 2012-01-04  0:07 UTC (permalink / raw)
  To: T Krishnamoorthy, Balaji
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, b-cousson-l0cyMroinI0,
	andy.green-QSEj5FYQhm4dnm+yROfE0A,
	patches-QSEj5FYQhm4dnm+yROfE0A, andy-/Zus8d0mwwtBDgjK7y7TUQ,
	tony-4v6yS6AI5VpBDgjK7y7TUQ,
	peter.maydell-QSEj5FYQhm4dnm+yROfE0A, Jan Weitzel,
	Shubhrajyoti Datta

"T Krishnamoorthy, Balaji" <balajitk-l0cyMroinI0@public.gmane.org> writes:

> On Tue, Jun 14, 2011 at 4:24 PM, Jan Weitzel <j.weitzel-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org> wrote:
>> On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access.
>> The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP
>> OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message.
>>
>> According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and
>> OMAP_I2C_STAT_AL are nearly the same.
>> Removing the OMAP_I2C_CON_STP part in the isr fix the problem.
>> Tested on OMAP4430 and OMAP3530 (here NACK was not a problem)
>> Fixes also booting on 2430sdp.
>>
>> Signed-off-by: Jan Weitzel <j.weitzel-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
>> Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>
> Acked-by: Balaji T K <balajitk-l0cyMroinI0@public.gmane.org>
> Can you please queue this patch
>
> This patch has been tested in linux-omap tree
> http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;a=commit;h=464fca36d98b97ccd05e4f200ab7483d3acc8345

I have this patch in my queue (branch: for_3.3/i2c/misc), but
unfortunately,  the maintainer has not responded to any of my queries or
pull requests for a couple months now.

I have sent some more off-list queries recently in hopes to get this
moving again.

Kevin

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

end of thread, other threads:[~2012-01-04  0:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 11:47 [PATCH] ARM: omap4: i2c reset regs postidle Jan Weitzel
2011-04-21 12:13 ` Andy Green
2011-05-16  7:56   ` Jan Weitzel
2011-05-16  8:13     ` Andy Green
2011-05-16  9:18       ` [PATCH v2] " Jan Weitzel
2011-05-16 17:16         ` Cousson, Benoit
2011-05-17  9:26           ` [PATCH v3] " Jan Weitzel
2011-05-17 14:12             ` Kevin Hilman
2011-05-18 13:07               ` Jan Weitzel
2011-05-18 14:09                 ` Kevin Hilman
2011-06-14 10:05                   ` [RFC] ARM: OMAP2+ i2c NACK without STP Jan Weitzel
2011-06-14 10:24                     ` Tony Lindgren
     [not found]                       ` <20110614102409.GN3352-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-06-14 10:54                         ` [PATCH] " Jan Weitzel
2011-12-27 14:48                           ` T Krishnamoorthy, Balaji
     [not found]                             ` <CANrkHUZ530H+0+YKy2QJPFbwUQ1zqD=OaSrF6ByTbpx6eU421Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-04  0:07                               ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.