diff options
author | Kevin Hilman <khilman@ti.com> | 2012-03-06 15:00:25 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-03-06 16:21:37 -0500 |
commit | bb1dbe7cfd62e35f6f25e94729458b9047e3f555 (patch) | |
tree | 083974cfd4e2de716355872e7de0fb806f5a6cae /arch/arm/mach-omap2/omap-wakeupgen.c | |
parent | 1f3b372b3c1018fad960015cbfdf8de9251d14db (diff) |
ARM: OMAP2+: PM: fix wakeupgen warning when hotplug disabled
When CONFIG_HOTPLUG_CPU=n, there are unused functions in wakeupgen:
arch/arm/mach-omap2/omap-wakeupgen.c:181: warning: 'wakeupgen_irqmask_all' defined but not used
Fix this by moving all the functions only used when CONFIG_HOTPLUG_CPU=y
together and wrapping in an #ifdef.
No functional changes.
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap-wakeupgen.c')
-rw-r--r-- | arch/arm/mach-omap2/omap-wakeupgen.c | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index d3d8971d7f30..42cd7fb52414 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | static void __iomem *wakeupgen_base; | 44 | static void __iomem *wakeupgen_base; |
45 | static void __iomem *sar_base; | 45 | static void __iomem *sar_base; |
46 | static DEFINE_PER_CPU(u32 [NR_REG_BANKS], irqmasks); | ||
47 | static DEFINE_SPINLOCK(wakeupgen_lock); | 46 | static DEFINE_SPINLOCK(wakeupgen_lock); |
48 | static unsigned int irq_target_cpu[NR_IRQS]; | 47 | static unsigned int irq_target_cpu[NR_IRQS]; |
49 | 48 | ||
@@ -67,14 +66,6 @@ static inline void sar_writel(u32 val, u32 offset, u8 idx) | |||
67 | __raw_writel(val, sar_base + offset + (idx * 4)); | 66 | __raw_writel(val, sar_base + offset + (idx * 4)); |
68 | } | 67 | } |
69 | 68 | ||
70 | static void _wakeupgen_set_all(unsigned int cpu, unsigned int reg) | ||
71 | { | ||
72 | u8 i; | ||
73 | |||
74 | for (i = 0; i < NR_REG_BANKS; i++) | ||
75 | wakeupgen_writel(reg, i, cpu); | ||
76 | } | ||
77 | |||
78 | static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index) | 69 | static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index) |
79 | { | 70 | { |
80 | unsigned int spi_irq; | 71 | unsigned int spi_irq; |
@@ -130,22 +121,6 @@ static void _wakeupgen_set(unsigned int irq, unsigned int cpu) | |||
130 | wakeupgen_writel(val, i, cpu); | 121 | wakeupgen_writel(val, i, cpu); |
131 | } | 122 | } |
132 | 123 | ||
133 | static void _wakeupgen_save_masks(unsigned int cpu) | ||
134 | { | ||
135 | u8 i; | ||
136 | |||
137 | for (i = 0; i < NR_REG_BANKS; i++) | ||
138 | per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu); | ||
139 | } | ||
140 | |||
141 | static void _wakeupgen_restore_masks(unsigned int cpu) | ||
142 | { | ||
143 | u8 i; | ||
144 | |||
145 | for (i = 0; i < NR_REG_BANKS; i++) | ||
146 | wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu); | ||
147 | } | ||
148 | |||
149 | /* | 124 | /* |
150 | * Architecture specific Mask extension | 125 | * Architecture specific Mask extension |
151 | */ | 126 | */ |
@@ -170,6 +145,33 @@ static void wakeupgen_unmask(struct irq_data *d) | |||
170 | spin_unlock_irqrestore(&wakeupgen_lock, flags); | 145 | spin_unlock_irqrestore(&wakeupgen_lock, flags); |
171 | } | 146 | } |
172 | 147 | ||
148 | #ifdef CONFIG_HOTPLUG_CPU | ||
149 | static DEFINE_PER_CPU(u32 [NR_REG_BANKS], irqmasks); | ||
150 | |||
151 | static void _wakeupgen_save_masks(unsigned int cpu) | ||
152 | { | ||
153 | u8 i; | ||
154 | |||
155 | for (i = 0; i < NR_REG_BANKS; i++) | ||
156 | per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu); | ||
157 | } | ||
158 | |||
159 | static void _wakeupgen_restore_masks(unsigned int cpu) | ||
160 | { | ||
161 | u8 i; | ||
162 | |||
163 | for (i = 0; i < NR_REG_BANKS; i++) | ||
164 | wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu); | ||
165 | } | ||
166 | |||
167 | static void _wakeupgen_set_all(unsigned int cpu, unsigned int reg) | ||
168 | { | ||
169 | u8 i; | ||
170 | |||
171 | for (i = 0; i < NR_REG_BANKS; i++) | ||
172 | wakeupgen_writel(reg, i, cpu); | ||
173 | } | ||
174 | |||
173 | /* | 175 | /* |
174 | * Mask or unmask all interrupts on given CPU. | 176 | * Mask or unmask all interrupts on given CPU. |
175 | * 0 = Mask all interrupts on the 'cpu' | 177 | * 0 = Mask all interrupts on the 'cpu' |
@@ -191,6 +193,7 @@ static void wakeupgen_irqmask_all(unsigned int cpu, unsigned int set) | |||
191 | } | 193 | } |
192 | spin_unlock_irqrestore(&wakeupgen_lock, flags); | 194 | spin_unlock_irqrestore(&wakeupgen_lock, flags); |
193 | } | 195 | } |
196 | #endif | ||
194 | 197 | ||
195 | #ifdef CONFIG_CPU_PM | 198 | #ifdef CONFIG_CPU_PM |
196 | /* | 199 | /* |