Commit e433d4440bf7dd5955a4616cfb9bffd1ec6ab839

Authored by Tetsuyuki Kobayashi
Committed by Simon Horman
1 parent f23f5be0ed

ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit)

This patch enables PMU(Performance Monitoring Unit) for emev2.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

Showing 2 changed files with 22 additions and 0 deletions Side-by-side Diff

arch/arm/configs/kzm9d_defconfig
... ... @@ -8,6 +8,7 @@
8 8 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
9 9 CONFIG_SYSCTL_SYSCALL=y
10 10 CONFIG_EMBEDDED=y
  11 +CONFIG_PERF_EVENTS=y
11 12 CONFIG_SLAB=y
12 13 # CONFIG_BLK_DEV_BSG is not set
13 14 # CONFIG_IOSCHED_DEADLINE is not set
arch/arm/mach-shmobile/setup-emev2.c
... ... @@ -356,6 +356,26 @@
356 356 },
357 357 };
358 358  
  359 +static struct resource pmu_resources[] = {
  360 + [0] = {
  361 + .start = 152,
  362 + .end = 152,
  363 + .flags = IORESOURCE_IRQ,
  364 + },
  365 + [1] = {
  366 + .start = 153,
  367 + .end = 153,
  368 + .flags = IORESOURCE_IRQ,
  369 + },
  370 +};
  371 +
  372 +static struct platform_device pmu_device = {
  373 + .name = "arm-pmu",
  374 + .id = -1,
  375 + .num_resources = ARRAY_SIZE(pmu_resources),
  376 + .resource = pmu_resources,
  377 +};
  378 +
359 379 static struct platform_device *emev2_early_devices[] __initdata = {
360 380 &uart0_device,
361 381 &uart1_device,
... ... @@ -370,6 +390,7 @@
370 390 &gio2_device,
371 391 &gio3_device,
372 392 &gio4_device,
  393 + &pmu_device,
373 394 };
374 395  
375 396 void __init emev2_add_standard_devices(void)