Skip to content

Commit

Permalink
ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit)
Browse files Browse the repository at this point in the history
This patch enables PMU(Performance Monitoring Unit) for sh73a0.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Tetsuyuki Kobayashi authored and Simon Horman committed Sep 11, 2012
1 parent 051f1b1 commit f23f5be
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/configs/kzm9g_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CONFIG_NAMESPACES=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
Expand Down
21 changes: 21 additions & 0 deletions arch/arm/mach-shmobile/setup-sh73a0.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,26 @@ static struct platform_device mpdma0_device = {
},
};

static struct resource pmu_resources[] = {
[0] = {
.start = gic_spi(55),
.end = gic_spi(55),
.flags = IORESOURCE_IRQ,
},
[1] = {
.start = gic_spi(56),
.end = gic_spi(56),
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device pmu_device = {
.name = "arm-pmu",
.id = -1,
.num_resources = ARRAY_SIZE(pmu_resources),
.resource = pmu_resources,
};

static struct platform_device *sh73a0_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
Expand All @@ -757,6 +777,7 @@ static struct platform_device *sh73a0_late_devices[] __initdata = {
&i2c4_device,
&dma0_device,
&mpdma0_device,
&pmu_device,
};

#define SRCR2 0xe61580b0
Expand Down

0 comments on commit f23f5be

Please sign in to comment.