linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit)
@ 2012-09-05  2:48 Tetsuyuki Kobayshi
  2012-09-05  5:45 ` Paul Mundt
  0 siblings, 1 reply; 3+ messages in thread
From: Tetsuyuki Kobayshi @ 2012-09-05  2:48 UTC (permalink / raw)
  To: linux-sh

From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>

This patch enables PMU(Performance Monitoring Unit) for sh73a0 when compiled with CONFIG_HW_PERF_EVENTS.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
 arch/arm/mach-shmobile/setup-sh73a0.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index d230af6..1c96d53 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -39,6 +39,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/pmu.h>
 
 static struct map_desc sh73a0_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
@@ -734,6 +735,28 @@ static struct platform_device mpdma0_device = {
 	},
 };
 
+#ifdef CONFIG_HW_PERF_EVENTS
+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		= ARM_PMU_DEVICE_CPU,
+	.num_resources	= ARRAY_SIZE(pmu_resources),
+	.resource	= pmu_resources,
+};
+#endif
+
 static struct platform_device *sh73a0_early_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
@@ -757,6 +780,9 @@ static struct platform_device *sh73a0_late_devices[] __initdata = {
 	&i2c4_device,
 	&dma0_device,
 	&mpdma0_device,
+#ifdef CONFIG_HW_PERF_EVENTS
+	&pmu_device,
+#endif
 };
 
 #define SRCR2          0xe61580b0
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [GIT] Renesas ARM-based SoC: pmu/cleanup for 3.7
@ 2012-09-11  8:05 Simon Horman
  2012-09-11  8:05 ` [PATCH 1/2] ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit) Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2012-09-11  8:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Will,

please consider the following changes from Kobayashi-san
for the pmu/cleanup branch.

----------------------------------------------------------------
The following changes since commit 051f1b13144dd8553d5a5104dde94c7263ae3ba7:

  ARM: perf: move irq registration into pmu implementation (2012-08-23 11:35:52 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git pmu/cleanup

for you to fetch changes up to e433d4440bf7dd5955a4616cfb9bffd1ec6ab839:

  ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit) (2012-09-11 16:27:41 +0900)

----------------------------------------------------------------
Tetsuyuki Kobayashi (2):
      ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit)
      ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit)

 arch/arm/configs/kzm9d_defconfig      |    1 +
 arch/arm/configs/kzm9g_defconfig      |    1 +
 arch/arm/mach-shmobile/setup-emev2.c  |   21 +++++++++++++++++++++
 arch/arm/mach-shmobile/setup-sh73a0.c |   21 +++++++++++++++++++++
 4 files changed, 44 insertions(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-11  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05  2:48 [PATCH 1/2] ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit) Tetsuyuki Kobayshi
2012-09-05  5:45 ` Paul Mundt
  -- strict thread matches above, loose matches on Subject: below --
2012-09-11  8:05 [GIT] Renesas ARM-based SoC: pmu/cleanup for 3.7 Simon Horman
2012-09-11  8:05 ` [PATCH 1/2] ARM: shmobile: sh73a0: enable PMU(Performance Monitoring Unit) Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).