Skip to contentSkip to conversation

ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency

PATCH New Sricharan R 4 participants 4 messages Sep 18, 2013 – Oct 8, 2013

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

PATCH 1/1 ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency

The real time counter also called master counter, is a free-running counter. It produces the count used by the CPU local timer peripherals in the MPU cluster. The timer counts at a rate of 6.144 MHz.

The ratio registers are missing for a sys-clk of 20MHZ which is used by DRA7 socs. So because of this, the counter was getting wrongly programmed for a sys-clk of 38.4Mhz(default). So adding the ratio registers for 20MHZ sys-clk.

Cc Santosh Shilimkar <[email protected]>
---
 arch/arm/mach-omap2/timer.c |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-omap2/timer.c +4 -0
index e1528a0..fd9238d 100644
@@ -515,6 +515,10 @@ static void __init realtime_counter_init(void)
 		num = 8;
 		den = 25;
 		break;
+	case 20000000:
+		num = 192;
+		den = 625;
+		break;
 	case 2600000:
 		num = 384;
 		den = 1625;
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency\

Quoted 11 lines · Sricharan R

The real time counter also called master counter, is a free-running counter. It produces the count used by the CPU local timer peripherals in the MPU cluster. The timer counts at a rate of 6.144 MHz.

The ratio registers are missing for a sys-clk of 20MHZ which is used by DRA7 socs. So because of this, the counter was getting wrongly programmed for a sys-clk of 38.4Mhz(default). So adding the ratio registers for 20MHZ sys-clk.

Cc Santosh Shilimkar <[email protected]>

platform: DRA7-evm

Quoted 26 lines
---
 arch/arm/mach-omap2/timer.c |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-omap2/timer.c +4 -0
index e1528a0..fd9238d 100644
@@ -515,6 +515,10 @@ static void __init realtime_counter_init(void)
 		num = 8;
 		den = 25;
 		break;
+	case 20000000:
+		num = 192;
+		den = 625;
+		break;
 	case 2600000:
 		num = 384;
 		den = 1625;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw

PATCH 1/1 ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency

In reply to Sricharan R
Quoted 4 lines · Sricharan R

The real time counter also called master counter, is a free-running counter. It produces the count used by the CPU local timer peripherals in the MPU cluster. The timer counts at a rate of 6.144 MHz.

Quoted 8 lines

The ratio registers are missing for a sys-clk of 20MHZ which is used by DRA7 socs. So because of this, the counter was getting wrongly programmed for a sys-clk of 38.4Mhz(default). So adding the ratio registers for 20MHZ sys-clk.

Cc Santosh Shilimkar <[email protected]>

---

maintainer
#3 lore raw

PATCH 1/1 ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency

Quoted 10 lines · Santosh Shilimkar
Quoted 9 lines · Sricharan R

The real time counter also called master counter, is a free-running counter. It produces the count used by the CPU local timer peripherals in the MPU cluster. The timer counts at a rate of 6.144 MHz.

The ratio registers are missing for a sys-clk of 20MHZ which is used by DRA7 socs. So because of this, the counter was getting wrongly programmed for a sys-clk of 38.4Mhz(default). So adding the ratio registers for 20MHZ sys-clk.

Quoted 4 lines
Quoted 3 lines
Cc Santosh Shilimkar <[email protected]>

---

Applying into omap-for-v3.13/soc thanks.

Tony