Skip to contentSkip to conversation

adeos-ipipe-2.6.30-arm-1.15-01.patch: Fix hang on 'Calibrating delay loop...' on S3C24xx

PATCH In review Fabian Godehardt 2 participants 4 messages Apr 27, 2010 – Apr 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 adeos-ipipe-2.6.30-arm-1.15-01.patch: Fix hang on 'Calibrating delay loop...' on S3C24xx

This patch should fix the hang during 'Calibrating delay loop...' on S3C24xx based kernels. Problem is that some machines do not have an externel TCLK signal so the timer doesn't start running.

This patch may also be of interest for the 2.6.28 and 2.6.29 patches.

Tested with a S3C2440 cpu.

---
 .../patches/adeos-ipipe-2.6.30-arm-1.15-01.patch   |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-01.patch +3 -14
index 5760e2e..2358cfb 100644
@@ -6925,18 +6925,7 @@ index 3b27b29..8e6e479 100644
  		__raw_writel(tcfg1, S3C2410_TCFG1);
  	} else {
  		unsigned long pclk;
-@@ -204,12 +254,25 @@ static void s3c2410_timer_setup (void)
- 		clk_set_parent(tin, tdiv);
- 
- 		tcnt = clk_get_rate(tin) / HZ;
-+
-+		tcfg1 = __raw_readl(S3C2410_TCFG1);
-+		tcfg1 &= ~(S3C2410_TCFG1_MUX4_MASK | S3C2410_TCFG1_MUX3_MASK);
-+		tcfg1 |= (S3C2410_TCFG1_MUX4_TCLK1 | S3C2410_TCFG1_MUX3_TCLK1);
-+		__raw_writel(tcfg1, S3C2410_TCFG1);
- 	}
- 
- 	tcon = __raw_readl(S3C2410_TCON);
+@@ -210,6 +260,14 @@ static void s3c2410_timer_setup (void)
  	tcfg0 = __raw_readl(S3C2410_TCFG0);
  	tcfg1 = __raw_readl(S3C2410_TCFG1);
  
@@ -6951,7 +6940,7 @@ index 3b27b29..8e6e479 100644
  	/* timers reload after counting zero, so reduce the count by 1 */
  
  	tcnt--;
-@@ -226,23 +289,37 @@ static void s3c2410_timer_setup (void)
+@@ -226,23 +284,37 @@ static void s3c2410_timer_setup (void)
  	__raw_writel(tcfg1, S3C2410_TCFG1);
  	__raw_writel(tcfg0, S3C2410_TCFG0);
  
@@ -7000,7 +6989,7 @@ index 3b27b29..8e6e479 100644
  }
  
  static void __init s3c2410_timer_resources(void)
-@@ -283,3 +360,58 @@ struct sys_timer s3c24xx_timer = {
+@@ -283,3 +355,58 @@ struct sys_timer s3c24xx_timer = {
  	.offset		= s3c2410_gettimeoffset,
  	.resume		= s3c2410_timer_setup
  };
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 7 lines · Fabian Godehardt

This patch should fix the hang during 'Calibrating delay loop...' on S3C24xx based kernels. Problem is that some machines do not have an externel TCLK signal so the timer doesn't start running.

This patch may also be of interest for the 2.6.28 and 2.6.29 patches.

Tested with a S3C2440 cpu.

Thanks a lot. Patches for 2.6.31 and 2.6.33 should be out soon, and they will include that patch too.

Signature · 1 line
					    Gilles.
#2 lore raw
In reply to Fabian Godehardt
Quoted 9 lines · Fabian Godehardt

This patch should fix the hang during 'Calibrating delay loop...' on S3C24xx based kernels. Problem is that some machines do not have an externel TCLK signal so the timer doesn't start running.

This patch may also be of interest for the 2.6.28 and 2.6.29 patches.

Tested with a S3C2440 cpu.

I guess you imagine that I am not going to change the I-pipe patch in Xenomai tree without changing its version number, so, could you send me again this change as a patch against the I-pipe tree?

Signature · 1 line
					    Gilles.
#3 lore raw

PATCH 1/1 adeos-ipipe-2.6.30-arm-1.15-01: Fix hang on 'Calibrating delay loop...' on S3C24xx

This patch should fix the hang during 'Calibrating delay loop...' on S3C24xx based kernels. Problem is that some machines do not have an externel TCLK signal so the timer doesn't start to run.

Tested with a S3C2440 cpu.

---
 arch/arm/plat-s3c/time.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
arch/arm/plat-s3c/time.c +0 -5
index 8e6e479..976fe03 100644
@@ -254,11 +254,6 @@ static void s3c2410_timer_setup (void)
 		clk_set_parent(tin, tdiv);
 
 		tcnt = clk_get_rate(tin) / HZ;
-
-		tcfg1 = __raw_readl(S3C2410_TCFG1);
-		tcfg1 &= ~(S3C2410_TCFG1_MUX4_MASK | S3C2410_TCFG1_MUX3_MASK);
-		tcfg1 |= (S3C2410_TCFG1_MUX4_TCLK1 | S3C2410_TCFG1_MUX3_TCLK1);
-		__raw_writel(tcfg1, S3C2410_TCFG1);
 	}
 
 	tcon = __raw_readl(S3C2410_TCON);
Signature · 1 line
1.6.6.1