From patchwork Thu Sep 12 13:26:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173703 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127575ilq; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhSqlHnAq4ph6Kgld/m+Irp+HcdOyod5Cog5REGbBElqtwG9Fi487f3qgGWtbPnpF677k+ X-Received: by 2002:a05:6402:286:: with SMTP id l6mr42011939edv.111.1568294789790; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294789; cv=none; d=google.com; s=arc-20160816; b=wESviVChJeauPWpq2+9bKBhYMIh5EYEenNWRO5ZfUQK2cSL2l2F7cLxj36S7gz19xK Jxk+borJ2RXM+J5Q0rCAhZpM4Gbt6KIM6Ce1Q9LGLAXx26h2lVlv90XR78qD6KR/4156 4dJvtZxmToCZ8UT5l1yU2bm4vntFm1aN7mFXyP6P7l/nb1ikLbsmTkOcM5qPbsgUnoZo mb0tt0t5HZAuJ8NDs223sevBs+e0BD7YAmI8WIofQdkwryNCTskgLSGY9Pee5oxStQNw YAKxaY0mghL0k1jpzctVQEIbqWYQ4+9mG9k382H4hQmwCebYrQ3UnLFkVe5XKWhZaSWm 1vjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ZhhtgfHz1PpryANYuepNGwQFWlONDXmjaSxUGLbbF0g=; b=J3q8PHtJGhxTBOxGl3GxJiy9siNnmk08fSHb/GnptMGkOW9ck3i8PBQm7hkbKgETcb yXop7rrEXKK8BmYi0U4z8UV7viuQFo0oeRzNcHQUCjyCKCIwYDGHUu+wxL0+2fNQg8Fx LYp7L4Q7bS/p9iAz3jA5e9EBWi7H2FaoeAs5BAPnCiycsejwFSdXPnhfXt6lYQcxAkun dPs6jxQFfO/X+8G2RDgzLqrhZGWzejP2IENrMMWBOhgbiv9D3m4V7VXN+Zdpacj/D94S UV7sYW6DtABXXLlsFucarVHOvhKAHArzUQ7A2rFy+9hPk2A/OGhcRkLhnJi8gdXB37pt MbdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XxLUX4Yt; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.29; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XxLUX4Yt; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732093AbfILN02 (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:28 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38344 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN02 (ORCPT ); Thu, 12 Sep 2019 09:26:28 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQLB7021179; Thu, 12 Sep 2019 08:26:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294781; bh=ZhhtgfHz1PpryANYuepNGwQFWlONDXmjaSxUGLbbF0g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XxLUX4Yteuu2XXr6dA3aF5yRzFMY/r5k4y1Cvwcisk7dvn1rs2zxqkAJf094+UqUR VyYeH6wQ3cLiCjoOIu7eaK8noT9nlXSsvHl9KF5Y13hJ5I3Dgfx2HEaBHIeYyY8rBa x7mE12ul4RmeQu6rSSpg+fmCfSwcqe78xAO65xZw= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQLDe070947; Thu, 12 Sep 2019 08:26:21 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:19 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:19 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvQ130575; Thu, 12 Sep 2019 08:26:18 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 01/10] clk: ti: clkctrl: fix setting up clkctrl clocks Date: Thu, 12 Sep 2019 16:26:04 +0300 Message-ID: <20190912132613.28093-2-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Apply the proper register function for clkctrl clocks, so they get registered under the clk_hw_omap list also. This allows checking their type runtime. Signed-off-by: Tero Kristo --- drivers/clk/ti/clkctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 975995eea15c..a914df2e9e1b 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -622,7 +622,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) init.ops = &omap4_clkctrl_clk_ops; hw->hw.init = &init; - clk = ti_clk_register(NULL, &hw->hw, init.name); + clk = ti_clk_register_omap_hw(NULL, &hw->hw, init.name); if (IS_ERR_OR_NULL(clk)) goto cleanup; From patchwork Thu Sep 12 13:26:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173701 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127530ilq; Thu, 12 Sep 2019 06:26:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLXMTsJ7e9yxtk2we79/2DgweSJ+v/tI23XnkC5DLg1MchD7YbvXjRWkGZ3n1iyHWDtq51 X-Received: by 2002:a05:6402:286:: with SMTP id l6mr42011705edv.111.1568294787042; Thu, 12 Sep 2019 06:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294787; cv=none; d=google.com; s=arc-20160816; b=CMP0L/UP0/IHrRfVyy3gEYigBEKhB1K082wkKYMaFhdKWi62PX2SoIlxZR+NcUQNuo uJ8/F9xlqrNiUAWuNjpr5+JyHGeBiwoghnXgUDZuvIvNyAJOoEHhtwcV3amXmHK9mPvl zXlK0B5lNUp5vT/hkAqDfjltroKSOa/jChcIvNpf/O0wjiztBEntOfmUYR6i2zbfYMJF VYdu6DK8qli6aQoJf+srL5wkQyBPPRnPzAtHds6/ofyAHdltZhKjcB1ye5HyaKn8I0Ed cMn+dRimzJ+UX63tE7djFriSGOxTKptlYrSdS+YtvBSy1cXsekUY9Mbxqo0304oRACe6 q36Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=CA2p2SsjZBiZ+CVSDGSdF5T0f2itSmxPDgeQXhbNBGw=; b=JKqq/nJlQMOueiz/Ii/heB592ckr9YhcL4idvO0rptWMGJBRNcZG6XzDId4x/Pzf36 ctzFSJQeQ+JrB0wrQ5dBNXWQmlFWM9diMAAjfR4nMrEqYLcC4t4BvjCu5uhuPhLzvHyY ZNmSz/OXLBthXM8pi9sE0hlLDqLZyKQc3hJaElRT8IY0CpFGgftFq/bZQEEJDBCFkN4E Q4jtHpcIZXJ3/E8kjMufQEbW3cJsspUsNnsengylw82mC9I5KXz+t20jYFFk1hf6nBS3 ZqvFIgrZYqe6xq/L5f3IhI115gyLsVkYTnq1m5p5LYPPsULy3sVqW108XcRNfgORTwCs Rv8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i8ULB+Ix; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.26; Thu, 12 Sep 2019 06:26:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i8ULB+Ix; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732097AbfILN00 (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:26 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58626 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732093AbfILN0Z (ORCPT ); Thu, 12 Sep 2019 09:26:25 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQLWI098812; Thu, 12 Sep 2019 08:26:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294782; bh=CA2p2SsjZBiZ+CVSDGSdF5T0f2itSmxPDgeQXhbNBGw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=i8ULB+Ix1oWkHXvDa0mX83DFG6PpwzNIxqizHnbem4PYzTeNpIsk0HziVdm52WNNu PQjnNkJnPBDvHUbYds7jlgu/KXHnHdT9D+XYkxM/I4biycl5UKdGoqJ7x0hc/JtnRU 81Fwomulf7qgS0fPGE6EKwRufGbUDh12qPtGi/g8= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CDQLuX015180 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 08:26:21 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:21 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:21 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvR130575; Thu, 12 Sep 2019 08:26:20 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 02/10] clk: ti: clkctrl: convert to use bit helper macros instead of bitops Date: Thu, 12 Sep 2019 16:26:05 +0300 Message-ID: <20190912132613.28093-3-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This improves the readibility of the code slightly, and makes modifying the flags bit simpler. Signed-off-by: Tero Kristo --- drivers/clk/ti/clkctrl.c | 8 ++++---- include/linux/clk/ti.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index a914df2e9e1b..d904a9a7626a 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -24,7 +24,7 @@ #include #include "clock.h" -#define NO_IDLEST 0x1 +#define NO_IDLEST 0 #define OMAP4_MODULEMODE_MASK 0x3 @@ -158,7 +158,7 @@ static int _omap4_clkctrl_clk_enable(struct clk_hw *hw) ti_clk_ll_ops->clk_writel(val, &clk->enable_reg); - if (clk->flags & NO_IDLEST) + if (test_bit(NO_IDLEST, &clk->flags)) return 0; /* Wait until module is enabled */ @@ -187,7 +187,7 @@ static void _omap4_clkctrl_clk_disable(struct clk_hw *hw) ti_clk_ll_ops->clk_writel(val, &clk->enable_reg); - if (clk->flags & NO_IDLEST) + if (test_bit(NO_IDLEST, &clk->flags)) goto exit; /* Wait until module is disabled */ @@ -596,7 +596,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) if (reg_data->flags & CLKF_HW_SUP) hw->enable_bit = MODULEMODE_HWCTRL; if (reg_data->flags & CLKF_NO_IDLEST) - hw->flags |= NO_IDLEST; + set_bit(NO_IDLEST, &hw->flags); if (reg_data->clkdm_name) hw->clkdm_name = reg_data->clkdm_name; diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 1e8ef96555ce..bb2c5af9082a 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -153,7 +153,7 @@ struct clk_hw_omap { u8 fixed_div; struct clk_omap_reg enable_reg; u8 enable_bit; - u8 flags; + unsigned long flags; struct clk_omap_reg clksel_reg; struct dpll_data *dpll_data; const char *clkdm_name; From patchwork Thu Sep 12 13:26:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173702 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127569ilq; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4rtyMsECojOyA442OUcXLGn3YnQfjlSvZ/d9neYieFUb98tYIazx8t/+pLkWpl06Pw9Un X-Received: by 2002:a05:6402:347:: with SMTP id r7mr41692909edw.41.1568294789476; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294789; cv=none; d=google.com; s=arc-20160816; b=epEpn5idWsE71IpQOcVrmTWEFs48XuFW/fM2NSyFkXBLOUi8H6nT3vdK7WsxH+6lEX K6nWfD7NtpdhRbAHkKj+cjRuh1TKwF9p4RQq9e1MS5nwm4dSnn/eLZofPCm1irNbY8E2 NWei8eIPs3DL4byoeO06YJE4Vdblcg0wXRQyhOuwAEPBmKwpefvsdQAJjm7t9Q0kz4a1 3lTIJHZisrV+GpoLhWjlev6wGLRwfcIUMowPrOLnzO9ezNMIWtWahGsFopTo8+KicpTg GiGmrs7/fFVYRp+KUpSSwoOvdl0B5U4yJ86TKI1MSQ5jaFD4Xi8s8/oog5we6nDHCp1K PoKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+qrcnaR3a/pZ4OviE1ZKc8IWLJlt6Yebqe6i5IEbb64=; b=y9zNICV1oVS2DoRwUJedrUPnQw1rLdHEikr6NDNbXjNb6QxCIvsoezcKnwGZKAD7UJ rVQSnbF3a5qWe3kby+SbFSaL+NjF16Ebgb5bqKqFrWoWwzhEpaHk0D/iEs5+FFutvgD3 OKHh5utCmF4RUzHwObhCs3lSQwnNfkcgo272ktbHvPmq215awRIGW5MQvTemX2xbGTLX wb7zHoIAhU5STJiW0FzCmx6Kuba7yU2dOJAmMHehq5Q9HrTW2glBC/OgKjkBe5KaBG57 L5HeMzJHUymZfClWn/FoR1U3FwM/UYDVbSlWiSCJkRgnBP+cDm8cZE5UN51BhLCWjrn0 91pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A8JSNdgo; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.29; Thu, 12 Sep 2019 06:26:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A8JSNdgo; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732099AbfILN02 (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:28 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:59656 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732093AbfILN02 (ORCPT ); Thu, 12 Sep 2019 09:26:28 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQOf6011927; Thu, 12 Sep 2019 08:26:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294784; bh=+qrcnaR3a/pZ4OviE1ZKc8IWLJlt6Yebqe6i5IEbb64=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=A8JSNdgohFwtatBw+XFGPRUpp2hpxdX9Lq/w1OAb8zjFsNSw2NFg5fa9oTYnUyffx 1tc2kKk3P/zmQ8sg8AxTe2ZrKhzzWUymfUjvgYFUgLaDzllGjP1AdFR4RB0vu6ettW qzTflc3wR7sZDCpRiz2RJnIfKvtI/8xWJDLlnyZw= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CDQOKw015237 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 08:26:24 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:23 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvS130575; Thu, 12 Sep 2019 08:26:21 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 03/10] clk: ti: clkctrl: add new exported API for checking standby info Date: Thu, 12 Sep 2019 16:26:06 +0300 Message-ID: <20190912132613.28093-4-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Standby status is provided for certain clkctrl clocks to see if the given module has entered standby or not. This is mostly needed by remoteproc code to see if the remoteproc has entered standby and the clock can be turned off safely. Signed-off-by: Tero Kristo --- drivers/clk/ti/clkctrl.c | 33 +++++++++++++++++++++++++++++++++ include/linux/clk/ti.h | 1 + 2 files changed, 34 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index d904a9a7626a..e3e0a66a6ce2 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -34,6 +34,9 @@ #define OMAP4_IDLEST_MASK (0x3 << 16) #define OMAP4_IDLEST_SHIFT 16 +#define OMAP4_STBYST_MASK BIT(18) +#define OMAP4_STBYST_SHIFT 18 + #define CLKCTRL_IDLEST_FUNCTIONAL 0x0 #define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2 #define CLKCTRL_IDLEST_DISABLED 0x3 @@ -647,3 +650,33 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) } CLK_OF_DECLARE(ti_omap4_clkctrl_clock, "ti,clkctrl", _ti_omap4_clkctrl_setup); + +/** + * ti_clk_is_in_standby - Check if clkctrl clock is in standby or not + * @clk: clock to check standby status for + * + * Finds whether the provided clock is in standby mode or not. Returns + * true if the provided clock is a clkctrl type clock and it is in standby, + * false otherwise. + */ +u32 ti_clk_is_in_standby(struct clk *clk) +{ + struct clk_hw *hw; + struct clk_hw_omap *hwclk; + u32 val; + + hw = __clk_get_hw(clk); + + if (!omap2_clk_is_hw_omap(hw)) + return false; + + hwclk = to_clk_hw_omap(hw); + + val = ti_clk_ll_ops->clk_readl(&hwclk->enable_reg); + + if (val & OMAP4_STBYST_MASK) + return true; + + return false; +} +EXPORT_SYMBOL_GPL(ti_clk_is_in_standby); diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index bb2c5af9082a..3fb777f7103a 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -298,6 +298,7 @@ struct ti_clk_features { void ti_clk_setup_features(struct ti_clk_features *features); const struct ti_clk_features *ti_clk_get_features(void); +u32 ti_clk_is_in_standby(struct clk *clk); int omap3_noncore_dpll_save_context(struct clk_hw *hw); void omap3_noncore_dpll_restore_context(struct clk_hw *hw); From patchwork Thu Sep 12 13:26:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173704 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127647ilq; Thu, 12 Sep 2019 06:26:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmjnqGFX66r5W+GAQd+vgTexWZENPGsZXljLo0jfXPmSXH3Wx7VEUuKhP9GotZL7FOSIr7 X-Received: by 2002:a05:6402:1e7:: with SMTP id i7mr43488993edy.103.1568294793846; Thu, 12 Sep 2019 06:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294793; cv=none; d=google.com; s=arc-20160816; b=E/qYNKtM07WC1s3uXi7CjY8q3QMrJf+bE/wM80Oo7wwIJf/hx0LClfYQYl1S1FMb1D Sgdled19rHeqT9zbcDP9/hru/ABVh7rScBZC40UgFugsoiRjyQ4qS8us8FLAeFnLWGvX LujkYkxZnVOFKLe36SrAYXG3zVz2HiA6+l0kuDjpJR+VoW8MmQYrpCy39GWWsj+O0g0y zJoCZto0MJhj3BJ+HerHg0QeLsJLF7oRM4iyamKvCerVJ54UXfuW5VfDp/5d7Z4uNWFo 5/LZYTQrC5zBfcfrq5AhLaCxsjvkYCqufjGjqVuMORmk7hqWWxMoF3PmGGU3/eaRn6Xq Vb1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lAooCRUVMyzHhADwC9qZkva36ihXtVfNEPnWC8n4rlE=; b=Q1hxF0aZl83qTOQp2UucNAE4jI0gsowBKrhB+SaY/JT8efjQ9HpUiGRvqhctH+GQfl mL03I/OahUJnmHks5/hayoqtlXkHbqNLgdmjeXbyswrZAatC39HEt1ZD/kn0n35U3ybI wsMall2yKqgw3TiuOh7e/7hQ3ODg5EA/O4pmb/LzT2sm9Nyo0dz/FP7vj/dQJsdTeVLQ F7MsLhF8gc1HUSNWmnWb1gZi4me2qopMoDRIBPwaoZy+mK6aYIzU/dK8oxB+pBOn6RO3 /SV/cgmdqMzY/wHi4cgpnuR/YToZvRD7KBy+HVPz9PzlcFshQlb5AhGuLLEO95Ild13S 8W2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xa4D904r; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.33; Thu, 12 Sep 2019 06:26:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xa4D904r; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732103AbfILN0c (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:32 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58654 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0c (ORCPT ); Thu, 12 Sep 2019 09:26:32 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQPAX098827; Thu, 12 Sep 2019 08:26:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294785; bh=lAooCRUVMyzHhADwC9qZkva36ihXtVfNEPnWC8n4rlE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xa4D904r3oRK+1nEn52YVgjGmPidk5ijrBjzLkWOvyTmR7rVxeOglRiNFtZfUcPFc HPEbt19lBHXtJ/NoV56yvBVtKc3/wNY/n/j01u64WRM2zrVt+CoYep2ufJ/VnCJRHa P4bf7EKEwNAjBr7i9XTJqKL56tnezMGyWOFxpW38= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQPNl071069; Thu, 12 Sep 2019 08:26:25 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:25 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:25 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvT130575; Thu, 12 Sep 2019 08:26:23 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 04/10] dt-bindings: clk: add omap5 iva clkctrl definitions Date: Thu, 12 Sep 2019 16:26:07 +0300 Message-ID: <20190912132613.28093-5-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org OMAP5 device contains an IVA subsystem (Image and Video Accelerator.) IVA subsystem clkctrl definitions are currently missing, so add them. Signed-off-by: Tero Kristo --- include/dt-bindings/clock/omap5.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/include/dt-bindings/clock/omap5.h b/include/dt-bindings/clock/omap5.h index f3283957f48d..eb6d2fbe78f9 100644 --- a/include/dt-bindings/clock/omap5.h +++ b/include/dt-bindings/clock/omap5.h @@ -86,6 +86,10 @@ #define OMAP5_UART5_CLKCTRL OMAP5_CLKCTRL_INDEX(0x170) #define OMAP5_UART6_CLKCTRL OMAP5_CLKCTRL_INDEX(0x178) +/* iva clocks */ +#define OMAP5_IVA_CLKCTRL OMAP5_CLKCTRL_INDEX(0x20) +#define OMAP5_SL2IF_CLKCTRL OMAP5_CLKCTRL_INDEX(0x28) + /* dss clocks */ #define OMAP5_DSS_CORE_CLKCTRL OMAP5_CLKCTRL_INDEX(0x20) From patchwork Thu Sep 12 13:26:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173705 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127665ilq; Thu, 12 Sep 2019 06:26:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVrX5pUmVw8jAz4zwY0lnzOnMmETPQtjeTYhkIrQvjBsaKs0a/X4KqTeOiFCOsV4u6pylI X-Received: by 2002:a17:906:3443:: with SMTP id d3mr12263446ejb.221.1568294794452; Thu, 12 Sep 2019 06:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294794; cv=none; d=google.com; s=arc-20160816; b=mm/RzZz2b6OQjjg18rdItaF9MumufOx6cjTwhzRfEszqFPp3l2uua5VvKuqEzgPvj2 ILYf2RZ6yV93zzlgCLj3m62tCJWwCp2e1y4zOg8d2FfI4sPOUVdYVCvtVXrjvm5tGXP0 +9ej/mWSMxt0fTxxxVNhSn371WkReJwhGXKBQMx/9uSob3YZWbAXGJnbr3YKHQxwSSdp U95RkEcGItqN+cLX2CeV4lNTb763Rvy97qyZ257xwKB15mcaOIj6NFZP818RcjgiLT2J S5G26lqbMYjp6ts7L+9bP+iFAan2ILoi+kxQoHpIkbvESq1pO94kpRY8lT89BxJgDuHb +j7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+wJjCWfQrTgNasnwgKOhFijISSbGmcAqlzAKHLVv0jA=; b=imUnL+zrCTRf0xeZs+i7XGyJBJTyDUyKIqOmQ/TF1UbE3XP57pyPO62+zyjqNdksoU WsVlOWeBCsf2HkWCdJin7pEFcWsQ2+nu3lJmmigvQZTI4RT5O7COun8DIGr42/zLQnUF Q2vvIs9BFrVLGEvTHHUou1XazJPXujmCuVDPbrHLvLXJ/hm0RpvyAeARFM1ovy123bOm sKOvxrXqIptqFSzbWBnJXv1NGvFEteZG0cRu3wuB/C3UjKDOin8qf1nRyjWnQllgoNtY 81oikWmd1277Ictr1/ca8Nld/9bO65rGZo2QWHTW253cxzLc7qc47qlLxxsz8iFWhR7p afAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ECsG4xE9; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.34; Thu, 12 Sep 2019 06:26:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ECsG4xE9; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732105AbfILN0d (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:33 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38374 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732101AbfILN0c (ORCPT ); Thu, 12 Sep 2019 09:26:32 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQTcN021198; Thu, 12 Sep 2019 08:26:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294789; bh=+wJjCWfQrTgNasnwgKOhFijISSbGmcAqlzAKHLVv0jA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ECsG4xE9qa8EpnYr69vNt/rPmogkYvgc/pY1gIz4ZraIoS+8WeYnKQOwWLW3A2O3J JjfWKpXLeILXPqhxojHMMtbuga/0aztd+qR5oa2CvMBwT1wPiSBSryYqBwoQqXJ103 LyNakZdnNiHwyDPlNInImxKRKlmK0/J+4x4yW+4A= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQTgj071141; Thu, 12 Sep 2019 08:26:29 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:27 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:27 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvU130575; Thu, 12 Sep 2019 08:26:25 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 05/10] clk: ti: omap5: add IVA subsystem clkctrl data Date: Thu, 12 Sep 2019 16:26:08 +0300 Message-ID: <20190912132613.28093-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add clkctrl data for the IVA subsystem (Image and Video Accelerator.) Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-54xx.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c index dafef7e70ba8..f63871dac600 100644 --- a/drivers/clk/ti/clk-54xx.c +++ b/drivers/clk/ti/clk-54xx.c @@ -286,6 +286,12 @@ static const struct omap_clkctrl_reg_data omap5_l4per_clkctrl_regs[] __initconst { 0 }, }; +static const struct omap_clkctrl_reg_data omap5_iva_clkctrl_regs[] __initconst = { + { OMAP5_IVA_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" }, + { OMAP5_SL2IF_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h12x2_ck" }, + { 0 }, +}; + static const char * const omap5_dss_dss_clk_parents[] __initconst = { "dpll_per_h12x2_ck", NULL, @@ -469,6 +475,7 @@ const struct omap_clkctrl_data omap5_clkctrl_data[] __initconst = { { 0x4a008d20, omap5_l4cfg_clkctrl_regs }, { 0x4a008e20, omap5_l3instr_clkctrl_regs }, { 0x4a009020, omap5_l4per_clkctrl_regs }, + { 0x4a009220, omap5_iva_clkctrl_regs }, { 0x4a009420, omap5_dss_clkctrl_regs }, { 0x4a009620, omap5_l3init_clkctrl_regs }, { 0x4ae07920, omap5_wkupaon_clkctrl_regs }, From patchwork Thu Sep 12 13:26:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173706 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127676ilq; Thu, 12 Sep 2019 06:26:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdSALHrys816zAyWRQ+ORVvX4DfijuN26s3nj6K0Hzl030doOHWlptaUuiRc1HTZJ1Ngv2 X-Received: by 2002:a50:934c:: with SMTP id n12mr34302585eda.12.1568294795100; Thu, 12 Sep 2019 06:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294795; cv=none; d=google.com; s=arc-20160816; b=i4nKppL4DbY5E+KXdE+6EuSWzOUCuMdIM8H8DcP021tLgQvgqtiamJr4yUTgWkRhjz Gslsm8T9RWlTCHQRXvxHXiDn9Os+Et8+2WXgiEtLvtyGFi843FFqMvRmXzs/6D8e8l8g ckZhEE7mJtJSAzZxyBZRejGhMB/DBdHPj3RPw+M+JpGTfJ1B5/6cumTPuTOgtY0fsbXI Qgl7TktSOfmpiQlIOGv0V3C7wMNu2bUkkwRJHd7nEhpA0CJP2tzTYLaJ6Ln0Vhwl9Ig/ CR548dI1vUMex1MXNKQAublF5/dGQPeq8tkumCORhgrfG9x52AyDtgFHNk4DH0QvNpoC OYGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Atr2gt17DIkZ/xfyFREBQcV4wJqdHAnuRyN2OSnVshc=; b=yxgEz4ym/y3A0jdZdrEMT/or+oVGgxxWvRaH3+x5gfGhw0f7Kwu6E4jDAQYvj3Mp/B v1pb8yVHsrRmJqbzuAatb9/9LEPBWxePrCAaPd6e34DWk/kjjMMnhM+nxnIfJYRtzLio Y540Am+WizZGVBrcKUxN6YL1rQ8zUOkH/5wx6xuYJ4MRSPJOUk7dwr6ezYxHvTysOaOa vVuh4KKGfr4LlR86HeXOA6ilpCno5sLPMRYrs49HkdDdfWoqtc01rQ/44PfwuZDHTfjT kGKQ3tfFVEzhlpF5kcndl9D6SdXBhaErbmHe4FkJ2NOiIHs95gpM0lXYp4a4ZvOHBova XO8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gesj7+IM; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.34; Thu, 12 Sep 2019 06:26:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gesj7+IM; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732101AbfILN0e (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:34 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38376 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0d (ORCPT ); Thu, 12 Sep 2019 09:26:33 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQTon021204; Thu, 12 Sep 2019 08:26:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294789; bh=Atr2gt17DIkZ/xfyFREBQcV4wJqdHAnuRyN2OSnVshc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gesj7+IM71PTBUrqbvzBK+1wWWWeQ/1AQHo8VfwFkMSAHH9yUc+aYyn4Sy8aVahyd nng9IC2Ew9vcTgS8bxXZ+lwyqD8L4nWJO3t8c6qavVaIO8Zv7ZcxoGYzVT/ZmpduZv liI9uI3cSHCdWBAZMU7hyvKGgMpJYxxNBnt3BJsA= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CDQTmb011681 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 08:26:29 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:29 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:29 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvV130575; Thu, 12 Sep 2019 08:26:27 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 06/10] clk: ti: dra7xx: Drop idlest polling from IPU & DSP clkctrl clocks Date: Thu, 12 Sep 2019 16:26:09 +0300 Message-ID: <20190912132613.28093-7-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The IPU and DSP remote processor cores and their corresponding MMUs on DRA7 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-7xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c index b57fe09b428b..94e69cdc2bd2 100644 --- a/drivers/clk/ti/clk-7xx.c +++ b/drivers/clk/ti/clk-7xx.c @@ -25,7 +25,7 @@ static const struct omap_clkctrl_reg_data dra7_mpu_clkctrl_regs[] __initconst = }; static const struct omap_clkctrl_reg_data dra7_dsp1_clkctrl_regs[] __initconst = { - { DRA7_DSP1_MMU0_DSP1_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_dsp_m2_ck" }, + { DRA7_DSP1_MMU0_DSP1_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_dsp_m2_ck" }, { 0 }, }; @@ -41,7 +41,7 @@ static const struct omap_clkctrl_bit_data dra7_mmu_ipu1_bit_data[] __initconst = }; static const struct omap_clkctrl_reg_data dra7_ipu1_clkctrl_regs[] __initconst = { - { DRA7_IPU1_MMU_IPU1_CLKCTRL, dra7_mmu_ipu1_bit_data, CLKF_HW_SUP, "ipu1-clkctrl:0000:24" }, + { DRA7_IPU1_MMU_IPU1_CLKCTRL, dra7_mmu_ipu1_bit_data, CLKF_HW_SUP | CLKF_NO_IDLEST, "ipu1-clkctrl:0000:24" }, { 0 }, }; @@ -137,7 +137,7 @@ static const struct omap_clkctrl_reg_data dra7_ipu_clkctrl_regs[] __initconst = }; static const struct omap_clkctrl_reg_data dra7_dsp2_clkctrl_regs[] __initconst = { - { DRA7_DSP2_MMU0_DSP2_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_dsp_m2_ck" }, + { DRA7_DSP2_MMU0_DSP2_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_dsp_m2_ck" }, { 0 }, }; @@ -164,7 +164,7 @@ static const struct omap_clkctrl_reg_data dra7_l3main1_clkctrl_regs[] __initcons }; static const struct omap_clkctrl_reg_data dra7_ipu2_clkctrl_regs[] __initconst = { - { DRA7_IPU2_MMU_IPU2_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h22x2_ck" }, + { DRA7_IPU2_MMU_IPU2_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_core_h22x2_ck" }, { 0 }, }; From patchwork Thu Sep 12 13:26:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173707 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127697ilq; Thu, 12 Sep 2019 06:26:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHQE9anHzts0bahNvBK7q7WxcN+GahaAQHt1VmUoPaDbCNdCa7JzSpEk15cgONi+BY6/WU X-Received: by 2002:a50:d903:: with SMTP id t3mr40957894edj.117.1568294795978; Thu, 12 Sep 2019 06:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294795; cv=none; d=google.com; s=arc-20160816; b=sPJNXHB1EcfkoJhiENqP9hNVSVskrqYQ/wcCNC5mhS6nhm8m2cdNd+NsLVI6F7YPjc QUciG4/a8iBBwEgr7smLlqPKcG51dRnmbSTiU7nKVPqLbp6c2LlJF3YEloJP/O5XCMPo 14kAusIn4CnPVIGFAtLLQhXMAKr31mo1p7duUIFFtesB/5HRERbZgpDdQwpON5glB32y 5+BguiLM5gtQ5BC1drBUfTBLcjSNNkZQqsbOeNNkXzcMFGomXgtvPZHD3di7w8igFd3t zJo2hM7RSbDN0gDEyVl4sOU/+f7ArvHthXMgeVISFt1hUdswpI+geOOTob9UOSQ9S/HC Y/Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=64fqodASKJfeJLGxH1nNhSTYa8joNo1U/kmhF3htzCY=; b=EqU8tTZ15ZdIaSemlxppF29hfpIKEp1EeRu969TusgVwiF5GgWBUcZIQuEImq81Uk1 VV5Fv7o1kGYlS7PtBeHb5Eb4WOYbox+uCQrUtAO+L6hQEmAiuG3jCB90dJT3aKFvpnLT CZKHnaSix9Lqotwp4uFV01+XwUYjsU+jgv7WMwPKpQVR7QYGJ6WLno0D0E00C/IZ2dMz h3+PjzsDZuxe/nLw+HK2R8ifMl1h1Z5D++qaBMw2lYcVTtbkhuxEGRfd4EOkYuOLZEUH ppCy6TwjReBcwPlJuYz5LwihdI/1u53atkniSxhFbTDdCvRYLMP6qDm/6KpAkNTGVpEM FyCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=btVwRm+W; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.35; Thu, 12 Sep 2019 06:26:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=btVwRm+W; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732107AbfILN0f (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:35 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:41632 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0f (ORCPT ); Thu, 12 Sep 2019 09:26:35 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQVNr049544; Thu, 12 Sep 2019 08:26:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294791; bh=64fqodASKJfeJLGxH1nNhSTYa8joNo1U/kmhF3htzCY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=btVwRm+W6GNuXn4Cm6khmKzPRo/76ZIDAQMS7ilq8XaK3uMMczfBbATeJdAM72tr3 iey4tVlBN4QG1PCpCsBdnmDWRn6WFJafKquzxIOrHG0/qaXCpu4GpDoH9QRJfWGf1Y cWa818w+bc9oicEQGpIYRb30Ipz8DubNLCa2nioo= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQVxw071201; Thu, 12 Sep 2019 08:26:31 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:31 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:31 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvW130575; Thu, 12 Sep 2019 08:26:29 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 07/10] clk: ti: omap4: Drop idlest polling from IPU & DSP clkctrl clocks Date: Thu, 12 Sep 2019 16:26:10 +0300 Message-ID: <20190912132613.28093-8-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Suman Anna The IPU and DSP remote processor cores and their corresponding MMUs on OMAP4 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Suman Anna --- drivers/clk/ti/clk-44xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-44xx.c b/drivers/clk/ti/clk-44xx.c index b10ed0429091..2b4dab632318 100644 --- a/drivers/clk/ti/clk-44xx.c +++ b/drivers/clk/ti/clk-44xx.c @@ -37,7 +37,7 @@ static const struct omap_clkctrl_reg_data omap4_mpuss_clkctrl_regs[] __initconst }; static const struct omap_clkctrl_reg_data omap4_tesla_clkctrl_regs[] __initconst = { - { OMAP4_DSP_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_m4x2_ck" }, + { OMAP4_DSP_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_m4x2_ck" }, { 0 }, }; @@ -219,7 +219,7 @@ static const struct omap_clkctrl_reg_data omap4_l3_2_clkctrl_regs[] __initconst }; static const struct omap_clkctrl_reg_data omap4_ducati_clkctrl_regs[] __initconst = { - { OMAP4_IPU_CLKCTRL, NULL, CLKF_HW_SUP, "ducati_clk_mux_ck" }, + { OMAP4_IPU_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "ducati_clk_mux_ck" }, { 0 }, }; From patchwork Thu Sep 12 13:26:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173708 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127736ilq; Thu, 12 Sep 2019 06:26:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqymNzUtTLMdX7lBmfKs78vtbErn94sGPJx0SUEpVkg4LwVidvcwljyZCft3SLmtatWdlLu2 X-Received: by 2002:a50:934c:: with SMTP id n12mr34302773eda.12.1568294797515; Thu, 12 Sep 2019 06:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294797; cv=none; d=google.com; s=arc-20160816; b=FWj+Prdixa0Fow1yb6UlTQDBP7j8uNu7JV1JQ00H3uIUISbdoz7CafyQ3XYy/VNG2A F4M87zdJUweNe/bGHv+PGRq5DanOb1jsdJgqP70gouZETG9+AbDV9piGefou8zMGBl4+ zA1uSdiYgLZE8H9Z+lA10VgL1Wjl95FNa//6yfYIMCYLnFOdHVXlrnQ+DvtTNS+El8J1 WRU5BIxCbOPUVC2nzDLpKEicfgU4hSu4XFz1v36mqOk7cARpodibbDqvdA4x249AAl67 ZoPNcc8XFW+kfb+0xuvW8K9v5aa2XEIsa98TaiQxuxyrwe6XG9oE/zmyvi5rkKQ+19U+ 9W2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=fW+u/vGNd3Os0mTVhUYzxkOa/BShSQwBQHEQNFyKdFs=; b=Ssk1lZeZcsgXywExpHnr0nYSSifNHoqk+zXGWKqcC0RH4KHjpHVUO/lw/nINd3sxlI YLtBAHgZGWdpUNPj1I2WYgPmVVX1oRgHJztrAsOafij1JtirNtoXsvdckouSb0fh50UV N4BCI0VbWAhdd+sWgtg2JDjdyQkKhb4y8PjNCYAg6ySbbB6LLYJ5eWiFAI2Eic53vqRJ HQK9jJlMq/biKiNdT8S6kirsF9qSwSfcaPvGSJAtHS2QDe+7H5lY8gVL1rOCTJiAGqUt D8gopueeNPP7CgIZu45+bwo+hAXAdIHZYrPqVAqQVese29mHPZmdX3P+sMO1BkP1UN0y AelA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V2hJTOnd; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.37; Thu, 12 Sep 2019 06:26:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V2hJTOnd; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732111AbfILN0g (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:36 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:41644 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0g (ORCPT ); Thu, 12 Sep 2019 09:26:36 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQX32049558; Thu, 12 Sep 2019 08:26:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294793; bh=fW+u/vGNd3Os0mTVhUYzxkOa/BShSQwBQHEQNFyKdFs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V2hJTOndcru4A2B+/0dj6uIigedP6zT8br+44ERD4Hul/owl+qMxuj/4pzkqOR2W/ ohXWxEva4Aj5SQ789rN1iQulJk5BonMZp6tzvGU8/50c4wWnR/nt9Y5HxYaudMpl2L 9nyJEGzo1CUdFj7MTynFe5qCTAPbPCQyHMQN9jqc= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CDQXdA053259 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 08:26:33 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:33 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvX130575; Thu, 12 Sep 2019 08:26:31 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 08/10] clk: ti: omap5: Drop idlest polling from IPU & DSP clkctrl clocks Date: Thu, 12 Sep 2019 16:26:11 +0300 Message-ID: <20190912132613.28093-9-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Suman Anna The IPU and DSP remote processor cores and their corresponding MMUs on OMAP5 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Suman Anna --- drivers/clk/ti/clk-54xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c index f63871dac600..b5e5658f614f 100644 --- a/drivers/clk/ti/clk-54xx.c +++ b/drivers/clk/ti/clk-54xx.c @@ -31,7 +31,7 @@ static const struct omap_clkctrl_reg_data omap5_mpu_clkctrl_regs[] __initconst = }; static const struct omap_clkctrl_reg_data omap5_dsp_clkctrl_regs[] __initconst = { - { OMAP5_MMU_DSP_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_iva_h11x2_ck" }, + { OMAP5_MMU_DSP_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_iva_h11x2_ck" }, { 0 }, }; @@ -145,7 +145,7 @@ static const struct omap_clkctrl_reg_data omap5_l3main2_clkctrl_regs[] __initcon }; static const struct omap_clkctrl_reg_data omap5_ipu_clkctrl_regs[] __initconst = { - { OMAP5_MMU_IPU_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h22x2_ck" }, + { OMAP5_MMU_IPU_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_NO_IDLEST, "dpll_core_h22x2_ck" }, { 0 }, }; From patchwork Thu Sep 12 13:26:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173709 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127757ilq; Thu, 12 Sep 2019 06:26:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKQXrTbCe8JVrnD2akV0WUhb0I7aISQ42RWCkrVRYkf1Y3+iQzsuuefWzMrVpgpxr0FIPB X-Received: by 2002:aa7:db47:: with SMTP id n7mr20446928edt.169.1568294798697; Thu, 12 Sep 2019 06:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294798; cv=none; d=google.com; s=arc-20160816; b=aU33w/BnbUOZITf2GMPnMfDVUUR1MeCSvvNXPK6gfVX7qBlRiRbKvqIl6Ks8zD2NYh AfrRU5T22sxxhnyTNXxemvD6j1pvZJmqr7G50Wyl/arzMNZ06t7fG8Rf5B/H2EHJbHLo 3DKpRN0ClRb3bVxKT/IXmtQ4AetrbNhJpdy2u0xgzfLstWUFmDg1LfSXYjF8g1nPqyrv AwjrVZTMkAdrbA1HF6bfhKZuKWSZjc34yUwo+d/1vPYRmO1jp4e1BI6BX1aTFv1s0VCW 0Fb1/DXh6pFlr2WsABcq/uvjsKenqfxsCJXaBTSRAtlu4XIqytaGpcd/3cARW5VPctCb iPHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=V1b0FMEeevL3urjdJBuTCnTQb6LW6rgCELNI7FyhZeE=; b=VuhXG57d5pqTodeH2XaYJhrqnlbJjwje8unusmsbIEMwJnIXNHBSe17fwIoBI7/mt4 wVumCr+PuANHFXXEGQsXorNdlNcWaC22+hf6O7DAEqK6jqmCQ8IAdalhiCqxDGzYoq0J fdxYuACrZoYD4YAn0OMoH+wozuO92VZN2uVZMp5TDEgkD7+Q92f58PZ67oTOoIkbHmRk FLrfLW7QRYdKRU65LRNji90EyrqtPR+Nft2HeUDqTx+jIsEhI8qVNZrKpa4xihSFftix fuN+iXRym6ec72EVp2rnX/wjWjptTMTV+rj4/2Ie7DCjjSlDy3daQ34mKkvWwo8SGhnu X7Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SWXhSgj1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.38; Thu, 12 Sep 2019 06:26:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SWXhSgj1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732112AbfILN0h (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:37 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38390 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0h (ORCPT ); Thu, 12 Sep 2019 09:26:37 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQZHU021229; Thu, 12 Sep 2019 08:26:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294795; bh=V1b0FMEeevL3urjdJBuTCnTQb6LW6rgCELNI7FyhZeE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SWXhSgj1ds7YXWFx1umEHZxcRWRw/uZMwVBvjO9WU/Jg6BWBTnbaPmj9/XXo7SXcr V8fY7hEVYy7QecLtoCy5rBreQDh8DscRMChz8IgpY42+kZfR1Uu55I7LddG1iLHzQY iRpHJWaUIlempeFzYYXuSgr04W2F9WWbL/Ht+plQ= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CDQZx0011793 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 08:26:35 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:35 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:35 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvY130575; Thu, 12 Sep 2019 08:26:33 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 09/10] clk: ti: am43xx: drop idlest polling from pruss clkctrl clock Date: Thu, 12 Sep 2019 16:26:12 +0300 Message-ID: <20190912132613.28093-10-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The PRUSS modules on AM43xx SoCs have a hardreset line and are controlled by a PRCM reset line. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for the PRUSS clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to the PRUSS clkctrl clock so that these module status checks are skipped. Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-43xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c index 2782d91838ac..7ec8fe6aa7c1 100644 --- a/drivers/clk/ti/clk-43xx.c +++ b/drivers/clk/ti/clk-43xx.c @@ -126,7 +126,7 @@ static const struct omap_clkctrl_reg_data am4_l3s_clkctrl_regs[] __initconst = { }; static const struct omap_clkctrl_reg_data am4_pruss_ocp_clkctrl_regs[] __initconst = { - { AM4_PRUSS_OCP_PRUSS_CLKCTRL, NULL, CLKF_SW_SUP, "pruss_ocp_gclk" }, + { AM4_PRUSS_OCP_PRUSS_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "pruss_ocp_gclk" }, { 0 }, }; From patchwork Thu Sep 12 13:26:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173710 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2127795ilq; Thu, 12 Sep 2019 06:26:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNFrximpPNp1ZlscN5yMHrslZfvZEvQkMqSWlVoLIpLtQUXunJPoIMIGht4mrNB9Z+r39z X-Received: by 2002:a17:906:7c55:: with SMTP id g21mr33822539ejp.177.1568294801260; Thu, 12 Sep 2019 06:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568294801; cv=none; d=google.com; s=arc-20160816; b=s0ipRTYxKgdXXnzka4Uk4yFr5ZTA3zmtqPUPLBpuXjkOA23V7/dIyGp+Tp8DB/V65M 5zXCIp5U/aLCRBFi4czWBBhQBQnT8o7ZJZAK4B0zSDQHvszhsl00g82aD5BzM7i5oK9+ qzrxw4zQGqx6pGsc/bIIgxhrriXIJwivXsTo5PQ+C1QQKD5KADsM+edGdWWKWoUyRc52 zxADSfL3shEtIyIDTWEsbkz8+jOBWLiMs0v4xFPj4vA9X/aLDZjZcndSvKLg7DoIYD9T +s5WX86Dv+aIo3jCqvMHXTntZDeQ7QmUKyiAzaHqqF53J1E8sdCsBeTKdOV3wrzp5Lyd Sq0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=K2Q92adlyOlFE+55nlrsCH8twyZ1qvVGlSQOn8cJ0jo=; b=LpDFtm3TAVIDC1sEXeWAGvqBZAwVHdUXl5Jk7+XCMuFR4Kmuu8ce7Xt2f23SBREoNm oP/E0GKnhD+w3tw+rRmj5U1+hOgmdLiSjM6nrfZY8F/Z04DaZHvK6jrbnoEvesubumsd ejo0FzBA0nRlYivcneYaa7Csohqk1xDc5SMPXDvXt+c7cM2CWHMfT8aNWbY0aN1dQmOe RDvLt+Iz4Una0+OyReHDVYKTjXEbpnJjP3i1YizloeHd+hVn9kI7Clea0WQnGwQ0zuNY 6iW2MeW42q+lWmn3LLG3iW3W4tS2TQZX2uKWgvXt9Vau8VejhfWeyXTip7KN29Q+5fHm m/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R5Sx57oF; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (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 s11si12814304ejz.384.2019.09.12.06.26.41; Thu, 12 Sep 2019 06:26:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R5Sx57oF; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732115AbfILN0k (ORCPT + 5 others); Thu, 12 Sep 2019 09:26:40 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:41666 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfILN0k (ORCPT ); Thu, 12 Sep 2019 09:26:40 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQbaQ049583; Thu, 12 Sep 2019 08:26:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568294797; bh=K2Q92adlyOlFE+55nlrsCH8twyZ1qvVGlSQOn8cJ0jo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=R5Sx57oFPzATZ7B13TRpt+LVvRAA0YJuP5aYxx+jWwNQS8vfMX2aRi0AnKQvVctj6 rd3Gyqgm0kY4w4SV8D22PnJimdgujRGc8b6mV/24mjp7YJFQ9zha7YqPb9IcnowqyP SLlcNO9g8efjY/UQmGU1UXuIXex4Rfpf5mIkFftk= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQbGA071418; Thu, 12 Sep 2019 08:26:37 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 08:26:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 08:26:37 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CDQFvZ130575; Thu, 12 Sep 2019 08:26:35 -0500 From: Tero Kristo To: , , , CC: , Subject: [PATCHv3 10/10] clk: ti: am33xx: drop idlest polling from pruss clkctrl clock Date: Thu, 12 Sep 2019 16:26:13 +0300 Message-ID: <20190912132613.28093-11-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912132613.28093-1-t-kristo@ti.com> References: <20190912132613.28093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The PRUSS module on AM33xx SoCs has a hardreset line and is controlled by a PRCM reset line. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for the PRUSS clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to the PRUSS clkctrl clock so that these module status checks are skipped. Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-33xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c index a360d3109555..935efb66b389 100644 --- a/drivers/clk/ti/clk-33xx.c +++ b/drivers/clk/ti/clk-33xx.c @@ -107,7 +107,7 @@ static const struct omap_clkctrl_reg_data am3_l4hs_clkctrl_regs[] __initconst = }; static const struct omap_clkctrl_reg_data am3_pruss_ocp_clkctrl_regs[] __initconst = { - { AM3_PRUSS_OCP_PRUSS_CLKCTRL, NULL, CLKF_SW_SUP, "pruss_ocp_gclk" }, + { AM3_PRUSS_OCP_PRUSS_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "pruss_ocp_gclk" }, { 0 }, };