aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-realview/realview_eb.c32
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c15
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c32
-rw-r--r--arch/arm/mach-realview/realview_pba8.c15
-rw-r--r--arch/arm/mach-realview/realview_pbx.c32
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c34
-rw-r--r--arch/arm/mach-vexpress/include/mach/ct-ca9x4.h4
7 files changed, 164 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 006765fd204c..422ccd70d5f5 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -31,6 +31,7 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/leds.h> 32#include <asm/leds.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/pmu.h>
34#include <asm/hardware/gic.h> 35#include <asm/hardware/gic.h>
35#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
36#include <asm/localtimer.h> 37#include <asm/localtimer.h>
@@ -292,6 +293,36 @@ static struct resource realview_eb_isp1761_resources[] = {
292 }, 293 },
293}; 294};
294 295
296static struct resource pmu_resources[] = {
297 [0] = {
298 .start = IRQ_EB11MP_PMU_CPU0,
299 .end = IRQ_EB11MP_PMU_CPU0,
300 .flags = IORESOURCE_IRQ,
301 },
302 [1] = {
303 .start = IRQ_EB11MP_PMU_CPU1,
304 .end = IRQ_EB11MP_PMU_CPU1,
305 .flags = IORESOURCE_IRQ,
306 },
307 [2] = {
308 .start = IRQ_EB11MP_PMU_CPU2,
309 .end = IRQ_EB11MP_PMU_CPU2,
310 .flags = IORESOURCE_IRQ,
311 },
312 [3] = {
313 .start = IRQ_EB11MP_PMU_CPU3,
314 .end = IRQ_EB11MP_PMU_CPU3,
315 .flags = IORESOURCE_IRQ,
316 },
317};
318
319static struct platform_device pmu_device = {
320 .name = "arm-pmu",
321 .id = ARM_PMU_DEVICE_CPU,
322 .num_resources = ARRAY_SIZE(pmu_resources),
323 .resource = pmu_resources,
324};
325
295static void __init gic_init_irq(void) 326static void __init gic_init_irq(void)
296{ 327{
297 if (core_tile_eb11mp() || core_tile_a9mp()) { 328 if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -405,6 +436,7 @@ static void __init realview_eb_init(void)
405 * Bits: .... ...0 0111 1001 0000 .... .... .... */ 436 * Bits: .... ...0 0111 1001 0000 .... .... .... */
406 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff); 437 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff);
407#endif 438#endif
439 platform_device_register(&pmu_device);
408 } 440 }
409 441
410 realview_flash_register(&realview_eb_flash_resource, 1); 442 realview_flash_register(&realview_eb_flash_resource, 1);
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 217f7c19551e..96568ebfa2bb 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -31,6 +31,7 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/leds.h> 32#include <asm/leds.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/pmu.h>
34#include <asm/hardware/gic.h> 35#include <asm/hardware/gic.h>
35#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
36 37
@@ -261,6 +262,19 @@ static struct resource realview_pb1176_isp1761_resources[] = {
261 }, 262 },
262}; 263};
263 264
265static struct resource pmu_resource = {
266 .start = IRQ_DC1176_CORE_PMU,
267 .end = IRQ_DC1176_CORE_PMU,
268 .flags = IORESOURCE_IRQ,
269};
270
271static struct platform_device pmu_device = {
272 .name = "arm-pmu",
273 .id = ARM_PMU_DEVICE_CPU,
274 .num_resources = 1,
275 .resource = &pmu_resource,
276};
277
264static void __init gic_init_irq(void) 278static void __init gic_init_irq(void)
265{ 279{
266 /* ARM1176 DevChip GIC, primary */ 280 /* ARM1176 DevChip GIC, primary */
@@ -322,6 +336,7 @@ static void __init realview_pb1176_init(void)
322 realview_eth_register(NULL, realview_pb1176_smsc911x_resources); 336 realview_eth_register(NULL, realview_pb1176_smsc911x_resources);
323 platform_device_register(&realview_i2c_device); 337 platform_device_register(&realview_i2c_device);
324 realview_usb_register(realview_pb1176_isp1761_resources); 338 realview_usb_register(realview_pb1176_isp1761_resources);
339 platform_device_register(&pmu_device);
325 340
326 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 341 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
327 struct amba_device *d = amba_devs[i]; 342 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 9ef2ecc3c098..7fbefbbebaf0 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -31,6 +31,7 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/leds.h> 32#include <asm/leds.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/pmu.h>
34#include <asm/hardware/gic.h> 35#include <asm/hardware/gic.h>
35#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
36#include <asm/localtimer.h> 37#include <asm/localtimer.h>
@@ -258,6 +259,36 @@ static struct resource realview_pb11mp_isp1761_resources[] = {
258 }, 259 },
259}; 260};
260 261
262static struct resource pmu_resources[] = {
263 [0] = {
264 .start = IRQ_TC11MP_PMU_CPU0,
265 .end = IRQ_TC11MP_PMU_CPU0,
266 .flags = IORESOURCE_IRQ,
267 },
268 [1] = {
269 .start = IRQ_TC11MP_PMU_CPU1,
270 .end = IRQ_TC11MP_PMU_CPU1,
271 .flags = IORESOURCE_IRQ,
272 },
273 [2] = {
274 .start = IRQ_TC11MP_PMU_CPU2,
275 .end = IRQ_TC11MP_PMU_CPU2,
276 .flags = IORESOURCE_IRQ,
277 },
278 [3] = {
279 .start = IRQ_TC11MP_PMU_CPU3,
280 .end = IRQ_TC11MP_PMU_CPU3,
281 .flags = IORESOURCE_IRQ,
282 },
283};
284
285static struct platform_device pmu_device = {
286 .name = "arm-pmu",
287 .id = ARM_PMU_DEVICE_CPU,
288 .num_resources = ARRAY_SIZE(pmu_resources),
289 .resource = pmu_resources,
290};
291
261static void __init gic_init_irq(void) 292static void __init gic_init_irq(void)
262{ 293{
263 unsigned int pldctrl; 294 unsigned int pldctrl;
@@ -327,6 +358,7 @@ static void __init realview_pb11mp_init(void)
327 platform_device_register(&realview_i2c_device); 358 platform_device_register(&realview_i2c_device);
328 platform_device_register(&realview_cf_device); 359 platform_device_register(&realview_cf_device);
329 realview_usb_register(realview_pb11mp_isp1761_resources); 360 realview_usb_register(realview_pb11mp_isp1761_resources);
361 platform_device_register(&pmu_device);
330 362
331 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 363 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
332 struct amba_device *d = amba_devs[i]; 364 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 2fab3a6d566b..d3c113b3dfce 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -30,6 +30,7 @@
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/leds.h> 31#include <asm/leds.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/pmu.h>
33#include <asm/hardware/gic.h> 34#include <asm/hardware/gic.h>
34 35
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -248,6 +249,19 @@ static struct resource realview_pba8_isp1761_resources[] = {
248 }, 249 },
249}; 250};
250 251
252static struct resource pmu_resource = {
253 .start = IRQ_PBA8_PMU,
254 .end = IRQ_PBA8_PMU,
255 .flags = IORESOURCE_IRQ,
256};
257
258static struct platform_device pmu_device = {
259 .name = "arm-pmu",
260 .id = ARM_PMU_DEVICE_CPU,
261 .num_resources = 1,
262 .resource = &pmu_resource,
263};
264
251static void __init gic_init_irq(void) 265static void __init gic_init_irq(void)
252{ 266{
253 /* ARM PB-A8 on-board GIC */ 267 /* ARM PB-A8 on-board GIC */
@@ -294,6 +308,7 @@ static void __init realview_pba8_init(void)
294 platform_device_register(&realview_i2c_device); 308 platform_device_register(&realview_i2c_device);
295 platform_device_register(&realview_cf_device); 309 platform_device_register(&realview_cf_device);
296 realview_usb_register(realview_pba8_isp1761_resources); 310 realview_usb_register(realview_pba8_isp1761_resources);
311 platform_device_register(&pmu_device);
297 312
298 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 313 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
299 struct amba_device *d = amba_devs[i]; 314 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index d94857eb0690..a235ba30996b 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -29,6 +29,7 @@
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/leds.h> 30#include <asm/leds.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/pmu.h>
32#include <asm/smp_twd.h> 33#include <asm/smp_twd.h>
33#include <asm/hardware/gic.h> 34#include <asm/hardware/gic.h>
34#include <asm/hardware/cache-l2x0.h> 35#include <asm/hardware/cache-l2x0.h>
@@ -270,6 +271,36 @@ static struct resource realview_pbx_isp1761_resources[] = {
270 }, 271 },
271}; 272};
272 273
274static struct resource pmu_resources[] = {
275 [0] = {
276 .start = IRQ_PBX_PMU_CPU0,
277 .end = IRQ_PBX_PMU_CPU0,
278 .flags = IORESOURCE_IRQ,
279 },
280 [1] = {
281 .start = IRQ_PBX_PMU_CPU1,
282 .end = IRQ_PBX_PMU_CPU1,
283 .flags = IORESOURCE_IRQ,
284 },
285 [2] = {
286 .start = IRQ_PBX_PMU_CPU2,
287 .end = IRQ_PBX_PMU_CPU2,
288 .flags = IORESOURCE_IRQ,
289 },
290 [3] = {
291 .start = IRQ_PBX_PMU_CPU3,
292 .end = IRQ_PBX_PMU_CPU3,
293 .flags = IORESOURCE_IRQ,
294 },
295};
296
297static struct platform_device pmu_device = {
298 .name = "arm-pmu",
299 .id = ARM_PMU_DEVICE_CPU,
300 .num_resources = ARRAY_SIZE(pmu_resources),
301 .resource = pmu_resources,
302};
303
273static void __init gic_init_irq(void) 304static void __init gic_init_irq(void)
274{ 305{
275 /* ARM PBX on-board GIC */ 306 /* ARM PBX on-board GIC */
@@ -354,6 +385,7 @@ static void __init realview_pbx_init(void)
354 /* 16KB way size, 8-way associativity, parity disabled 385 /* 16KB way size, 8-way associativity, parity disabled
355 * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */ 386 * Bits: .. 0 0 0 0 1 00 1 0 1 001 0 000 0 .... .... .... */
356 l2x0_init(l2x0_base, 0x02520000, 0xc0000fff); 387 l2x0_init(l2x0_base, 0x02520000, 0xc0000fff);
388 platform_device_register(&pmu_device);
357 } 389 }
358#endif 390#endif
359 391
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 5a0449c6f50d..e6f73030d5f0 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -4,6 +4,7 @@
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/dma-mapping.h> 6#include <linux/dma-mapping.h>
7#include <linux/platform_device.h>
7#include <linux/amba/bus.h> 8#include <linux/amba/bus.h>
8#include <linux/amba/clcd.h> 9#include <linux/amba/clcd.h>
9 10
@@ -12,6 +13,7 @@
12#include <asm/hardware/cache-l2x0.h> 13#include <asm/hardware/cache-l2x0.h>
13#include <asm/hardware/gic.h> 14#include <asm/hardware/gic.h>
14#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16#include <asm/pmu.h>
15 17
16#include <mach/clkdev.h> 18#include <mach/clkdev.h>
17#include <mach/ct-ca9x4.h> 19#include <mach/ct-ca9x4.h>
@@ -186,6 +188,36 @@ static struct clk_lookup lookups[] = {
186 }, 188 },
187}; 189};
188 190
191static struct resource pmu_resources[] = {
192 [0] = {
193 .start = IRQ_CT_CA9X4_PMU_CPU0,
194 .end = IRQ_CT_CA9X4_PMU_CPU0,
195 .flags = IORESOURCE_IRQ,
196 },
197 [1] = {
198 .start = IRQ_CT_CA9X4_PMU_CPU1,
199 .end = IRQ_CT_CA9X4_PMU_CPU1,
200 .flags = IORESOURCE_IRQ,
201 },
202 [2] = {
203 .start = IRQ_CT_CA9X4_PMU_CPU2,
204 .end = IRQ_CT_CA9X4_PMU_CPU2,
205 .flags = IORESOURCE_IRQ,
206 },
207 [3] = {
208 .start = IRQ_CT_CA9X4_PMU_CPU3,
209 .end = IRQ_CT_CA9X4_PMU_CPU3,
210 .flags = IORESOURCE_IRQ,
211 },
212};
213
214static struct platform_device pmu_device = {
215 .name = "arm-pmu",
216 .id = ARM_PMU_DEVICE_CPU,
217 .num_resources = ARRAY_SIZE(pmu_resources),
218 .resource = pmu_resources,
219};
220
189static void ct_ca9x4_init(void) 221static void ct_ca9x4_init(void)
190{ 222{
191 int i; 223 int i;
@@ -198,6 +230,8 @@ static void ct_ca9x4_init(void)
198 230
199 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++) 231 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
200 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource); 232 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
233
234 platform_device_register(&pmu_device);
201} 235}
202 236
203MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") 237MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
diff --git a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
index 10718e654c6a..8650f04136ef 100644
--- a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
+++ b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
@@ -39,5 +39,9 @@
39#define IRQ_CT_CA9X4_TIMER0 80 39#define IRQ_CT_CA9X4_TIMER0 80
40#define IRQ_CT_CA9X4_TIMER1 81 40#define IRQ_CT_CA9X4_TIMER1 81
41#define IRQ_CT_CA9X4_GPIO { 82 } 41#define IRQ_CT_CA9X4_GPIO { 82 }
42#define IRQ_CT_CA9X4_PMU_CPU0 92
43#define IRQ_CT_CA9X4_PMU_CPU1 93
44#define IRQ_CT_CA9X4_PMU_CPU2 94
45#define IRQ_CT_CA9X4_PMU_CPU3 95
42 46
43#endif 47#endif