linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency
@ 2013-09-18 11:20 Sricharan R
  2013-09-18 12:56 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency\ Nishanth Menon
  2013-09-18 13:24 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Santosh Shilimkar
  0 siblings, 2 replies; 4+ messages in thread
From: Sricharan R @ 2013-09-18 11:20 UTC (permalink / raw)
  To: linux-arm-kernel

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 <santosh.shilimkar@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 arch/arm/mach-omap2/timer.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index e1528a0..fd9238d 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -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;
-- 
1.7.9.5

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

* [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency\
  2013-09-18 11:20 [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Sricharan R
@ 2013-09-18 12:56 ` Nishanth Menon
  2013-09-18 13:24 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Santosh Shilimkar
  1 sibling, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2013-09-18 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 16:50-20130918, Sricharan R wrote:
> 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 <santosh.shilimkar@ti.com>
> Signed-off-by: Sricharan R <r.sricharan@ti.com>

Tested-by: Nishanth Menon <nm@ti.com>
platform: DRA7-evm

> ---
>  arch/arm/mach-omap2/timer.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index e1528a0..fd9238d 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -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;
> -- 
> 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

-- 
Regards,
Nishanth Menon

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

* [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency
  2013-09-18 11:20 [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Sricharan R
  2013-09-18 12:56 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency\ Nishanth Menon
@ 2013-09-18 13:24 ` Santosh Shilimkar
  2013-10-08 21:27   ` Tony Lindgren
  1 sibling, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2013-09-18 13:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 18 September 2013 07:20 AM, Sricharan R wrote:
> 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 <santosh.shilimkar@ti.com>
> Signed-off-by: Sricharan R <r.sricharan@ti.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

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

* [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency
  2013-09-18 13:24 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Santosh Shilimkar
@ 2013-10-08 21:27   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2013-10-08 21:27 UTC (permalink / raw)
  To: linux-arm-kernel

* Santosh Shilimkar <santosh.shilimkar@ti.com> [130918 06:32]:
> On Wednesday 18 September 2013 07:20 AM, Sricharan R wrote:
> > 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 <santosh.shilimkar@ti.com>
> > Signed-off-by: Sricharan R <r.sricharan@ti.com>
> > ---
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

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

Tony

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

end of thread, other threads:[~2013-10-08 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 11:20 [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Sricharan R
2013-09-18 12:56 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency\ Nishanth Menon
2013-09-18 13:24 ` [PATCH] ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency Santosh Shilimkar
2013-10-08 21:27   ` Tony Lindgren

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).