Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp32181imu; Thu, 8 Nov 2018 04:36:31 -0800 (PST) X-Google-Smtp-Source: AJdET5fhrSVnlx2u0c7GvjXldHJtzv277IfZRf9gwOKr7MVbyA3/U7xwJJU/x4hKCcJ57Qj8OAqm X-Received: by 2002:a17:902:6a4:: with SMTP id 33-v6mr4479008plh.268.1541680591403; Thu, 08 Nov 2018 04:36:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541680591; cv=none; d=google.com; s=arc-20160816; b=FBAfcBnpcMsYUYjRY6eNoJPFcJsecpqrJVlqVhy3VnIllo5PIfHlvbJpMYPEc+Ahur SKC719w1tRRRQNj7qfZLpyznPR/2s0KVMwww+0hJpWnLgwal97wTg/mf53lwGDUm8zST cyDvPbqYLe0GiKCE+CgMQZ2T5xHslaQuXr//zU4myVOhJzyw+j/pKlsm5PUTL7V6w7j9 apCP1XLjkoirLfrOGgfDDy4GoKN/jN2acXlFgOxI3QmviFhPGc5uJHE8pPskhHOdMS1F zyyJib1MVhP4Lla3laArGn+8/HFSDs4e8kl37/ZQ9Ica63zsa5kRrcppe8c5cc/NUEBA 2mNg== 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:cc:to:subject; bh=5pk/ufh0CuFfL3FXO8UAV57XKT6Ln6MCfmpcgIVxGrE=; b=qRliCUIkXJ7DpWpAkCrM/Em04AeDCQm9fZW7vTMliiTj7HsKSI/uHWTtmOdoAyYrzU VEBymsJZdZq96QFFRs/XC+eV2q4gSgVQg/nyTVtRcWZkDaeVxY+SvFm/T2G6SwebOCbC /2GsnZTFB9ekU3IPSgjH6/rBnMCbrGUIoueGxlzeN+/pM5BpWIroMX5uEBaG7au6wLV/ erGeETwUyzieZJ7Er8AHaf6rTxeGAT3Es6w8w6LyrdxtA8RZmD/ZD7AOD2fgldiRIOSa RP6MzFpoA6WMdX6Q69dyF7XVl141yYPfmUNPvKmQWHQDjelGn3id1OFxvo7K8YNbcOPk zf/g== 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 c12-v6si4013673pfo.189.2018.11.08.04.35.51; Thu, 08 Nov 2018 04:36:31 -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 S1726788AbeKHWKr (ORCPT + 99 others); Thu, 8 Nov 2018 17:10:47 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43432 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbeKHWKr (ORCPT ); Thu, 8 Nov 2018 17:10:47 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA8CZKwO043079; Thu, 8 Nov 2018 06:35:20 -0600 Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA8CZKPe101802 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Nov 2018 06:35:20 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) 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 06:35:20 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE109.ent.ti.com (10.64.6.30) 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 06:35:20 -0600 Received: from [127.0.0.1] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA8CZG1h017519; Thu, 8 Nov 2018 06:35:17 -0600 Subject: Re: [PATCH 2/2] arm: omap_hwmod disable ick autoidling when a hwmod requires that To: Andreas Kemnade CC: , , , , , , , , References: <20181004203817.22101-1-andreas@kemnade.info> <20181004203817.22101-3-andreas@kemnade.info> <20181108120847.1ef7ec02@kemnade.info> From: Tero Kristo Message-ID: <0976e09f-3f83-d1bc-5bd0-651e2f9c42d4@ti.com> Date: Thu, 8 Nov 2018 14:35:14 +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: <20181108120847.1ef7ec02@kemnade.info> Content-Type: text/plain; charset="windows-1252"; 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 08/11/2018 13:08, Andreas Kemnade wrote: > Hi, > > On Thu, 8 Nov 2018 12:26:08 +0200 > Tero Kristo wrote: > >> 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? >> > Somehow I have missed that am33xx clock. I have not tested it on that > platform. Concerning am3xxx I have only a beaglebone block but it not > am33xx I guess. So I have to recheck I guess. Beaglebone black is am33xx based device, so you can use that for testing. > But I think the intention of this flag was to control autoidle > vs. sw-controlled idle according to... > [...] >>> if (os->flags & OCPIF_SWSUP_IDLE) { >>> - /* XXX omap_iclk_deny_idle(c); */ >>> + /* > this comment. So we need a if (clock_is_omap2()) or something like that > or remove that flag from any other clocks? You could add check within the omap2_clk_deny_idle / allow_idle calls themselves. You can check for presence of flag CLK_IS_BASIC, this is not set for omap clocks. -Tero > > Regards, > Andreas > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki