From patchwork Fri Aug 22 14:02:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE56B2057E for ; Fri, 22 Aug 2014 14:05:49 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf83520761pde.7 for ; Fri, 22 Aug 2014 07:05:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=Hq+CgV+2olBNiA6u4DsjftvyJWiGDNx8Wn7bxhUz9BY=; b=aYXwFMwJnUzDKe+PBVddI65MzQ2he76oncNRR144aq8xvKaaqSURY3aIIJoviCNblP ViIIbhZuwluAQ9lh1wvroO9Zaa/dcExjyc+cxH0wN0jMJt3dX73GSS5ySohF2sh75TU4 JUOcvwEb4yNPXLsaTsnuGNeqG0Je9He2KgJDuWGHq3Et3RRdqM1FyTYou9iJo9mj/iTJ nCYE2A6P7a5Dw9aI6G3FuuTFZoldsWASxBnNKbBUyFhS55qxYQdKFqYb9TdnY2FOvNDp fmAg/Obhz32JixTtF2lCgSg3zFsldlBI7bCxvXDA050BuMH5JG5ofEkDCHBAAsA9oSqW S9yw== X-Gm-Message-State: ALoCoQm+uvYoL+gDWPNeK4IFosyQCDgk8rNkXiJDfrOY+p1AfZ9iF/BFmob38G69GFCEjLDgZWTy X-Received: by 10.66.235.66 with SMTP id uk2mr3253161pac.39.1408716349000; Fri, 22 Aug 2014 07:05:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.34 with SMTP id c31ls1209945qge.92.gmail; Fri, 22 Aug 2014 07:05:48 -0700 (PDT) X-Received: by 10.221.24.7 with SMTP id rc7mr195997vcb.54.1408716348802; Fri, 22 Aug 2014 07:05:48 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id rt3si13627979vdb.70.2014.08.22.07.05.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 07:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ij19so12429680vcb.11 for ; Fri, 22 Aug 2014 07:05:48 -0700 (PDT) X-Received: by 10.53.6.132 with SMTP id cu4mr164889vdd.62.1408716348689; Fri, 22 Aug 2014 07:05:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp19747vcb; Fri, 22 Aug 2014 07:05:48 -0700 (PDT) X-Received: by 10.68.202.196 with SMTP id kk4mr6587713pbc.37.1408716346849; Fri, 22 Aug 2014 07:05:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd1si26704696pbb.208.2014.08.22.07.05.46 for ; Fri, 22 Aug 2014 07:05:46 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932197AbaHVOFp (ORCPT + 6 others); Fri, 22 Aug 2014 10:05:45 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:33382 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932446AbaHVODB (ORCPT ); Fri, 22 Aug 2014 10:03:01 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7ME2aFc021509; Fri, 22 Aug 2014 09:02:36 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7ME2Zt6024153; Fri, 22 Aug 2014 09:02:35 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 22 Aug 2014 09:02:35 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7ME2Zh7018528; Fri, 22 Aug 2014 09:02:35 -0500 From: Nishanth Menon To: Santosh Shilimkar , Tony Lindgren , Tero Kristo , Paul Walmsley CC: Kevin Hilman , , , , Keerthy , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Nishanth Menon Subject: [PATCH 04/10] ARM: OMAP5 / DRA7: PM: Enable Mercury retention mode on CPUx powerdomains Date: Fri, 22 Aug 2014 09:02:28 -0500 Message-ID: <1408716154-26101-5-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1408716154-26101-1-git-send-email-nm@ti.com> References: <1408716154-26101-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Santosh Shilimkar In addition to the standard power-management technique, the OMAP5 / DRA7 MPU subsystem also employs an SR3-APG (mercury) power management technology to reduce leakage. It allows for full logic and memories retention on MPU_C0 and MPU_C1 and is controlled by the PRCM_MPU. Only "Fast-mode" is supported on the OMAP5 and DRA7 family of processors. Signed-off-by: Santosh Shilimkar [nm@ti.com: minor consolidation] Signed-off-by: Nishanth Menon --- This has a minor checkpatch warning for aligning with '(', but that when fixed results in over 80 char warning. So choose '(' check instead :D. arch/arm/mach-omap2/omap-mpuss-lowpower.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 63a1dd7..fad6e8c 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c @@ -321,6 +321,21 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) /* + * Enable Mercury Fast HG retention mode by default. + */ +static void enable_mercury_retention_mode(void) +{ + u32 reg; + + reg = omap4_prcm_mpu_read_inst_reg(OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); + /* Enable HG_EN, HG_RAMPUP = fast mode */ + reg |= BIT(24) | BIT(25); + omap4_prcm_mpu_write_inst_reg(reg, OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); +} + +/* * Initialise OMAP4 MPUSS */ int __init omap4_mpuss_init(void) @@ -397,6 +412,7 @@ int __init omap4_mpuss_init(void) cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; } else if (soc_is_omap54xx() || soc_is_dra7xx()) { cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; + enable_mercury_retention_mode(); } return 0;