Skip to contentSkip to conversation

Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

PATCH New rick at efn.org 3 participants 5 messages May 16, 2011 – Jun 17, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

---
 arch/arm/cpu/armv7/omap-common/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/arch/arm/cpu/armv7/omap-common/timer.c
index 9beebb1..3c9d488 100644

arch/arm/cpu/armv7/omap-common/timer.c +0 -0
@@ -44,7 +44,7 @@ static struct gptimer *timer_base = (struct gptimer

*)CONFIG_SYS_TIMERBASE;
*/

#define TIMER_CLOCK (V_SCLK / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL 0xffffffff
+#define TIMER_LOAD_VAL 0 /* counter starts from 0 on reload */

int timer_init(void)
{

Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/1 Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

Quoted 11 lines · rick at efn.org
---
 arch/arm/cpu/armv7/omap-common/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/timer.c +0 -0
index 9beebb1..3c9d488 100644

arch/arm/cpu/armv7/omap-common/timer.c static struct gptimer *timer_base = (struct gptimer · line 48

Quoted 6 lines
arch/arm/cpu/armv7/omap-common/timer.c +1 -1
@@ -44,7 +44,7 @@ static struct gptimer *timer_base = (struct gptimer
 *)CONFIG_SYS_TIMERBASE;
  */
 
 #define TIMER_CLOCK	(V_SCLK / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL	0xffffffff
+#define TIMER_LOAD_VAL	0  /* counter starts from 0 on reload */

Has this been tested?
If yes, then on what hardware (board)?
Is it only AM SoCs or DM too?

Signature · 2 lines
Regards,
Igor.
#2 lore raw

PATCH 1/1 Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

Hi Igor,

Yes, I have tested this on the AM3715 but not on any other parts.

Cheers,

Rick

Quoted 31 lines · rick at efn.org
Quoted 12 lines
---
 arch/arm/cpu/armv7/omap-common/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/timer.c +0 -0
index 9beebb1..3c9d488 100644

arch/arm/cpu/armv7/omap-common/timer.c static struct gptimer *timer_base = (struct gptimer · line 48

Quoted 6 lines
arch/arm/cpu/armv7/omap-common/timer.c +1 -1
@@ -44,7 +44,7 @@ static struct gptimer *timer_base = (struct gptimer
 *)CONFIG_SYS_TIMERBASE;
  */
 
 #define TIMER_CLOCK	(V_SCLK / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL	0xffffffff
+#define TIMER_LOAD_VAL	0  /* counter starts from 0 on reload */

Has this been tested?
If yes, then on what hardware (board)?
Is it only AM SoCs or DM too?

Signature · 2 lines
Regards,
Igor.
#3 lore raw

PATCH 1/1 Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

Hi Rick,

I've been browsing through the mailing list and found a similar patch [1] sent about a half a year ago by: John Rigby <[email protected]> It has neither been accepted, nor rejected.

It looks like John's patch is a bit cleaner and has a more complete commit message. I can test it on DM3730/AM3703/OMAP3530 and some time later on AM3517.
Can you please, also test it on your available hardware?

Sandeep,
can you please, take a look at this?

[1] http://patchwork.ozlabs.org/patch/76803/

Quoted 38 lines · Rick Bronson

Hi Igor,

Yes, I have tested this on the AM3715 but not on any other parts.

Cheers,

Rick

Quoted 30 lines · rick at efn.org
Quoted 12 lines
---
 arch/arm/cpu/armv7/omap-common/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/timer.c +0 -0
index 9beebb1..3c9d488 100644

arch/arm/cpu/armv7/omap-common/timer.c static struct gptimer *timer_base = (struct gptimer · line 48

Quoted 6 lines
arch/arm/cpu/armv7/omap-common/timer.c +1 -1
@@ -44,7 +44,7 @@ static struct gptimer *timer_base = (struct gptimer
 *)CONFIG_SYS_TIMERBASE;
  */
 
 #define TIMER_CLOCK	(V_SCLK / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL	0xffffffff
+#define TIMER_LOAD_VAL	0  /* counter starts from 0 on reload */

Has this been tested?
If yes, then on what hardware (board)?
Is it only AM SoCs or DM too?

Signature · 2 lines
Regards,
Igor.
Signature · 2 lines
Regards,
Igor.
#4 lore raw

PATCH 1/1 Fix hang when entering udelay after GPTIMER2 overflows (about 22 minutes on AM37x)

Hi Igor,

Yes, I agree. John's patch is better.

I'll try to test it this weekend.

If you don't hear from me, ping me on Monday.

Thanks,

Rick

Quoted 60 lines

Hi Rick,

I've been browsing through the mailing list and found a similar patch [1] sent about a half a year ago by: John Rigby <[email protected]> It has neither been accepted, nor rejected.

It looks like John's patch is a bit cleaner and has a more complete commit message. I can test it on DM3730/AM3703/OMAP3530 and some time later on AM3517.
Can you please, also test it on your available hardware?

Sandeep,
can you please, take a look at this?

[1] http://patchwork.ozlabs.org/patch/76803/

Quoted 38 lines · Rick Bronson

Hi Igor,

Yes, I have tested this on the AM3715 but not on any other parts.

Cheers,

Rick

Quoted 30 lines · rick at efn.org
Quoted 12 lines
---
 arch/arm/cpu/armv7/omap-common/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/timer.c +0 -0
index 9beebb1..3c9d488 100644

arch/arm/cpu/armv7/omap-common/timer.c static struct gptimer *timer_base = (struct gptimer · line 48

Quoted 6 lines
arch/arm/cpu/armv7/omap-common/timer.c +1 -1
@@ -44,7 +44,7 @@ static struct gptimer *timer_base = (struct gptimer
 *)CONFIG_SYS_TIMERBASE;
  */
 
 #define TIMER_CLOCK	(V_SCLK / (2 << CONFIG_SYS_PTV))
-#define TIMER_LOAD_VAL	0xffffffff
+#define TIMER_LOAD_VAL	0  /* counter starts from 0 on reload */

Has this been tested?
If yes, then on what hardware (board)?
Is it only AM SoCs or DM too?

Signature · 2 lines
Regards,
Igor.
Signature · 2 lines
Regards,
Igor.