From patchwork Fri Sep 14 04:27:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 1455321 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AB787402E1 for ; Fri, 14 Sep 2012 04:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430Ab2INE11 (ORCPT ); Fri, 14 Sep 2012 00:27:27 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:40937 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702Ab2INE10 (ORCPT ); Fri, 14 Sep 2012 00:27:26 -0400 Received: by pbbrr13 with SMTP id rr13so5016535pbb.19 for ; Thu, 13 Sep 2012 21:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=nhLct1gi5wFQG8yYywQCe3egXRmScE+De8A2pGZc2gM=; b=eDXY6yK3jOyZQyvAMu0HRWUyvcdc1EXPs4IYp1pR1lK5zb6CPE+9Vp5/iUshvpWQ9D BfB4fND7KuuQDVwJW6sVabB3GhmhocVMr1/OY7vu/mAJ6lpT2MFCHzhATH4PvMLzR3YY LcoF7VSfLG4Kwz1Y8IxEKBmhNpCKK02GWYtd+5mhjxuM0cokE1gIzYXsE9Ah0w0orNeN GfoAkHX/v7nBUa3MzrqZsVl4Qca4UYMjGkXaZGH3LVC5LCbvpAD86UC3yni7LFfnbWIK vXFn/4SLWcYqj3ziRY1YMu87AlTxsX9oKsE9wFKi6/BU6VpHQrSd6IxXlE5OFff3sf4P KH2g== Received: by 10.68.241.228 with SMTP id wl4mr3334150pbc.51.1347596845650; Thu, 13 Sep 2012 21:27:25 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id pj8sm372236pbb.60.2012.09.13.21.27.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 21:27:24 -0700 (PDT) From: Nobuhiro Iwamatsu To: horms@verge.net.au Cc: linux-sh@vger.kernel.org, Nobuhiro Iwamatsu Subject: [PATCH] ARM: shmobile: r8a7740: Enable PMU Date: Fri, 14 Sep 2012 13:27:13 +0900 Message-Id: <1347596833-19064-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQnXyXj+7McU8tdj5+CxzhoVMuiDjblLw634fEh0xRea0iO7KvvyZ1hpz3CSrqyFKSiX7fBp Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org This patch enables PMU for r8a7740. Signed-off-by: Nobuhiro Iwamatsu --- arch/arm/configs/armadillo800eva_defconfig | 1 + arch/arm/mach-shmobile/setup-r8a7740.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index 62861bd..d952f62 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig @@ -7,6 +7,7 @@ CONFIG_LOG_BUF_SHIFT=16 # CONFIG_IPC_NS is not set # CONFIG_PID_NS is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_PERF_EVENTS=y CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 78948a9..d3d6295 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -590,6 +590,21 @@ static struct platform_device i2c1_device = { .num_resources = ARRAY_SIZE(i2c1_resources), }; +static struct resource pmu_resources[] = { + [0] = { + .start = evt2irq(0x19a0), + .end = evt2irq(0x19a0), + .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 *r8a7740_late_devices[] __initdata = { &i2c0_device, &i2c1_device, @@ -597,6 +612,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = { &dma1_device, &dma2_device, &usb_dma_device, + &pmu_device, }; /*