From patchwork Thu Apr 7 00:02:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 691411 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3703RAQ026834 for ; Thu, 7 Apr 2011 00:03:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757188Ab1DGAC4 (ORCPT ); Wed, 6 Apr 2011 20:02:56 -0400 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:48029 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757140Ab1DGACy (ORCPT ); Wed, 6 Apr 2011 20:02:54 -0400 Received: from mail-iy0-f181.google.com ([209.85.210.181]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKTZz/LRzRY07XcYaaCur1nb8XC/YrL1X2@postini.com; Wed, 06 Apr 2011 17:02:54 PDT Received: by mail-iy0-f181.google.com with SMTP id 26so2305449iyb.12 for ; Wed, 06 Apr 2011 17:02:53 -0700 (PDT) Received: by 10.43.44.137 with SMTP id ug9mr376326icb.175.1302134573036; Wed, 06 Apr 2011 17:02:53 -0700 (PDT) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id 13sm730256ibo.25.2011.04.06.17.02.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2011 17:02:52 -0700 (PDT) From: Kevin Hilman To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-sh@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Magnus Damm , "Rafael J. Wysocki" , Grant Likely , Greg Kroah-Hartman Subject: [PATCH/RFC 5/6] ARM: use common clock-based runtime PM implementation on SH-mobile & OMAP1 Date: Wed, 6 Apr 2011 17:02:48 -0700 Message-Id: <1302134569-22825-6-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1302134569-22825-1-git-send-email-khilman@ti.com> References: <1302134569-22825-1-git-send-email-khilman@ti.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 07 Apr 2011 00:03:29 +0000 (UTC) Signed-off-by: Kevin Hilman --- arch/arm/mach-omap1/Makefile | 2 +- arch/arm/mach-omap1/pm_runtime.c | 18 ++++++++++++++++++ arch/arm/mach-shmobile/pm_runtime.c | 23 +++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-omap1/pm_runtime.c create mode 100644 arch/arm/mach-shmobile/pm_runtime.c diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 1913c2d..04c60f9 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile @@ -11,7 +11,7 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o # Power Management -obj-$(CONFIG_PM) += pm.o sleep.o +obj-$(CONFIG_PM) += pm.o sleep.o pm_runtime.o # DSP obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o diff --git a/arch/arm/mach-omap1/pm_runtime.c b/arch/arm/mach-omap1/pm_runtime.c new file mode 100644 index 0000000..bbceb64 --- /dev/null +++ b/arch/arm/mach-omap1/pm_runtime.c @@ -0,0 +1,18 @@ +/* + * Runtime PM support code for TI OMAP1 + * + * Copyright (C) 2011 Texas Instruments, Inc. + * Author: Kevin Hilman + * + */ +#include +#include + +#include + +static int __init omap1_pm_runtime_init(void) +{ + pm_runtime_clock_init(); + return 0; +} +core_initcall(omap1_pm_runtime_init); diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c new file mode 100644 index 0000000..edc0fa5 --- /dev/null +++ b/arch/arm/mach-shmobile/pm_runtime.c @@ -0,0 +1,23 @@ +/* + * arch/arm/mach-shmobile/pm_runtime.c + * + * Runtime PM support code for SuperH Mobile ARM + * + * Copyright (C) 2009-2010 Magnus Damm + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include + +#include + +static int __init sh_pm_runtime_init(void) +{ + pm_runtime_clock_init(); + return 0; +} +core_initcall(sh_pm_runtime_init);