aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-smp.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2012-05-09 11:08:35 -0400
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2012-07-09 09:44:39 -0400
commit247c445c0fbd52c77e497ff5bfcf0dceb8afea8d (patch)
tree3334a9cd1b573fa5d447cf0876e8904d21aef105 /arch/arm/mach-omap2/omap-smp.c
parente17933c2c0173ec19aa2450e4be79b7adfd52224 (diff)
ARM: OMAP5: Add the WakeupGen IP updates
OMAP4 and OMAP5 share same WakeupGen IP with below few udpates on OMAP5. - Additional 32 interrupt support is added w.r.t OMAP4 design. - The AUX CORE boot registers are now made accessible from non-secure SW. - SAR offset are changed and PTMSYNC* registers are removed from SAR. Patch updates the WakeupGen code accordingly. Signed-off-by: R Sricharan <r.sricharan@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap-smp.c')
-rw-r--r--arch/arm/mach-omap2/omap-smp.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index deffbf1c9627..badfe398038e 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -26,6 +26,8 @@
26 26
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <mach/omap-secure.h> 28#include <mach/omap-secure.h>
29#include <mach/omap-wakeupgen.h>
30#include <asm/cputype.h>
29 31
30#include "iomap.h" 32#include "iomap.h"
31#include "common.h" 33#include "common.h"
@@ -73,6 +75,8 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
73{ 75{
74 static struct clockdomain *cpu1_clkdm; 76 static struct clockdomain *cpu1_clkdm;
75 static bool booted; 77 static bool booted;
78 void __iomem *base = omap_get_wakeupgen_base();
79
76 /* 80 /*
77 * Set synchronisation state between this boot processor 81 * Set synchronisation state between this boot processor
78 * and the secondary one 82 * and the secondary one
@@ -85,7 +89,11 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
85 * the AuxCoreBoot1 register is updated with cpu state 89 * the AuxCoreBoot1 register is updated with cpu state
86 * A barrier is added to ensure that write buffer is drained 90 * A barrier is added to ensure that write buffer is drained
87 */ 91 */
88 omap_modify_auxcoreboot0(0x200, 0xfffffdff); 92 if (omap_secure_apis_support())
93 omap_modify_auxcoreboot0(0x200, 0xfffffdff);
94 else
95 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0);
96
89 flush_cache_all(); 97 flush_cache_all();
90 smp_wmb(); 98 smp_wmb();
91 99
@@ -124,13 +132,20 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
124 132
125static void __init wakeup_secondary(void) 133static void __init wakeup_secondary(void)
126{ 134{
135 void __iomem *base = omap_get_wakeupgen_base();
136
127 /* 137 /*
128 * Write the address of secondary startup routine into the 138 * Write the address of secondary startup routine into the
129 * AuxCoreBoot1 where ROM code will jump and start executing 139 * AuxCoreBoot1 where ROM code will jump and start executing
130 * on secondary core once out of WFE 140 * on secondary core once out of WFE
131 * A barrier is added to ensure that write buffer is drained 141 * A barrier is added to ensure that write buffer is drained
132 */ 142 */
133 omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup)); 143 if (omap_secure_apis_support())
144 omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup));
145 else
146 __raw_writel(virt_to_phys(omap5_secondary_startup),
147 base + OMAP_AUX_CORE_BOOT_1);
148
134 smp_wmb(); 149 smp_wmb();
135 150
136 /* 151 /*