Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp320696imu; Thu, 8 Nov 2018 02:28:48 -0800 (PST) X-Google-Smtp-Source: AJdET5d31pa20QrDBcUWQxEhGA9sBuUzRjbTbvlxd8Ay43sDMIPdOjAyED6l95yceGwnnFaC5hBs X-Received: by 2002:a17:902:32a4:: with SMTP id z33-v6mr3881509plb.168.1541672928265; Thu, 08 Nov 2018 02:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541672928; cv=none; d=google.com; s=arc-20160816; b=YvuCbIhAx9fj0Kw5+AjugzhFHB/kUnKrkZdIfucwuOB5bDBjs+KDmd9d+Y2ZRqio00 LBmX8SkMoS2DOzckF4VQk93qfy0wgzKfDH/u2mZDbL/EwVoehkTr1A2xirD+VzMaoDgL 1Qk1CfQ8B6Lgj3DIcRvLhVnH/uxnq3Rv+Bze5mT1oeC97au4MMnDSx9UaLPLyVt9eu8X LO1w05VOHnjgsLTzQxg7pY/Qyaa48BrKmcWs5nPMfohX9HUif59uFo7F15EfZlkpZm89 ZyAdX/H2KTZwio8Mk+NvPsr11wzFGqP46ar+JIMX96ioHQgxaAoWfSlb7PUV6lsEg6LV 61Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=ivTLdMX50nAo3jLuxlhC7v1VXfxh1bfU7nYTk1TJWGs=; b=rfEtMYamrFbNNvNYYNrOrl8LSj+m7evlzKdIAlK5qsTsZBK8BsRKYF7GlQPCIS6rz5 bzB0UZ0IHfKwR9UYktDny7V58D4Or6P4UpkpWodbSunIYBRBUa8uru+qd/r0smvQ/b4p x7HWXofgpifXgiThAxtY0zlWoKhI5t/5864YdtcYhDmhHENgq3h2q9XQY9CsHmtdZWLL UaGzycuzoruqyWYhLF7Z3Sw2kkIelM6/Qd0rCT7mSgxfLBbbW0O/dg/j7B3xBO4WJbJu ahtpF6h3kwMAc+0xbyzV0OpUvP/Cz/ngcu8RkWHpvE2tMtp1YtCyriNF06/tswxRqx4g U2gA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si3183264pgp.135.2018.11.08.02.28.31; Thu, 08 Nov 2018 02:28:48 -0800 (PST) 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; 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbeKHUBY (ORCPT + 99 others); Thu, 8 Nov 2018 15:01:24 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:53734 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726274AbeKHUBY (ORCPT ); Thu, 8 Nov 2018 15:01:24 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA8AQEll010324; Thu, 8 Nov 2018 04:26:14 -0600 Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA8AQETu058923 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Nov 2018 04:26:14 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 8 Nov 2018 04:26:13 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 8 Nov 2018 04:26:13 -0600 Received: from [127.0.0.1] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA8AQAAt017734; Thu, 8 Nov 2018 04:26:11 -0600 Subject: Re: [PATCH 2/2] arm: omap_hwmod disable ick autoidling when a hwmod requires that To: Andreas Kemnade , , , , , , , , , References: <20181004203817.22101-1-andreas@kemnade.info> <20181004203817.22101-3-andreas@kemnade.info> From: Tero Kristo Message-ID: Date: Thu, 8 Nov 2018 12:26:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181004203817.22101-3-andreas@kemnade.info> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/10/2018 23:38, Andreas Kemnade wrote: > 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); I think calling this unconditionally across all platforms / clock types might cause problems. Checking kernel, am33xx seems to have one clock with this flag that is not of omap2 type. Do we have any testing data that this doesn't break things? -Tero > 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); > > } > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki