Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1435953imm; Thu, 4 Oct 2018 13:39:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Khnq2QnbnKjFz3XG6W4KIOB+Y0QgcIzQ2M87TQbf42u0T2BxMQW+gkuXCWpPC+mlugZk5 X-Received: by 2002:a17:902:f08c:: with SMTP id go12mr8324296plb.263.1538685545598; Thu, 04 Oct 2018 13:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538685545; cv=none; d=google.com; s=arc-20160816; b=ExVQmL7zvIqiP7lEwb5gq1gq17edhK+Kpenmxaiots9S6Qnt19jIG76HAOen7J3mkg i6ABv7iGyq0JUW07Lpcdz01iQas7/2uo1ii09ns9EWo8ZghSWCtBBk6Uam3i6t9Yrz6Y 5gRAYU5WfYWPO6Fngu1x2w1dBwHg8OkSml5gD+X1oh3umgg3MFNkCU8mkxDbcZ3G3kcN b0lzSK8HxxztZfW/biNLe3Y7XDYUYZfQyZs+//c7x7T4o2g4n8J5TRFR+w/aNsaE9+99 /z6vBAQHBMDfL1g6r/ieHcPj0gsY84thQhQ3HkC0Bycu5S39HUoHTmutnI9ku0u6XqgD BV8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gsrVQYqOvt6bHEaGNBZ3ivI+imRg6+0o4MIOMQo5To4=; b=OQmq5NJmnN0XXJVtWUNntn3/eWumRElxKnM0wha51C6wDML4YuGJER/7d2+ypGHcXG uTBkRC8I2mzNd/FjNiEhOXtExerXopzK71OJVRPTmzGKNmaJ5tq127Ikr+Eoz3UXRC58 jOToI49SO76xpS1JiTrv+dPUCe8T2FSJZSjdmMfUSZCP+5UpdTPn6dCtaD1htBJyG+hp 6TuOiwkuhlhKnaElsDbU9N1KWzISQiTARwDikCcn42C8eTm5NdrSq2/T2VMTuRdWMhu5 qZe8TTIgUWong6dV98ETPvM9BFkz+23DsCag5HLkXggiSG3gUCYnO1avKHb1FhDx1Bg/ ZIKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=ZeBFcSu2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si5865195pgk.594.2018.10.04.13.38.50; Thu, 04 Oct 2018 13:39:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=ZeBFcSu2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbeJEDdg (ORCPT + 99 others); Thu, 4 Oct 2018 23:33:36 -0400 Received: from mail.andi.de1.cc ([85.214.239.24]:33974 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727499AbeJEDdf (ORCPT ); Thu, 4 Oct 2018 23:33:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gsrVQYqOvt6bHEaGNBZ3ivI+imRg6+0o4MIOMQo5To4=; b=ZeBFcSu2Hx1koLT2PIh73dYHu jPtkOI5GZ4A3vQqPOip3WbsbqBQuOXL6a7pl6sVMRKQvigEUWEv/gj1sX0JHgt2HZY8KHZaBmYftz I8SKgTmAGsw5/qS9qdNkhfI02qaMqmMFGnPNVvdBLfMciucd4zBaYijGNIzUD4sSQKWhk=; Received: from p200300ccfbcbd5001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:fbcb:d500:1a3d:a2ff:febf:d33a] helo=aktux) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8AOG-0007Gy-FE; Thu, 04 Oct 2018 22:38:32 +0200 Received: from andi by aktux with local (Exim 4.89) (envelope-from ) id 1g8AOG-0005mE-71; Thu, 04 Oct 2018 22:38:32 +0200 From: Andreas Kemnade To: t-kristo@ti.com, mturquette@baylibre.com, sboyd@kernel.org, linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, bcousson@baylibre.com, paul@pwsan.com, tony@atomide.com, letux-kernel@openphoenux.org Cc: Andreas Kemnade Subject: [PATCH 2/2] arm: omap_hwmod disable ick autoidling when a hwmod requires that Date: Thu, 4 Oct 2018 22:38:17 +0200 Message-Id: <20181004203817.22101-3-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181004203817.22101-1-andreas@kemnade.info> References: <20181004203817.22101-1-andreas@kemnade.info> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Deny autoidle for hwmods with the OCPIF_SWSUP_IDLE flag, that makes hwmods working properly which cannot handle autoidle properly in lower power states. Affected is e. g. the omap_hdq. Since an ick might have mulitple users, autoidle is disabled when an individual user requires that rather than in _setup_iclk_autoidle. dss_ick is an example for that. Signed-off-by: Andreas Kemnade --- arch/arm/mach-omap2/omap_hwmod.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index bb641e6c93d0..0078b0e1d242 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -986,8 +986,10 @@ static int _enable_clocks(struct omap_hwmod *oh) clk_enable(oh->_clk); list_for_each_entry(os, &oh->slave_ports, node) { - if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) + if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) { + omap2_clk_deny_idle(os->_clk); clk_enable(os->_clk); + } } /* The opt clocks are controlled by the device driver. */ @@ -1039,8 +1041,10 @@ static int _disable_clocks(struct omap_hwmod *oh) clk_disable(oh->_clk); list_for_each_entry(os, &oh->slave_ports, node) { - if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) + if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) { clk_disable(os->_clk); + omap2_clk_allow_idle(os->_clk); + } } if (oh->flags & HWMOD_OPT_CLKS_NEEDED) @@ -2410,9 +2414,13 @@ static void __init _setup_iclk_autoidle(struct omap_hwmod *oh) continue; if (os->flags & OCPIF_SWSUP_IDLE) { - /* XXX omap_iclk_deny_idle(c); */ + /* + * we might have multiple users of one iclk with + * different requirements, disable autoidle when + * the module is enabled, e.g. dss iclk + */ } else { - /* XXX omap_iclk_allow_idle(c); */ + /* we are enabling autoidle afterwards anyways */ clk_enable(os->_clk); } } -- 2.11.0