Re: [PATCH V5] ARM: OMAP5/DRA7: realtime_counter: Configure CNTFRQ register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tony Lindgren <tony@xxxxxxxxxxx> [131010 10:23]:
> * Santosh Shilimkar <santosh.shilimkar@xxxxxx> [131010 06:20]:
> > On Thursday 10 October 2013 03:43 AM, Sricharan R wrote:
> > > From: R Sricharan <r.sricharan@xxxxxx>
> > > 
> > > The realtime counter called master counter, produces the count
> > > used by the private timer peripherals in the MPU_CLUSTER. The
> > > CNTFRQ per cpu register is used to denote the frequency of the counter.
> > > Currently the frequency value is passed from the
> > > DT file, but this is not scalable when we have other non-DT guest
> > > OS. This register must be set to the right value by the
> > > secure rom code. Setting this register helps in propagating the right
> > > frequency value across OSes.
> > > 
> > > More discussions and the reason for adding this in a non-DT
> > > way can be seen from below.
> > > http://www.mail-archive.com/linux-omap@xxxxxxxxxxxxxxx/msg93832.html
> > > 
> > > So configuring this secure register for all the cpus here.
> > > 
> > > Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> > > Cc: Nishanth Menon <nm@xxxxxx>
> > > Cc: Rajendra Nayak <rnayak@xxxxxx>
> > > Cc: Marc Zyngier <marc.zyngier@xxxxxxx>
> > > Cc: Mark Rutland <mark.rutland@xxxxxxx>
> > > Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> > > Tested-by: Nishanth Menon <nm@xxxxxx>
> > > Acked-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> > > Signed-off-by: Sricharan R <r.sricharan@xxxxxx>
> > > ---
> > >  [V5] Removed the use of extern variable in omap-smp.c
> > >       as per suggestion from Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> > > 
> > Thanks for the updates Sricharan. Looks fine now.
> > 
> > Tony, Can you apply this version if you are fine with it.
> 
> Yes thanks looks good to me now. Applying into omap-for-v3.13/soc.

Grr, had to apply the following fix on top of this for some configs.

Tony

8< ---------------------------

From: Tony Lindgren <tony@xxxxxxxxxxx>
Date: Fri, 11 Oct 2013 17:28:04 -0700
Subject: [PATCH] ARM: OMAP2+: Fix build error for realtime counter init if not enabled

Otherwise we can get an error with some configs:

arch/arm/mach-omap2/timer.c:73: undefined reference to `omap_smc1'

Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -66,12 +66,15 @@
 
 static struct omap_dm_timer clkev;
 static struct clock_event_device clockevent_gpt;
+
+#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
 static unsigned long arch_timer_freq;
 
 void set_cntfreq(void)
 {
 	omap_smc1(OMAP5_DRA7_MON_SET_CNTFRQ_INDEX, arch_timer_freq);
 }
+#endif
 
 static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux