From patchwork Thu Apr 4 08:11:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 161758 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297708jan; Thu, 4 Apr 2019 01:12:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf3vihZfzgRyWIYmsrWCCcsQdEaSWy/67V3u3K8x3EnUZ83ehPLXd0cIl0Tf6suS4lroQU X-Received: by 2002:a63:2015:: with SMTP id g21mr4408825pgg.226.1554365542954; Thu, 04 Apr 2019 01:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365542; cv=none; d=google.com; s=arc-20160816; b=UBgFjy3s4n8BmZjbThw6wjNxzLh/7HWMk27kN/0Lgo8lfKI+ZnFQvBIsC0L8caOOiz v6H4qp3lZUHbfJ29riH30NGZMngZGVGg1us51dCvfrH/XNtwgjTDPkC3W9QxCzK95Uds u6ylYNVqBUhMsvhKBiSE2/NIcjtwFad+Lii0OyTPoEmeepS31WgzUIRR8Y/PJJvwzfQi m/6Sytl6VUDvUtHV2MivL4fzlMB+CXc2u55yg1H9K1dcukNpH7MHRaCK+aTGQx00V+7B zwmLAXj03HSJ9kkoq0qKQq0LJ2LiKVrDBEkFCvf/WRPkhBzg1C2GNBzeaFiH/tvBp5jg axpg== 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=zIf/X6VrPJCu25i6tJISEyLUL/53b+r8hYLAt8o0Gd4=; b=mi/TisqeglX9L/2JGNcuDQCxMnG0XIDVpu3JpH0QxDo4GPDyr6E3IOQlBt/e00vnZC SqsKRkpCHX+mU0hCB3HfL6R84fkZFrHhlrDkWA/pNYcSs4ewLE00cKnal8BhJ8yNZAev Ul8Hjtdd1IRK/7/EdZAMQx1QQsx9DdKwCLAlGDAtXd5hPnJ0/BgWzp2L8UeB1Vl9vbZh EpEU3hupkfGebWVESNW6nMqeeSBy7/VXS2Zhr56RQ2knFK7MxOl9Fa7AJpOhom/Ael0g ibU2QlDsdPHNfMS/smnAeQI6Kwk0QUp9ONvVOm9hKTBj6cll+XO2y42wwvLICLvb083z wu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZHhZsnLr; 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 m12si7767545pgv.586.2019.04.04.01.12.22; Thu, 04 Apr 2019 01:12:22 -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=ZHhZsnLr; 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 S1727445AbfDDIMW (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:22 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35304 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727321AbfDDIMV (ORCPT ); Thu, 4 Apr 2019 04:12:21 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x348CJ6r105729; Thu, 4 Apr 2019 03:12:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365539; bh=zIf/X6VrPJCu25i6tJISEyLUL/53b+r8hYLAt8o0Gd4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZHhZsnLru7MxVVMKxVPNp2fRTjqKei6On40D0gV+S5ZWYIFU7QDcBnkuX5/nYN9I3 9DLaFxedxaG6ZzT2kSv1Qib1RySVsMRhDZ6apgxQbDdztiCg9uzxKLUIRf+niotmeD LsAXcUV+3r3mP2TTk2q3KzkxAShTx2lB2HE9d5LE= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348CIfV004647 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:19 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 4 Apr 2019 03:12:12 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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 via Frontend Transport; Thu, 4 Apr 2019 03:12:12 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8G8093305; Thu, 4 Apr 2019 03:12:11 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 1/6] clk: ti: export the omap2_clk_is_hw_omap call Date: Thu, 4 Apr 2019 11:11:02 +0300 Message-ID: <1554365467-1325-2-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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 There is one instance outside the TI clock driver that needs the info whether a clock is an OMAP HW clock or not. Thus, move the function declaration into the public header. Signed-off-by: Tero Kristo --- drivers/clk/ti/clock.h | 1 - include/linux/clk/ti.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 1c0fac5..4223a39 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -303,7 +303,6 @@ long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw, int omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw, struct clk_rate_request *req); int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw)); -bool omap2_clk_is_hw_omap(struct clk_hw *hw); extern struct ti_clk_ll_ops *ti_clk_ll_ops; diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 78872ef..2821f7c 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -243,6 +243,7 @@ struct ti_clk_ll_ops { #define to_clk_hw_omap(_hw) container_of(_hw, struct clk_hw_omap, hw) +bool omap2_clk_is_hw_omap(struct clk_hw *hw); int omap2_clk_disable_autoidle_all(void); int omap2_clk_enable_autoidle_all(void); int omap2_clk_allow_idle(struct clk *clk); From patchwork Thu Apr 4 08:11:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 161757 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297681jan; Thu, 4 Apr 2019 01:12:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDO6l6jzomNAuDniY6E2VIp0hYcUKWJPpLdw1LnXoSU/zBBOus74pDfyCXWTxO1LaVYL0v X-Received: by 2002:a17:902:e90b:: with SMTP id cs11mr4973144plb.243.1554365540685; Thu, 04 Apr 2019 01:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365540; cv=none; d=google.com; s=arc-20160816; b=NuB4vnF5Jmmz0jn90Sy0fdaVJTX3SPydxXEvVffS8+4GGmsbwjADzK/m+aUn5a7zPO khwtjqDUBpIw1qECFAumVPA4dw2T7qYd1UV0MGCgOuQoUiEcGwBM60ZR7UdGLIQK0cWf V+iKEvOb9eB99YhlcWWFWY132AovJJQ9Ob4v5K+/MOvGLexvty6ZJLqIYNvkDs9mPXN4 KrGTXVDXOFvNcliFX2UAUQJA91KWM9bep9PU9zkzT7/zpIZwkyNGvn74IkjZcw5i7dut PORGhegh/b33EZth/saGEk7IG8KpOtEXSK8LYI+iiYKwsM9dpGQZVuvnxGLYUHAb4F7s QfIA== 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=Q2946IrUmlnaEqB0iIRGBbIKN7zWtT1klPpYZLnTdzs=; b=pIzGWXuUmiqLOGOaLSEpzA4bPWEYmTij4Xufib9mxLUzrScPQ/zRPQZKzvh7Y8hrVd CWM2uwmPE38YjmnaLs5/F+aCPKBoclMj8GQrIpb4MGqNgvjwYU+dCZ5lf0muY3ecCOw3 6OlHU8Y9pFMdj0QsrU4k2qCcq7f6CgWe5bgaUndhG4vaexALyNZ71pgiTXorMUvkt9Em DfB7ROkWQZYf4JUH69r57zLFYEpD3kctUAALEUk/m/1OGqV2+LuHVDcFenXbzNQ6Cx+n QRy7Opa/rE35M8r2F2xbykiIXGSNj/GS7qZIkDThORq5j9WHOrRTAmxHifvS3A+kFioQ P6vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=N8TEA4hR; 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 m12si7767545pgv.586.2019.04.04.01.12.20; Thu, 04 Apr 2019 01:12:20 -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=N8TEA4hR; 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 S1727323AbfDDIMT (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:19 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35248 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727321AbfDDIMT (ORCPT ); Thu, 4 Apr 2019 04:12:19 -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 x348CGf2105650; Thu, 4 Apr 2019 03:12:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365536; bh=Q2946IrUmlnaEqB0iIRGBbIKN7zWtT1klPpYZLnTdzs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=N8TEA4hRxEzTo+iZ0AiQvugUQV7KW2zpTsoPeqXoaKjPzDvWPyO4OSkcBSsEZu/cS RaeHA17m3qHkZXEyx2f7pGcbdFLJHK9DoElYEfx43ReKpsNz3DUlCXU92o8Wy/osxl 0QdqfJzGqsvWuEZt/UjLobDB5dHwtL5fq6wn4YZQ= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348CGjE073317 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:16 -0500 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.1713.5; Thu, 4 Apr 2019 03:12:14 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) 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, 4 Apr 2019 03:12:14 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8G9093305; Thu, 4 Apr 2019 03:12:13 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 2/6] ARM: omap2+: hwmod: drop CLK_IS_BASIC flag usage Date: Thu, 4 Apr 2019 11:11:03 +0300 Message-ID: <1554365467-1325-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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 CLK_IS_BASIC flag is about to get deprecated, and as such, can't be used. Instead, the API call for checking whether a clock is of type hw_omap shall be used, so convert the code to use this. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Acked-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 3a04c73..baadddf 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -648,10 +648,10 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh) if (oh->clkdm) { return oh->clkdm; } else if (oh->_clk) { - if (__clk_get_flags(oh->_clk) & CLK_IS_BASIC) + if (!omap2_clk_is_hw_omap(__clk_get_hw(oh->_clk))) return NULL; clk = to_clk_hw_omap(__clk_get_hw(oh->_clk)); - return clk->clkdm; + return clk->clkdm; } return NULL; } From patchwork Thu Apr 4 08:11: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: 161759 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297715jan; Thu, 4 Apr 2019 01:12:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8fM9nDn7nFoGY2XMN6BGZFODHBuBhdgCCfYATt7S6V8TmAvjLd9SLrOzljkjVrKvkeE6D X-Received: by 2002:a62:6807:: with SMTP id d7mr4315556pfc.75.1554365543604; Thu, 04 Apr 2019 01:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365543; cv=none; d=google.com; s=arc-20160816; b=gmVd9PWzn6EGZacdA18dhNkGEHWW0b7gxGgG9upRkAjfPNCfW+ieDd3qvTZIv268do mlYjJv1y9KHxtFggytiJhYZXR7+P2gMPIRu6goU8EKVaH2fAVCdOMiGECcjSJXozp09e ayr24+OO1lYORoH0wuEwohKn1wDUwUinI64rbfd+Y6uAJSWAdReUua21uhUnzMZUWcZU nQVKMskaykr4grxJsyh8b9h32D9QyvgKabZBiPS1REGOsTp64ixUA/cwyWIHF2BaK4T8 2yNC0s9V3qODVcqOqxlvBzJTL42x6GSNZQrAsVOom69oEx/3BwJbHZ5aJUXL9SIfv6yz q3Jg== 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=c/jFE4H+RDbXA+RxZ0DS/oxFw6yjzvGOoogluh+TCZ8=; b=BTCBNhjms/G7az9nRXE25V7Kq3cCgcyfQMAJm+nEWCOUpj4gNv75SigUfiZT55IP+y YnkePpvSbZPEVLBOhg/Jyy6oCfoWRT4S3oflHk9GPHRbcQZMCR+1Nk5zHXsybs15AWzp 3pENX1jFEmlJJP/cxm8igGgskaUIFdYmSm9GAjtLzl7ocfOzsWi30V0k+gj+rjXc8gCv kGxRC/uVfepN0bp+xfae2/XBCS32u8k07JRzqwRwWHFj5q7u93d/gOBc42wmdqagLHHM WS3LCvL0XavpnlIYukwp13cKIoTME1w04aNZ9GTzKh9TBcQn3hd4w+JsEiidHryS9CdL WfVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=go4HWrF6; 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 m12si7767545pgv.586.2019.04.04.01.12.23; Thu, 04 Apr 2019 01:12:23 -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=go4HWrF6; 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 S1727152AbfDDIMW (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:22 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53002 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727441AbfDDIMW (ORCPT ); Thu, 4 Apr 2019 04:12:22 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x348CJt4038576; Thu, 4 Apr 2019 03:12:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365539; bh=c/jFE4H+RDbXA+RxZ0DS/oxFw6yjzvGOoogluh+TCZ8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=go4HWrF6kptP3w6JtTkQDukOcUSiTEKGWM4pJkhjpFcXU2/Xf3t4ocR7W65XS8Z// MnYX8Ehh+twdmHiJ43wyu0LCy9WEciOW9o4kkMd6guO3plrDDD/Sd+UGyell2O6K0a UhRNgOMauPzPKJF2IuhKpzoPbNelKclezmV1vxZk= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348CJQQ004684 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:19 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) 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.1713.5; Thu, 4 Apr 2019 03:12:16 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) 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, 4 Apr 2019 03:12:16 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8GA093305; Thu, 4 Apr 2019 03:12:15 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 3/6] clk: ti: dra7x: prevent non-existing clkctrl clocks from registering Date: Thu, 4 Apr 2019 11:11:04 +0300 Message-ID: <1554365467-1325-4-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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 Certain clkctrl clocks (like the USB_OTG_SS4) do not exist on some variants of the dra7x SoC. Append a flag for these clocks and skip the registration in cases where the clocks do not exist. Reported-by: Peter Ujfalusi Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-7xx-compat.c | 2 +- drivers/clk/ti/clk-7xx.c | 2 +- drivers/clk/ti/clkctrl.c | 14 ++++++++++++++ drivers/clk/ti/clock.h | 6 ++++++ 4 files changed, 22 insertions(+), 2 deletions(-) -- 1.9.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-compat.c b/drivers/clk/ti/clk-7xx-compat.c index e3cb7f0..0d53bd0 100644 --- a/drivers/clk/ti/clk-7xx-compat.c +++ b/drivers/clk/ti/clk-7xx-compat.c @@ -362,7 +362,7 @@ { DRA7_MMC2_CLKCTRL, dra7_mmc2_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0010:25" }, { DRA7_USB_OTG_SS2_CLKCTRL, dra7_usb_otg_ss2_bit_data, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, { DRA7_USB_OTG_SS3_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, - { DRA7_USB_OTG_SS4_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, + { DRA7_USB_OTG_SS4_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_DRA74 | CLKF_SOC_DRA76, "dpll_core_h13x2_ck" }, { DRA7_SATA_CLKCTRL, dra7_sata_bit_data, CLKF_SW_SUP, "func_48m_fclk" }, { DRA7_PCIE1_CLKCTRL, dra7_pcie1_bit_data, CLKF_SW_SUP, "l4_root_clk_div", "pcie_clkdm" }, { DRA7_PCIE2_CLKCTRL, dra7_pcie2_bit_data, CLKF_SW_SUP, "l4_root_clk_div", "pcie_clkdm" }, diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c index 597fb4a..098c342 100644 --- a/drivers/clk/ti/clk-7xx.c +++ b/drivers/clk/ti/clk-7xx.c @@ -348,7 +348,7 @@ { DRA7_L3INIT_MMC2_CLKCTRL, dra7_mmc2_bit_data, CLKF_SW_SUP, "l3init-clkctrl:0010:25" }, { DRA7_L3INIT_USB_OTG_SS2_CLKCTRL, dra7_usb_otg_ss2_bit_data, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, { DRA7_L3INIT_USB_OTG_SS3_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, - { DRA7_L3INIT_USB_OTG_SS4_CLKCTRL, NULL, CLKF_HW_SUP, "dpll_core_h13x2_ck" }, + { DRA7_L3INIT_USB_OTG_SS4_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_DRA74 | CLKF_SOC_DRA76, "dpll_core_h13x2_ck" }, { DRA7_L3INIT_SATA_CLKCTRL, dra7_sata_bit_data, CLKF_SW_SUP, "func_48m_fclk" }, { DRA7_L3INIT_OCP2SCP1_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" }, { DRA7_L3INIT_OCP2SCP3_CLKCTRL, NULL, CLKF_HW_SUP, "l4_root_clk_div" }, diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 639f515..4cdeb8d 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -446,6 +446,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) u32 addr; int ret; char *c; + u16 soc_mask = 0; if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) && of_node_name_eq(node, "clk")) @@ -469,6 +470,13 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) else data = dra7_clkctrl_data; } + + if (of_machine_is_compatible("ti,dra72")) + soc_mask = CLKF_SOC_DRA72; + if (of_machine_is_compatible("ti,dra74")) + soc_mask = CLKF_SOC_DRA74; + if (of_machine_is_compatible("ti,dra76")) + soc_mask = CLKF_SOC_DRA76; #endif #ifdef CONFIG_SOC_AM33XX if (of_machine_is_compatible("ti,am33xx")) { @@ -562,6 +570,12 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) reg_data = data->regs; while (reg_data->parent) { + if ((reg_data->flags & CLKF_SOC_MASK) && + (reg_data->flags & soc_mask) == 0) { + reg_data++; + continue; + } + hw = kzalloc(sizeof(*hw), GFP_KERNEL); if (!hw) return; diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 4223a39..773e2c4 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -83,6 +83,12 @@ enum { #define CLKF_HW_SUP BIT(6) #define CLKF_NO_IDLEST BIT(7) +#define CLKF_SOC_MASK GENMASK(10, 8) + +#define CLKF_SOC_DRA72 BIT(8) +#define CLKF_SOC_DRA74 BIT(9) +#define CLKF_SOC_DRA76 BIT(10) + #define CLK(dev, con, ck) \ { \ .lk = { \ From patchwork Thu Apr 4 08:11: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: 161760 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297758jan; Thu, 4 Apr 2019 01:12:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqybVs8MQanED+5dPch98QCoN11LUj3hzwfmWq+Z7gR5JHXyyosXNeihk9queGnHMWeuAIyD X-Received: by 2002:a17:902:a583:: with SMTP id az3mr4972397plb.205.1554365546885; Thu, 04 Apr 2019 01:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365546; cv=none; d=google.com; s=arc-20160816; b=08YLWOWtYx//4x/+WVBYG31iYpeXoUK26Z/xeIndukbo/07I8PvAXolSmAsA/AysGs ugRpPlxhI5T+K1SQlR40nSEt0AVtnXdjCWav3YysrNHb0iU5ag4aHmM7k5BT/rd4q/cE XNVhEmQUCGPq948h1MeL0IexliaSUcYHeTfahzAp+DX4evp9cRYmgdINMOtFcQ7dV16B QKBwuB3QQ4aZzphqweQe8rTn5UER4Kgmhz97/MHL8ZMpWkf0Fa0k+SV+XhOd1PdBrm99 TrDbQA1HuwkRzJe6rDAFWQW73oO6uwh8O4rjoLrz3/vkNriAhjbJ5WJ+7gWDEuuic2Tx kPVw== 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=GwjGrX+awpRwIvOKB/u2mBhh41tqKddpveT+XCA7POY=; b=D8pay5CXr2NU2YDDTPI5ZyoxHC8twn/QrIw4IvvfaDR60Q6LTr+kvURtQdqktlQ2Kf eAcVaCcUexs6EOM0Wv/q1tqRSg/7zFEWh1VWO3Lr2sCLKRujkwzdgE6YHYOtQGsgUOaY TyIlOYx5r8oYZwlCAA8RatT3DF4Tis0nZyOJo4O/Hz8iHlDql8KvUGLgOdsWxCgns6wE qW090Zofa76BBLcWyEbT17hHqqkwRWHQG8CqEYowVa+BlXraTT/e1zQx/8oR0tBjr68z 3hgBz6CYAjqKv0uF5BygB2uayL8wzWICUquTHWzA6n1Jv12LSenryH4k6QdsIj6YvFgp 1CKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wNV8mdkL; 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 m12si7767545pgv.586.2019.04.04.01.12.26; Thu, 04 Apr 2019 01:12:26 -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=wNV8mdkL; 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 S1727321AbfDDIM0 (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:26 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45356 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbfDDIM0 (ORCPT ); Thu, 4 Apr 2019 04:12:26 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x348CMS0057230; Thu, 4 Apr 2019 03:12:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365542; bh=GwjGrX+awpRwIvOKB/u2mBhh41tqKddpveT+XCA7POY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wNV8mdkL7qq6iteV9heV1oVmdwveu+RuSXlQANZvvu+oVWW3I3yLPCxNyEKRz7NcE AePiXM9ihSRSUeH3i6s4eabKNnqJQeh5lSW0l9T7zn2R2AEjp6tHFuW7dFtq0PQmQ5 njL3svJRIUKNyerdiTMZbEBCBCZmmW7sI3nl6vdQ= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348CLZ9052877 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:21 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 4 Apr 2019 03:12:21 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE113.ent.ti.com (157.170.170.24) 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, 4 Apr 2019 03:12:20 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8GB093305; Thu, 4 Apr 2019 03:12:17 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 4/6] clk: ti: dra7: disable the RNG and TIMER12 clkctrl clocks on HS devices Date: Thu, 4 Apr 2019 11:11:05 +0300 Message-ID: <1554365467-1325-5-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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 RNG and TIMER12 are reserved for secure side usage only on HS devices, so disable their clkctrl clocks on HS SoCs also. Signed-off-by: Tero Kristo Tested-by: Andrew F. Davis --- arch/arm/mach-omap2/clock.c | 3 +++ drivers/clk/ti/clk-7xx-compat.c | 4 ++-- drivers/clk/ti/clk-7xx.c | 4 ++-- drivers/clk/ti/clkctrl.c | 3 +++ drivers/clk/ti/clock.h | 9 +++++---- include/linux/clk/ti.h | 1 + 6 files changed, 16 insertions(+), 8 deletions(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 42881f2..3e0f09c 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -119,6 +119,9 @@ void __init ti_clk_init_features(void) if (cpu_is_omap343x()) features.flags |= TI_CLK_DPLL_HAS_FREQSEL; + if (omap_type() == OMAP2_DEVICE_TYPE_GP) + features.flags |= TI_CLK_DEVICE_TYPE_GP; + /* Idlest value for interface clocks. * 24xx uses 0 to indicate not ready, and 1 to indicate ready. * 34xx reverses this, just to keep us on our toes diff --git a/drivers/clk/ti/clk-7xx-compat.c b/drivers/clk/ti/clk-7xx-compat.c index 0d53bd0..b3cd229 100644 --- a/drivers/clk/ti/clk-7xx-compat.c +++ b/drivers/clk/ti/clk-7xx-compat.c @@ -662,7 +662,7 @@ { DRA7_AES1_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div", "l4sec_clkdm" }, { DRA7_AES2_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div", "l4sec_clkdm" }, { DRA7_DES_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div", "l4sec_clkdm" }, - { DRA7_RNG_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div", "l4sec_clkdm" }, + { DRA7_RNG_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "l3_iclk_div", "l4sec_clkdm" }, { DRA7_SHAM_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div", "l4sec_clkdm" }, { DRA7_UART7_CLKCTRL, dra7_uart7_bit_data, CLKF_SW_SUP, "l4per_cm:clk:01d0:24", "l4per2_clkdm" }, { DRA7_UART8_CLKCTRL, dra7_uart8_bit_data, CLKF_SW_SUP, "l4per_cm:clk:01e0:24", "l4per2_clkdm" }, @@ -704,7 +704,7 @@ { DRA7_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" }, { DRA7_GPIO1_CLKCTRL, dra7_gpio1_bit_data, CLKF_HW_SUP, "wkupaon_iclk_mux" }, { DRA7_TIMER1_CLKCTRL, dra7_timer1_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0020:24" }, - { DRA7_TIMER12_CLKCTRL, NULL, 0, "secure_32k_clk_src_ck" }, + { DRA7_TIMER12_CLKCTRL, NULL, CLKF_SOC_NONSEC, "secure_32k_clk_src_ck" }, { DRA7_COUNTER_32K_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" }, { DRA7_UART10_CLKCTRL, dra7_uart10_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0060:24" }, { DRA7_DCAN1_CLKCTRL, dra7_dcan1_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0068:24" }, diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c index 098c342..79186b9 100644 --- a/drivers/clk/ti/clk-7xx.c +++ b/drivers/clk/ti/clk-7xx.c @@ -590,7 +590,7 @@ { DRA7_L4SEC_AES1_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" }, { DRA7_L4SEC_AES2_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" }, { DRA7_L4SEC_DES_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" }, - { DRA7_L4SEC_RNG_CLKCTRL, NULL, CLKF_HW_SUP, "" }, + { DRA7_L4SEC_RNG_CLKCTRL, NULL, CLKF_HW_SUP | CLKF_SOC_NONSEC, "" }, { DRA7_L4SEC_SHAM_CLKCTRL, NULL, CLKF_HW_SUP, "l3_iclk_div" }, { 0 }, }; @@ -757,7 +757,7 @@ { DRA7_WKUPAON_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" }, { DRA7_WKUPAON_GPIO1_CLKCTRL, dra7_gpio1_bit_data, CLKF_HW_SUP, "wkupaon_iclk_mux" }, { DRA7_WKUPAON_TIMER1_CLKCTRL, dra7_timer1_bit_data, CLKF_SW_SUP, "wkupaon-clkctrl:0020:24" }, - { DRA7_WKUPAON_TIMER12_CLKCTRL, NULL, 0, "secure_32k_clk_src_ck" }, + { DRA7_WKUPAON_TIMER12_CLKCTRL, NULL, CLKF_SOC_NONSEC, "secure_32k_clk_src_ck" }, { DRA7_WKUPAON_COUNTER_32K_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" }, { DRA7_WKUPAON_UART10_CLKCTRL, dra7_uart10_bit_data, CLKF_SW_SUP, "wkupaon-clkctrl:0060:24" }, { DRA7_WKUPAON_DCAN1_CLKCTRL, dra7_dcan1_bit_data, CLKF_SW_SUP, "wkupaon-clkctrl:0068:24" }, diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 4cdeb8d..96d65a1 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -509,6 +509,9 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) data = dm816_clkctrl_data; #endif + if (ti_clk_get_features()->flags & TI_CLK_DEVICE_TYPE_GP) + soc_mask |= CLKF_SOC_NONSEC; + while (data->addr) { if (addr == data->addr) break; diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 773e2c4..e4b8392 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -83,11 +83,12 @@ enum { #define CLKF_HW_SUP BIT(6) #define CLKF_NO_IDLEST BIT(7) -#define CLKF_SOC_MASK GENMASK(10, 8) +#define CLKF_SOC_MASK GENMASK(11, 8) -#define CLKF_SOC_DRA72 BIT(8) -#define CLKF_SOC_DRA74 BIT(9) -#define CLKF_SOC_DRA76 BIT(10) +#define CLKF_SOC_NONSEC BIT(8) +#define CLKF_SOC_DRA72 BIT(9) +#define CLKF_SOC_DRA74 BIT(10) +#define CLKF_SOC_DRA76 BIT(11) #define CLK(dev, con, ck) \ { \ diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 2821f7c..1e8ef96 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -294,6 +294,7 @@ struct ti_clk_features { #define TI_CLK_DISABLE_CLKDM_CONTROL BIT(2) #define TI_CLK_ERRATA_I810 BIT(3) #define TI_CLK_CLKCTRL_COMPAT BIT(4) +#define TI_CLK_DEVICE_TYPE_GP BIT(5) void ti_clk_setup_features(struct ti_clk_features *features); const struct ti_clk_features *ti_clk_get_features(void); From patchwork Thu Apr 4 08:11: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: 161761 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297784jan; Thu, 4 Apr 2019 01:12:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG1mWauVohgD1ioXSmfbgdvHHeG2cfOtNUqPLPTI7L47fJ7DWXUx5gmhHhxUMBA8FTJqOc X-Received: by 2002:a17:902:bd92:: with SMTP id q18mr4988557pls.136.1554365548424; Thu, 04 Apr 2019 01:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365548; cv=none; d=google.com; s=arc-20160816; b=sq1N+e6alhlY/scbywBuiwPyAu+3ep2QGI1VbFa73rCMflNGLGOfJ9o45Tgszk4sai eY5o06+LiVJ4JMO7dGhiMzx9Ua9pXNX8ipEswyeuvHEve8b8U3mP2zAXZoPaA3Y7GN4k aulZk8+tNoNclLgzy6jpzSXqKtlW532C12l1uRU9SG6DepSAuuqPxREIxLvgxPHvYXuD RPO0ql6QKyXswIUXMyXEPzXzTaZy90A+ynpFuqgE5VFAEgXdbQpreUIOgNJHUWXAJB1P UdxF+iRqZb64AsifmAs3tEQJVafxMKpBO48hOHY+b/bXC7cX/JQKIyD8ArkYenCpEgu7 klog== 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=u1BDcpB9Luji9THZ2a0p38Y1IcnamjpjRDhQB0NQC40=; b=Rxp3E2yj9VKtXUwGCMqQFwKDRgkDD9n/Pfg+8leaWg5UdNCn0WBTi+/9ska7Ulxb0G vhD+sGJrV2vMAI4OI494/7jYHg2A1hZJOzBPprQkMqwhWqdfXcI//Dmuze1aZDRfX33L 88IYEUMSbx2gqkA+i8alYLe98LHNXVOxBIJ2oEK7ws5tWYaD3jOkvVKvchX2b0N3U4U/ kCmI0IqsegudfuNcTMBPUGChISNCI0or1SKOkyU4pAlmC+GLFaDBzt9VMq7yXcQCzmi3 F2974eU6kobzJh3D5JflLvkl8sjjf12wSG9n0msn+6oECbtCgiEPRLAQWAetUJG+2mSv OEYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xz+l2W48; 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 m12si7767545pgv.586.2019.04.04.01.12.28; Thu, 04 Apr 2019 01:12:28 -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=xz+l2W48; 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 S1726694AbfDDIM1 (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:27 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45364 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfDDIM1 (ORCPT ); Thu, 4 Apr 2019 04:12:27 -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 x348COnP057241; Thu, 4 Apr 2019 03:12:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365544; bh=u1BDcpB9Luji9THZ2a0p38Y1IcnamjpjRDhQB0NQC40=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xz+l2W48lVsx1QaK/zJyDVJGu0WWW+IJky76jdzMPwdey/dTweehrOHhlrARE6ArG Y5r+Cgn4dNGzMshID5b+y/LjrbXcGyNBODAr4/Ia+4A5TUSYp9i7JDQgEHlkfvpkrV lTQGBxNPpSV+eZ6WQuGxgINly+o2FVLO3tx7TiDQ= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348COg6056191 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:24 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) 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, 4 Apr 2019 03:12:23 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE102.ent.ti.com (10.64.6.23) 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, 4 Apr 2019 03:12:23 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8GC093305; Thu, 4 Apr 2019 03:12:21 -0500 From: Tero Kristo To: , , , CC: , Eric Ruei Subject: [PATCH 5/6] clk: ti: am33xx: drop idlest polling from gfx clkctrl clock Date: Thu, 4 Apr 2019 11:11:06 +0300 Message-ID: <1554365467-1325-6-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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: Eric Ruei The GFX modules on AM33xx SoCs have a hardreset line and are controlled by a GFX 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 GFX clocks. These details should be handled by the driver integration code itself. Signed-off-by: Eric Ruei Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-33xx-compat.c | 2 +- drivers/clk/ti/clk-33xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.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-compat.c b/drivers/clk/ti/clk-33xx-compat.c index 3e07f12..d11fb42 100644 --- a/drivers/clk/ti/clk-33xx-compat.c +++ b/drivers/clk/ti/clk-33xx-compat.c @@ -181,7 +181,7 @@ }; static const struct omap_clkctrl_reg_data am3_gfx_l3_clkctrl_regs[] __initconst = { - { AM3_GFX_CLKCTRL, NULL, CLKF_SW_SUP, "gfx_fck_div_ck" }, + { AM3_GFX_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "gfx_fck_div_ck" }, { 0 }, }; diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c index a360d31..7436e0f 100644 --- a/drivers/clk/ti/clk-33xx.c +++ b/drivers/clk/ti/clk-33xx.c @@ -217,7 +217,7 @@ }; static const struct omap_clkctrl_reg_data am3_gfx_l3_clkctrl_regs[] __initconst = { - { AM3_GFX_L3_GFX_CLKCTRL, NULL, CLKF_SW_SUP, "gfx_fck_div_ck" }, + { AM3_GFX_L3_GFX_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "gfx_fck_div_ck" }, { 0 }, }; From patchwork Thu Apr 4 08:11: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: 161762 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1297816jan; Thu, 4 Apr 2019 01:12:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1cs/ry3Djggo+0x5IiV0qqEh7nKW6kcdnPGK/iXlDr6Ce7V5BNosGeBQpKJMkMai65ssl X-Received: by 2002:a63:5858:: with SMTP id i24mr4473378pgm.222.1554365551980; Thu, 04 Apr 2019 01:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554365551; cv=none; d=google.com; s=arc-20160816; b=q81PN8xtJ31TXUdn60QwD+qCYI8pU1MaFxq78XH1rjX+gnAfNkvYDEBbqRtspE/eeP vQibMYlAc0BgNQrklWOUyZkMPNtM/gm25faPdaT8EEcG9skwWmAZY83A9WuSGpYhj/NA e2o7i07on0rkJkXeLYyio6eKalC+oJkYFGRUKw+EC343CBZha9Z8/Ze1BUgSZjfV+PFy Y65F1sGQUtDQ0HimqzaA0DC44BalP93cYXCzxJ8dnhutintkyGoPyxi6jjUER+opTS7D k2zXRVnFNKsFlVOm/inhPwzAnQ6u/yU5lzHvoBu3v7Y1ugTpNLIXzqDo+I4A+O4TVL3e 5Mlg== 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=TFvauUWsWvA21ez6hWIFoAZOdX/CAGXhrmUlNUztKXU=; b=SERB5jyLWpgrA9GfwN+HIfNkbg8VJNJQNywGsMri+e5ipYQsGubInJ1XErD0R2PjOB gMIFVpBKjYJ3hkca0Fd2dCQ9UEV1qKDAawDNC60PXoUsdPvMQ9BMSP23wDMiiVakn1Zd AezEPcJVnM1IQvLWO+2C1qf8A9/wWpevy8RY+S2ZgWYrUMFxSH1Co5Js+tLD9WWrL6vt YyfZ/ecZgzEHqyYeSen/abm8MNxu7GxeUXBL662tFrIGI+ZP16Lrl3pMHX/8RWpBYbg8 y2PojGYATn51cjFg7xG2wkkleMzAcyrAVSPuFbVN0fhQ1cSVsbud4gzqf/oER66q2pE0 SrAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Z24GdO1l; 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 m12si7767545pgv.586.2019.04.04.01.12.31; Thu, 04 Apr 2019 01:12:31 -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=Z24GdO1l; 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 S1727447AbfDDIMb (ORCPT + 5 others); Thu, 4 Apr 2019 04:12:31 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45412 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfDDIMb (ORCPT ); Thu, 4 Apr 2019 04:12:31 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x348CRlf057260; Thu, 4 Apr 2019 03:12:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554365547; bh=TFvauUWsWvA21ez6hWIFoAZOdX/CAGXhrmUlNUztKXU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Z24GdO1lsIsuMJlvjKUraOw9eogp1KxszBGR9HljCr1gmysoYOwveVrVeXO9CrZnp 6w39o5SkLdBGJWdMwbwt5igDn++BIRl4ARVBZd0TQy4ZZcNSnCt5MNA0PPVc+KfWJ3 GlFKOmQMZKw2iZTzDzReXVray3D310QLS9cJJjVw= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x348CRkR004977 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 03:12:27 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) 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, 4 Apr 2019 03:12:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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, 4 Apr 2019 03:12:25 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x348C8GD093305; Thu, 4 Apr 2019 03:12:24 -0500 From: Tero Kristo To: , , , CC: , Eric Ruei Subject: [PATCH 6/6] clk: ti: am43xx: drop idlest polling from gfx clkctrl clock Date: Thu, 4 Apr 2019 11:11:07 +0300 Message-ID: <1554365467-1325-7-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554365467-1325-1-git-send-email-t-kristo@ti.com> References: <1554365467-1325-1-git-send-email-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: Eric Ruei The GFX modules on AM43xx SoCs have a hardreset line and are controlled by a GFX 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 GFX clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to the GFX clkctrl clock so that these module status checks are skipped. Signed-off-by: Eric Ruei Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-43xx-compat.c | 2 +- drivers/clk/ti/clk-43xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.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-compat.c b/drivers/clk/ti/clk-43xx-compat.c index 5130398..ac8117d 100644 --- a/drivers/clk/ti/clk-43xx-compat.c +++ b/drivers/clk/ti/clk-43xx-compat.c @@ -65,7 +65,7 @@ }; static const struct omap_clkctrl_reg_data am4_gfx_l3_clkctrl_regs[] __initconst = { - { AM4_GFX_CLKCTRL, NULL, CLKF_SW_SUP, "gfx_fck_div_ck" }, + { AM4_GFX_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "gfx_fck_div_ck" }, { 0 }, }; diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c index 2782d91..9882a9b 100644 --- a/drivers/clk/ti/clk-43xx.c +++ b/drivers/clk/ti/clk-43xx.c @@ -73,7 +73,7 @@ }; static const struct omap_clkctrl_reg_data am4_gfx_l3_clkctrl_regs[] __initconst = { - { AM4_GFX_L3_GFX_CLKCTRL, NULL, CLKF_SW_SUP, "gfx_fck_div_ck" }, + { AM4_GFX_L3_GFX_CLKCTRL, NULL, CLKF_SW_SUP | CLKF_NO_IDLEST, "gfx_fck_div_ck" }, { 0 }, };