Thread (69 messages) 69 messages, 12 authors, 2011-09-17
STALE5377d
Revisions (14)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 current
  5. v2 [diff vs current]
  6. v3 [diff vs current]
  7. v3 [diff vs current]
  8. v3 [diff vs current]
  9. v3 [diff vs current]
  10. v3 [diff vs current]
  11. v3 [diff vs current]
  12. v3 [diff vs current]
  13. v4 [diff vs current]
  14. v5 [diff vs current]

[PATCH 4/6] arm/imx6q: add smp and cpu hotplug support

From: Shilimkar, Santosh <hidden>
Date: 2011-09-07 05:08:10

On Wed, Sep 7, 2011 at 10:11 AM, Shawn Guo [off-list ref] wrote:
On Tue, Sep 06, 2011 at 08:53:07PM +0200, Arnd Bergmann wrote:
quoted
On Tuesday 06 September 2011 17:58:38 Shawn Guo wrote:
quoted
It adds smp and cpu hotplug support for imx6q.
+static u32 twd_saved_regs[4];
+static int twd_irq;
+
+/*
+ * Resuming from ARM Dormant/Shutdown mode, the boot procedure will
+ * re-setup local timer for secondary cores. ?For primary core, it
+ * has to take care of itself with the following pair of functions
+ * during suspend/resume.
+ */
+void imx_local_timer_pre_suspend(void)
+{
+ ? twd_saved_regs[0] = __raw_readl(twd_base + TWD_TIMER_LOAD);
+ ? twd_saved_regs[1] = __raw_readl(twd_base + TWD_TIMER_COUNTER);
+ ? twd_saved_regs[2] = __raw_readl(twd_base + TWD_TIMER_CONTROL);
+ ? twd_saved_regs[3] = __raw_readl(twd_base + TWD_TIMER_INTSTAT);
+}
+
+void imx_local_timer_post_resume(void)
+{
+ ? __raw_writel(twd_saved_regs[0], twd_base + TWD_TIMER_LOAD);
+ ? __raw_writel(twd_saved_regs[1], twd_base + TWD_TIMER_COUNTER);
+ ? __raw_writel(twd_saved_regs[2], twd_base + TWD_TIMER_CONTROL);
+ ? __raw_writel(twd_saved_regs[3], twd_base + TWD_TIMER_INTSTAT);
+
+ ? gic_enable_ppi(twd_irq);
+}
readl_relaxed()?
Ok. ?You get the best judgement on this.
You don't have to save local timer registers any more. The local timer
is always re-configued and this is already handled in common kernel.

You can drop above change and test your patches. I am sure they will
still work.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help