From patchwork Tue Oct 21 20:22: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: 39227 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C6E41202DB for ; Tue, 21 Oct 2014 20:23:31 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf1406172wiv.2 for ; Tue, 21 Oct 2014 13:23:30 -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=c6gF3enuOuzNCck2ggR6UPlMfZcLiIwbNV+x9FAFcuM=; b=AjmVbJIPZ2bqlrrOS9sQevkOO1bP60g2iGhezbYvnn/nHOoNYzBou7lCkbTwYn01aO O51/jiOvLMvFxoqrfctW5qwHPNUMQmu6okPWpSGktxrdtdNOr5zFRBMvz57iB5a+qgro cFiYcpuaaK48kxTzWMJpsoWqofFV10EC73eXl4fGhmKUZdPnPlIIKym4I7W3Ycd7BYLN tQzsx/jsXvxhmdYGyVjg6uyjV6xMyKSo5Viht+uCUhfHIOuqO1A8x3jR6VW/DeT0eVBL RqOcauuP6OwK1uX9033YOFlrA7V8m6b68eHkQACJzQKgiCcmWuz3v4Zmg4gx7WApcnVJ aAzQ== X-Gm-Message-State: ALoCoQlJsuX0JdSfYTskAFNgQKfv8rS5w+9CsOvGKy94p1i2tw8ClrrWyxJMO2a1DMOfPyyJe+U3 X-Received: by 10.112.55.10 with SMTP id n10mr790789lbp.14.1413923010898; Tue, 21 Oct 2014 13:23:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.100 with SMTP id z4ls99029laz.60.gmail; Tue, 21 Oct 2014 13:23:30 -0700 (PDT) X-Received: by 10.152.7.175 with SMTP id k15mr37011598laa.58.1413923010554; Tue, 21 Oct 2014 13:23:30 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id z7si20693050lag.18.2014.10.21.13.23.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 13:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id q1so1711700lam.22 for ; Tue, 21 Oct 2014 13:23:30 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr36582030lbb.74.1413923010269; Tue, 21 Oct 2014 13:23:30 -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.112.84.229 with SMTP id c5csp576036lbz; Tue, 21 Oct 2014 13:23:29 -0700 (PDT) X-Received: by 10.70.92.134 with SMTP id cm6mr5012117pdb.167.1413923006337; Tue, 21 Oct 2014 13:23:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cg3si12271582pbc.149.2014.10.21.13.23.24 for ; Tue, 21 Oct 2014 13:23:26 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S933515AbaJUUW7 (ORCPT + 27 others); Tue, 21 Oct 2014 16:22:59 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51560 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933433AbaJUUWz (ORCPT ); Tue, 21 Oct 2014 16:22:55 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9LKMUK9015881; Tue, 21 Oct 2014 15:22:30 -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 s9LKMUq4018643; Tue, 21 Oct 2014 15:22:30 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 21 Oct 2014 15:22:30 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LKMUdQ004475; Tue, 21 Oct 2014 15:22:30 -0500 From: Nishanth Menon To: Tony Lindgren , Kevin Hilman CC: , , , Tero Kristo , Nishanth Menon Subject: [PATCH 1/2] ARM: OMAP4: PM: Only do static dependency configuration in omap4_init_static_deps Date: Tue, 21 Oct 2014 15:22:28 -0500 Message-ID: <1413922949-22300-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413922949-22300-1-git-send-email-nm@ti.com> References: <1413922949-22300-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.215.49 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: , Commit 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5") Moved logic generic for OMAP5+ as part of the init routine by introducing omap4_pm_init. However, the patch left the powerdomain initial setup, an unused omap4430 es1.0 check and a spurious log "Power Management for TI OMAP4." in the original code. Remove the duplicate code which is already present in omap4_pm_init from omap4_init_static_deps. As part of this change, also move the u-boot version print out of the static dependency function to the omap4_pm_init function. Fixes: 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5") Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/pm44xx.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 503097c..e7f823b 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -160,26 +160,6 @@ static inline int omap4_init_static_deps(void) struct clockdomain *ducati_clkdm, *l3_2_clkdm; int ret = 0; - if (omap_rev() == OMAP4430_REV_ES1_0) { - WARN(1, "Power Management not supported on OMAP4430 ES1.0\n"); - return -ENODEV; - } - - pr_err("Power Management for TI OMAP4.\n"); - /* - * OMAP4 chip PM currently works only with certain (newer) - * versions of bootloaders. This is due to missing code in the - * kernel to properly reset and initialize some devices. - * http://www.spinics.net/lists/arm-kernel/msg218641.html - */ - pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n"); - - ret = pwrdm_for_each(pwrdms_setup, NULL); - if (ret) { - pr_err("Failed to setup powerdomains\n"); - return ret; - } - /* * The dynamic dependency between MPUSS -> MEMIF and * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as @@ -272,6 +252,15 @@ int __init omap4_pm_init(void) pr_info("Power Management for TI OMAP4+ devices.\n"); + /* + * OMAP4 chip PM currently works only with certain (newer) + * versions of bootloaders. This is due to missing code in the + * kernel to properly reset and initialize some devices. + * http://www.spinics.net/lists/arm-kernel/msg218641.html + */ + if (cpu_is_omap44xx()) + pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n"); + ret = pwrdm_for_each(pwrdms_setup, NULL); if (ret) { pr_err("Failed to setup powerdomains.\n");