From patchwork Fri Nov 3 14:26:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117907 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532772qgn; Fri, 3 Nov 2017 07:28:02 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SuPPd86cv0Wr6aprFpUDNwuSnxgwrqL1FQyiPvMob77Gv0g6kO4vkOAaYU1zv/kAm+Axwx X-Received: by 10.99.186.73 with SMTP id l9mr7202497pgu.6.1509719282042; Fri, 03 Nov 2017 07:28:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719282; cv=none; d=google.com; s=arc-20160816; b=MOQSBS5Dsi8mjug4jhrthAyKk/HG1imC7zFH9Vqhihhuj5Tu0Doof4UX7dsGrCaSwz KATEf8DJdCuEtuZLrUpY6ZBnQjDV1TOUJ0Tw8/iZZB4duQ+gmn+m2ZmR1dOVAF0qrtOC t2+ehBZ0uC0EQfDiBOD8e24shE2Qw7FySWHWeXWqsx6MpuEswT/Oov3sH/y3ExYOZob+ QfynwqK+0DmZNKStF75BqRBea8QAuUCgMORphOaPwwKSz8GABGKYxtPPoVXWquL/ldz2 j4NCaFah2yyk9fvpFvc55O/F2/pgc1ocJ+VdBWrgN0jhEKq9iL1iFmu302hJP624vFwO GaIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=YBfqeI/7gu38znKW0sGkdLCvgULs2nTrmgPhl0Hw+HI=; b=RUGsEbBdq83XtClN6EBmQEmExqPqD+Ad6/YLWymVXOcu7Vt0AAaw8/yDGVakkbrDgA /QOH6QNEuUcOd+xkoZAvGao/jVlx0oO/29JlD9RgqtRkfhwmDxKmFUGQq/2V+Eokhro8 SCkCjb3txTSy/NnQyW1pKnTG69MDapA6wq1CVYjiarsmoU8Yxrm9s+E2GvG1kf3MK1bL U3ajlg8ysW9v5IWMMiUEfm125Wo909KKutIGm8DkkzBpqcyMrH1jAgv1eD+oZM3IbM91 eVqF0MUREpSkcmEYPVHVrjsUdrlq/qzul+Xce+3suB4AxJ7J7S6E53yQInYgkCu3macO Xgig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Ictv2Ik3; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si6270558pgc.415.2017.11.03.07.28.01; Fri, 03 Nov 2017 07:28:02 -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=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Ictv2Ik3; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379AbdKCO17 (ORCPT + 4 others); Fri, 3 Nov 2017 10:27:59 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:34540 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbdKCO16 (ORCPT ); Fri, 3 Nov 2017 10:27:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id vA3ER1pJ024078; Fri, 3 Nov 2017 09:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719221; bh=0ImrzJMhkV0eObum7DQ5Vxn0hLEnusPN8o5ogTshCD4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ictv2Ik3ScZ3AdO/Rz8lngo2ZyVF27sLhv80ZEbXP1e2j3tHSAr95fi85RUgP1ZTO RL5SNPjU0Jbo0/wE1l4rK/Yr18uw6DG1J2F8eNwuyMm9gM+R9qaDivrEuPY6MfTxem M2ha/wVE+/Wj/oXzH8eLzOuVlUUKck2QlaVXc8PI= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3EQuVb017491; Fri, 3 Nov 2017 09:26:56 -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_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 3 Nov 2017 09:26:55 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 3 Nov 2017 09:26:55 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3EQovu014982; Fri, 3 Nov 2017 09:26:54 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 2/7] ARM: OMAP4: CMINST: add support for translating clkctrl addresses Date: Fri, 3 Nov 2017 16:26:36 +0200 Message-ID: <1509719201-32700-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509719201-32700-1-git-send-email-t-kristo@ti.com> References: <1509719201-32700-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 Needed to map clkctrl clocks against hwmods. This patch also removes the obsolete clkdm_xlate_address function which is no longer needed for anything. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cminst44xx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 8774e98..0ea4c90 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -476,12 +476,9 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) return 0; } -static u32 omap4_clkdm_xlate_address(struct clockdomain *clkdm) +static u32 omap4_cminst_xlate_clkctrl(u8 part, u16 inst, u16 offset) { - u32 addr = _cm_bases[clkdm->prcm_partition].pa + clkdm->cm_inst + - clkdm->clkdm_offs; - - return addr; + return _cm_bases[part].pa + inst + offset; } struct clkdm_ops omap4_clkdm_operations = { @@ -499,7 +496,6 @@ struct clkdm_ops omap4_clkdm_operations = { .clkdm_deny_idle = omap4_clkdm_deny_idle, .clkdm_clk_enable = omap4_clkdm_clk_enable, .clkdm_clk_disable = omap4_clkdm_clk_disable, - .clkdm_xlate_address = omap4_clkdm_xlate_address, }; struct clkdm_ops am43xx_clkdm_operations = { @@ -509,7 +505,6 @@ struct clkdm_ops am43xx_clkdm_operations = { .clkdm_deny_idle = omap4_clkdm_deny_idle, .clkdm_clk_enable = omap4_clkdm_clk_enable, .clkdm_clk_disable = omap4_clkdm_clk_disable, - .clkdm_xlate_address = omap4_clkdm_xlate_address, }; static struct cm_ll_data omap4xxx_cm_ll_data = { @@ -517,6 +512,7 @@ struct clkdm_ops am43xx_clkdm_operations = { .wait_module_idle = &omap4_cminst_wait_module_idle, .module_enable = &omap4_cminst_module_enable, .module_disable = &omap4_cminst_module_disable, + .xlate_clkctrl = &omap4_cminst_xlate_clkctrl, }; int __init omap4_cm_init(const struct omap_prcm_init_data *data)