From patchwork Fri Nov 3 14:26:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117908 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532885qgn; Fri, 3 Nov 2017 07:28:07 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TzclTmxlaBxcWk09MHiQmX52sBR2r4q4ICrt9HqDW173ycw/B/x5y2k7p83QisvfZoZ/37 X-Received: by 10.159.234.68 with SMTP id c4mr6871071plr.52.1509719287708; Fri, 03 Nov 2017 07:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719287; cv=none; d=google.com; s=arc-20160816; b=e4RnaKCw0OIUnk/TalPEzLjtXE9BCMrS9GjCa/waizKCf4OopdIcoDENAYMWZ1ETAw pInnQwYb8U/Vjav9FxV/LrOOOJt6MuafDvDgPqgZ9lfSpHvRt+iXMT0BxlckRor0f5Ki uGsitwVjo+iVbF5IM5X0bzPhaEkqsuiGiR2pGrIZ2/g0bScvVLOCR0oHe+K8qUJq5xTA Bo44mOPTFqjauDumfl2Tjprb9F2Tb/O7jaC/Eta33EYBe6HGhhHbo4JoLDuyCi0jz1mN 7S00HzYngyOYfBY16nzOb5Jln4EyZAVlJsoKhYdL2gCowMuajQOgHWBtdTtFKgPJGSJJ iVVg== 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 :arc-authentication-results; bh=Kt5Cn22SWt++M/JfkbaPa7VB6jUD3tKH+ST0jgkxmZ0=; b=n/RyREv1K+FRmDymDP+4XqqAhM0SiWUENnCm2GdrNpvHhPjxafY9B4sZtQIwSlyPOB s4SolJN9haib1ZFi2YyMENOxKB1Em/YMyN4gd40Sr2iiXknAM2Am4RCLu+VO7JHH2zqJ gj2KErKXqmZYfKNxxzwrjqsql18xdmaa+THa6QhiYAX3UdZuvncq4x978KcJ+pHRqkMs wEXbzWUMDWx0y3swws8Xq2uGoLqNpf1Di9DeLtC32ERZ0b0ncQ9i1INaXSsDImb3esuf TU8Q3gfIoaiOASlu0/I0M4kLmk+NBK7JveYPJsRDuZvfdeEcw4YAPt/WdEBIgdiK9nDz +cBA== 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=P29WO5r4; 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 t1si4866060plb.265.2017.11.03.07.28.07; Fri, 03 Nov 2017 07:28:07 -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=P29WO5r4; 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 S1754718AbdKCO2E (ORCPT + 4 others); Fri, 3 Nov 2017 10:28:04 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:34541 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754684AbdKCO2D (ORCPT ); Fri, 3 Nov 2017 10:28:03 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id vA3EQxw0024073; Fri, 3 Nov 2017 09:26:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719219; bh=/UBUdMivsQMOnNfG+SLsxS4PQ9Ohd+/xeVjDRHiIXzw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P29WO5r41yASsXH+0Lwfx2uoQA/epfVN7tWxcTZVxUT8J3RsNKX8AdDvd+3WY/bRN lCcuVP8QKD/qiT5sxBFBxels408OcPhvDn0LLacAHUcA2QNp6/1WbOtQzmOYbHSnkT cr4NeSD9cgeMHcVs8IjWlcIqalTAOl3hJHs6nlpQ= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3EQsTl010963; Fri, 3 Nov 2017 09:26:54 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE109.ent.ti.com (10.64.6.30) 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:54 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE108.ent.ti.com (10.64.6.29) 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:54 -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 vA3EQovt014982; Fri, 3 Nov 2017 09:26:53 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 1/7] ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register Date: Fri, 3 Nov 2017 16:26:35 +0200 Message-ID: <1509719201-32700-2-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 Add a new CM API for fetching the physical address of a hwmod clkctrl register. This is needed to map omap hwmods against clkctrl clocks, the existing support for clkdm address translation was not sufficient to handle the mutant cases where the clockdomain offset is completely off from the clkctrl ones. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cm.h | 3 +++ arch/arm/mach-omap2/cm_common.c | 10 ++++++++++ 2 files changed, 13 insertions(+) -- 1.9.1 -- 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/cm.h b/arch/arm/mach-omap2/cm.h index e833984..39c9c10 100644 --- a/arch/arm/mach-omap2/cm.h +++ b/arch/arm/mach-omap2/cm.h @@ -52,6 +52,7 @@ * @wait_module_idle: ptr to the SoC CM-specific wait_module_idle impl * @module_enable: ptr to the SoC CM-specific module_enable impl * @module_disable: ptr to the SoC CM-specific module_disable impl + * @xlate_clkctrl: ptr to the SoC CM-specific clkctrl xlate addr impl */ struct cm_ll_data { int (*split_idlest_reg)(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, @@ -62,6 +63,7 @@ struct cm_ll_data { u8 idlest_shift); void (*module_enable)(u8 mode, u8 part, u16 inst, u16 clkctrl_offs); void (*module_disable)(u8 part, u16 inst, u16 clkctrl_offs); + u32 (*xlate_clkctrl)(u8 part, u16 inst, u16 clkctrl_offs); }; extern int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, @@ -72,6 +74,7 @@ int omap_cm_wait_module_idle(u8 part, s16 prcm_mod, u16 idlest_reg, u8 idlest_shift); int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs); int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs); +u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs); extern int cm_register(struct cm_ll_data *cld); extern int cm_unregister(struct cm_ll_data *cld); int omap_cm_init(void); diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c index d555791..1752e92 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c @@ -175,6 +175,16 @@ int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs) return 0; } +u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs) +{ + if (!cm_ll_data->xlate_clkctrl) { + WARN_ONCE(1, "cm: %s: no low-level function defined\n", + __func__); + return 0; + } + return cm_ll_data->xlate_clkctrl(part, inst, clkctrl_offs); +} + /** * cm_register - register per-SoC low-level data with the CM * @cld: low-level per-SoC OMAP CM data & function pointers to register 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) From patchwork Fri Nov 3 14:26:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117910 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532988qgn; Fri, 3 Nov 2017 07:28:12 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Q/31voc5Ug2+pcC4LOrZC0pd3AjRHmtZqT90gUhBoCA75VFtuRCXvJc7ZYCN6OrmON7Hcv X-Received: by 10.84.240.2 with SMTP id y2mr6922713plk.372.1509719292038; Fri, 03 Nov 2017 07:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719292; cv=none; d=google.com; s=arc-20160816; b=MEYw4R2fFyttQETcwub+Syktiv9cnkmwv5dALyfgHVhDhXL3YOdCfGx9yXmfzUsPcI s+yH9ppDabOZKSce0Ns6ZnlJqiNPBI3fmOoRKg2PHN7cVNWg/RzA3VC9HkCBCHEE+46W jBk4E5Llpzrrm3QZiep8QAi/3aeurpaZ2KLWIn/Uzg1D/g1zVBIeVW0NwH9PaZQ266o9 lTb4na53bBL8m0i7qgh7m3aHXeUEUJUcDnPRltY1cq+qssqhzpJY/mfJIKXSpGRF99vb AvuhthRxia8cCigwxIS4sqzXyAe9et+AA90Kl7Ld7gC3Z1j3d9Iu6MH1igllcQKKe7qs KOlQ== 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=GnRpIjx5s6OKW0QT9tp6vi9EFNEsvBzT/+/32r/BVZU=; b=smc9ZDrTg7n/pYEm621IvrzctDQs4/aTA9DMckvFkDIqYptKVO7BKjYQz16TCpN7Cn bQlKWgZMyDk+ls5skOlFrpOtByigRzcDfE3hLrStVWrq/Iq7Y49IxAH0T5uS+8u32S4D 3yxx4C5fhUc97Gsm+S/ACvQxA8OJ+wxampahmOgrDgIuKgLtGNC0ezGLiqNZTYnw1W+2 Bw66SOC/S0Qi7XkmIm3mmTuHsaSgriwzek3YWN1cK7WodrgsmD/WlnoEFTF/XlJNbf5R InVtgInC3EIQorH+gShjvXvuuThEYa2QHo9MEHR8cvHQ9rqG09ooSAmFyKwKnWzULT9V Y+Hw== 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=EnY7/uzQ; 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 t1si4866060plb.265.2017.11.03.07.28.11; Fri, 03 Nov 2017 07:28:12 -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=EnY7/uzQ; 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 S1754609AbdKCO2J (ORCPT + 4 others); Fri, 3 Nov 2017 10:28:09 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:34543 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbdKCO2G (ORCPT ); Fri, 3 Nov 2017 10:28:06 -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 vA3ER4f4024088; Fri, 3 Nov 2017 09:27:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719224; bh=IB6apNnQVMZZnhtF1C7+bna422CGjB1cswLB8oI75nw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EnY7/uzQGwpvL49CuJGyOzmuLr2rtvwYiZNO+eVCVo9bvxq3kke7DcrBsIUDz2Jiv hnPdwv/0kgTt77/8hIfnYIFnFIS/NDs72K6MqiIpQsb5S2K4H949kvPkxSZF6+SRG9 c4dHc9bDFspDNt7y/mHRordv8SX4lJkFTa1Fht08= 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 vA3EQxHc017536; Fri, 3 Nov 2017 09:26:59 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) 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:59 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE108.ent.ti.com (157.170.170.38) 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:59 -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 vA3EQovv014982; Fri, 3 Nov 2017 09:26:56 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 3/7] ARM: OMAP2+: hwmod: fix clkctrl address translation logic Date: Fri, 3 Nov 2017 16:26:37 +0200 Message-ID: <1509719201-32700-4-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 There are cases where clkctrl clock offsets do not match the corresponding clockdomain, and this case the existing mapping functionality will fail. Fix this by adding the whole address range for a clkctrl provider and matching the actual clkctrl registers against these ranges. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod.c | 72 +++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 37 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/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2dbd632..bb7c745 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -185,15 +185,15 @@ /** * struct clkctrl_provider - clkctrl provider mapping data * @addr: base address for the provider - * @offset: base offset for the provider - * @clkdm: base clockdomain for provider + * @size: size of the provider address space + * @offset: offset of the provider from PRCM instance base * @node: device node associated with the provider * @link: list link */ struct clkctrl_provider { u32 addr; + u32 size; u16 offset; - struct clockdomain *clkdm; struct device_node *node; struct list_head link; }; @@ -223,8 +223,7 @@ struct omap_hwmod_soc_ops { void (*update_context_lost)(struct omap_hwmod *oh); int (*get_context_lost)(struct omap_hwmod *oh); int (*disable_direct_prcm)(struct omap_hwmod *oh); - u32 (*xlate_clkctrl)(struct omap_hwmod *oh, - struct clkctrl_provider *provider); + u32 (*xlate_clkctrl)(struct omap_hwmod *oh); }; /* soc_ops: adapts the omap_hwmod code to the currently-booted SoC */ @@ -716,45 +715,28 @@ static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) { } }; -static int _match_clkdm(struct clockdomain *clkdm, void *user) -{ - struct clkctrl_provider *provider = user; - - if (clkdm_xlate_address(clkdm) == provider->addr) { - pr_debug("%s: Matched clkdm %s for addr %x (%s)\n", __func__, - clkdm->name, provider->addr, - provider->node->parent->name); - provider->clkdm = clkdm; - - return -1; - } - - return 0; -} - static int _setup_clkctrl_provider(struct device_node *np) { const __be32 *addrp; struct clkctrl_provider *provider; + u64 size; provider = memblock_virt_alloc(sizeof(*provider), 0); if (!provider) return -ENOMEM; - addrp = of_get_address(np, 0, NULL, NULL); + addrp = of_get_address(np, 0, &size, NULL); provider->addr = (u32)of_translate_address(np, addrp); - provider->offset = provider->addr & 0xff; + addrp = of_get_address(np->parent, 0, NULL, NULL); + provider->offset = provider->addr - + (u32)of_translate_address(np->parent, addrp); provider->addr &= ~0xff; + provider->size = size | 0xff; provider->node = np; - clkdm_for_each(_match_clkdm, provider); - - if (!provider->clkdm) { - pr_err("%s: nothing matched for node %s (%x)\n", - __func__, np->parent->name, provider->addr); - memblock_free_early(__pa(provider), sizeof(*provider)); - return -EINVAL; - } + pr_debug("%s: %s: %x...%x [+%x]\n", __func__, np->parent->name, + provider->addr, provider->addr + provider->size, + provider->offset); list_add(&provider->link, &clkctrl_providers); @@ -775,32 +757,48 @@ static int _init_clkctrl_providers(void) return ret; } -static u32 _omap4_xlate_clkctrl(struct omap_hwmod *oh, - struct clkctrl_provider *provider) +static u32 _omap4_xlate_clkctrl(struct omap_hwmod *oh) { - return oh->prcm.omap4.clkctrl_offs - - provider->offset - provider->clkdm->clkdm_offs; + if (!oh->prcm.omap4.modulemode) + return 0; + + return omap_cm_xlate_clkctrl(oh->clkdm->prcm_partition, + oh->clkdm->cm_inst, + oh->prcm.omap4.clkctrl_offs); } static struct clk *_lookup_clkctrl_clk(struct omap_hwmod *oh) { struct clkctrl_provider *provider; struct clk *clk; + u32 addr; if (!soc_ops.xlate_clkctrl) return NULL; + addr = soc_ops.xlate_clkctrl(oh); + if (!addr) + return NULL; + + pr_debug("%s: %s: addr=%x\n", __func__, oh->name, addr); + list_for_each_entry(provider, &clkctrl_providers, link) { - if (provider->clkdm == oh->clkdm) { + if (provider->addr <= addr && + provider->addr + provider->size >= addr) { struct of_phandle_args clkspec; clkspec.np = provider->node; clkspec.args_count = 2; - clkspec.args[0] = soc_ops.xlate_clkctrl(oh, provider); + clkspec.args[0] = addr - provider->addr - + provider->offset; clkspec.args[1] = 0; clk = of_clk_get_from_provider(&clkspec); + pr_debug("%s: %s got %p (offset=%x, provider=%s)\n", + __func__, oh->name, clk, clkspec.args[0], + provider->node->parent->name); + return clk; } } From patchwork Fri Nov 3 14:26:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117909 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532941qgn; Fri, 3 Nov 2017 07:28:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RC4VVBbVsc/64Y3lJ4J7WEXpnCud3MUsNgEzjNntZxIrz+QkHn2AXO3S0G498tc7KcwAri X-Received: by 10.99.95.137 with SMTP id t131mr7350400pgb.330.1509719290340; Fri, 03 Nov 2017 07:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719290; cv=none; d=google.com; s=arc-20160816; b=v0H73zzC2qCc52of29fgVNmwMJAo5tAf8uoThrSf+f3r1cn+LosP7OlYzn844YCNtL L+G8lVzx2ynshlM80Rp7tvzhpDDDleC8iPVvPNUgV1DXYvJEsK0/PXvOgKgoqIhFUqaL dMf96c1fmGft7IS/WcTu973ud1Kmo6GGe/s/ywussZAIn2tLA5v5UXJYRZ0DWnixygZZ OO5xTFr5q7JpAA4fiqQjV2nw8EnggzBW61JMLkFMGExC7xdy3p4euO7HiwOx6bs9i9K7 yYh6HV4PTW28Ey9pR5TrNiXDwLrHbkbOpEgBmk9CYSCz04Tw9FlLMxHood5m9Gj5Dw/V R2ew== 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 :arc-authentication-results; bh=1ccyPt7GPPKs0d+xeuzjH6iF9J6QhJRsJ2HUVYiFtng=; b=q24YbVkzl3PcpbobNdPyLpaUAJzH/vTlcGlERCaZKdPYEOtwapd94vh2XSwUkOtWbe 83FUq4eyubBI6nQbJlvP9+7OPGM0qQc4KGi4YmOD6VR7K0mZFmM14Qkvuer+lMmunoG+ wKENM41MII/aeE8/nPBRUrALPs/1+nNLUFeSp0mnCwbRGTDCXl1hyLJS0xX85hUaFR+9 ZpwUhfi2TLsEFZe4t6lZKNE0ioHxN2y4gTvQ79oVmI6PkUQDfq0m6iElaGGTi8PX4614 PBhJhw5F6Kw+0wrPpcALSUtfSifwOxz42QEYQoH3ZgL3SjL5jdA4dhH4hBuLi1nRwFiz SFXw== 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=CbHh0Lkw; 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 t1si4866060plb.265.2017.11.03.07.28.10; Fri, 03 Nov 2017 07:28:10 -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=CbHh0Lkw; 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 S1754684AbdKCO2I (ORCPT + 4 others); Fri, 3 Nov 2017 10:28:08 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:34544 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754609AbdKCO2G (ORCPT ); Fri, 3 Nov 2017 10:28:06 -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 vA3ER69a024095; Fri, 3 Nov 2017 09:27:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719226; bh=gWEENPRJblQjwvJY8twrGcDycUItif5S72IJXUJtCGY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CbHh0LkwR29B33+2CnkBTvtL4KdZ+w4qvyTdn0GDOneQPjI9Vr6+g+8tI+bFqJ2Xo EXpN2KR6+AvdmZNWZhSXSPrBH2vyoyDT5pWffwNVZFinv6q9F/SubFPficTLAsxafN IIyc3M9wD/A6jdkIcq/ukJwzzwhwM0+szhiD8yOo= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3ER161017585; Fri, 3 Nov 2017 09:27:01 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE100.ent.ti.com (157.170.170.30) 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:27:00 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE100.ent.ti.com (157.170.170.30) 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:27:00 -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 vA3EQovw014982; Fri, 3 Nov 2017 09:26:59 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 4/7] ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API Date: Fri, 3 Nov 2017 16:26:38 +0200 Message-ID: <1509719201-32700-5-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 This is no longer used for anything so it can be dropped. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clockdomain.c | 8 -------- arch/arm/mach-omap2/clockdomain.h | 2 -- 2 files changed, 10 deletions(-) -- 1.9.1 -- 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/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 5189264..b79b1ca 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -1224,14 +1224,6 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) return 0; } -u32 clkdm_xlate_address(struct clockdomain *clkdm) -{ - if (arch_clkdm->clkdm_xlate_address) - return arch_clkdm->clkdm_xlate_address(clkdm); - - return 0; -} - /** * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm * @clkdm: struct clockdomain * diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 827f01e..24667a5 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -175,7 +175,6 @@ struct clkdm_ops { void (*clkdm_deny_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); - u32 (*clkdm_xlate_address)(struct clockdomain *clkdm); }; int clkdm_register_platform_funcs(struct clkdm_ops *co); @@ -214,7 +213,6 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); -u32 clkdm_xlate_address(struct clockdomain *clkdm); extern void __init omap242x_clockdomains_init(void); extern void __init omap243x_clockdomains_init(void); From patchwork Fri Nov 3 14:26:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117911 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3533018qgn; Fri, 3 Nov 2017 07:28:13 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S+MxYmieFCPid/28Z2w4kilC84gQpmHMJDQH2iuEnrm8gz72uCo9K9E+DJBUP7vJ9hejyu X-Received: by 10.84.160.226 with SMTP id v31mr7005109plg.302.1509719293437; Fri, 03 Nov 2017 07:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719293; cv=none; d=google.com; s=arc-20160816; b=VPyi4eggtmMAVx4pYMPQ/bs5vhRb4388HzRENxfR5+1k3gixrkZTaMlo9pBTAaPIDC 5aRMmoEsVvc3AsCfZKxRg8cXxHg8muM7tffXpAD8m8hMzsRW4zhTicsAo/IZXVOzxq5s 1qQv747/nlyabsdczrzO12XJvF0G56+mUfIpniV8vsG2A+O07lDWbXtE37YlnG/bCbzR vOyFnljCAJ6ynMIjKgF5atEevaLjoC55VYVcR2axl8CwqwWy69y1q27VnPYuGofYitkU 93EdzFMPxaDVvXtz6n+Qe5RZwgk+Ew28DNzg1axP8wm7iSu4+oic3K76LGKoSB8KR/oz fTgA== 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 :arc-authentication-results; bh=Jtv3LHD3daK+oGdvQFf66Kp9s0Au448vW+2JPfaVsUs=; b=lOYCeHb/lr+lc220vWlMT9KB5dZZ9/NLLBY+aEuyl+QpCFtLgNZqAYTkEpncPlfROe ts4eY2v98ksKq+AUkbgoMNnbtCwRqCCUhHzB8rdM883BidVz9IorBUN6XlurUFR135Yj 11l/LO+1VBcnlV0iLFPgirN60TpBt37sDQfBMvrFT6bewDOYfX/rvNQEcl8buOrHLw1D tHLWvkuLL4+NNF+xGZsUJ4rYcOASylyqQt6QD6aVe4/t2LlrKWI99USiCgKKlzaV8Q3f zSpoak9nTza5Zm20P/pLgnByEC2n2/aIKcnJduRxRRqN8pfpbwP9gx9eHB4cV1LcMPWr NNRQ== 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=K4XNPFPD; 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 t1si4866060plb.265.2017.11.03.07.28.13; Fri, 03 Nov 2017 07:28:13 -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=K4XNPFPD; 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 S1752302AbdKCO2K (ORCPT + 4 others); Fri, 3 Nov 2017 10:28:10 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:34547 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbdKCO2J (ORCPT ); Fri, 3 Nov 2017 10:28:09 -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 vA3ER8KW024105; Fri, 3 Nov 2017 09:27:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719228; bh=8/ZXHjsudj2oXefFT/ASRXPMdFqtn4DOQ2EX9EPiXQc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=K4XNPFPDorB3I9nKdYRoltaoq2rUcbT6gGScfk7aAJwxab075tQa0sUkP/KdszGNy QXE+LqS4HZly9K7M+AlQCyUjuUS8uYyHfDJ//PB/elr92Dezi5+LaXkhx2q36PZfAJ weNqp7155tO5hgTrv43BVcD96PecxUq3gMrcIrK4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3ER2KT017670; Fri, 3 Nov 2017 09:27:03 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE103.ent.ti.com (10.64.6.24) 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:27:02 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE107.ent.ti.com (10.64.6.28) 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:27:02 -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 vA3EQovx014982; Fri, 3 Nov 2017 09:27:01 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 5/7] ARM: AM33xx: CM: add support for getting physical address for a register Date: Fri, 3 Nov 2017 16:26:39 +0200 Message-ID: <1509719201-32700-6-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 for mapping the hwmods towards their corresponding clkctrl providers and clocks. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cm33xx.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.9.1 -- 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/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index a9e08d8..cf75bbe 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -333,6 +333,11 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm) return 0; } +static u32 am33xx_cm_xlate_clkctrl(u8 part, u16 inst, u16 offset) +{ + return cm_base.pa + inst + offset; +} + struct clkdm_ops am33xx_clkdm_operations = { .clkdm_sleep = am33xx_clkdm_sleep, .clkdm_wakeup = am33xx_clkdm_wakeup, @@ -347,6 +352,7 @@ struct clkdm_ops am33xx_clkdm_operations = { .wait_module_idle = &am33xx_cm_wait_module_idle, .module_enable = &am33xx_cm_module_enable, .module_disable = &am33xx_cm_module_disable, + .xlate_clkctrl = &am33xx_cm_xlate_clkctrl, }; int __init am33xx_cm_init(const struct omap_prcm_init_data *data) From patchwork Fri Nov 3 14:26:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117905 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532342qgn; Fri, 3 Nov 2017 07:27:39 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QXuNp5CWfoV91iQjR1bNslukg3jUn3gj4JAQBNbPZ5C1Rwg5I4ilwCwXIS9tSji6tlO2Wn X-Received: by 10.98.202.133 with SMTP id y5mr7947329pfk.122.1509719259569; Fri, 03 Nov 2017 07:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719259; cv=none; d=google.com; s=arc-20160816; b=hQ4UdC3Hc1ldtDvyjL4qJ7En0H9adjXQVhr4ZmtCUuytznK/AdGS7ALOnyFwJUk5YQ Csx5KY8km0BGkd3hs76LDkRX5CvWzK4e+p5rSKBBJ2jDAVZ0lQmooqSy00IOU1Cmk+PH w+GVotGlfeXBQftmh44GXuU5DTJTzx6gr/4FBGG6pC3uDKGRSADM5U1DEl6yn1MeEfZK SSzL8xbKFDT+zjD8ssOzQwRVp80ToDz0D+TsYTjM0aYJb+2FFFwRLH6siPUWH9oGJBgr j/zEiDclYulFjfl6IggsRSKaRYbg8qNo5QTuDf+IdglkHlgP9CKRDFWGsMtkA+uHpv9y W8/w== 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 :arc-authentication-results; bh=XHgkC7MLtoPmqOYO4tnUVdoZPEeM/wLe+HOqd5Xk/u4=; b=fvroKpPXiyGJlSzo+tAkV/sm67LI8eGzm0a86H3SpsvvNiPSLzXQErjcnlN+uJttKg W7+X4QcGG3RbHQMZQaMDn/RLmQtYirPKuTmLMKY95SlvZDGXmz7mj+4td48Z2xv2WT70 MIdBk8nz4Mow61kPDItqFftUX4KWLHV+CbMkGm4EiA9DroUTq5msm25hZe/Rn1a+ZT6w eQQackrbuacciayDzzYLyfcFvfKKdxWCq2D0yYAJGW4K0bwX7SvOrwSyz+c8QZEk2/Z7 o7JuM7IzQjByDsYdSo1TAXGuzNGVK+qzyl75HmPNCHObJK2H+3XcqWngCqMQmAKPsEob B5lw== 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=qbOJ158h; 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 v31si4975960plg.808.2017.11.03.07.27.39; Fri, 03 Nov 2017 07:27:39 -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=qbOJ158h; 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 S933468AbdKCO1g (ORCPT + 4 others); Fri, 3 Nov 2017 10:27:36 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:31259 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933449AbdKCO1c (ORCPT ); Fri, 3 Nov 2017 10:27:32 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vA3ER4LZ019055; Fri, 3 Nov 2017 09:27:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719224; bh=sO80gySu4T3pgTwAQd2AnoED+PD2HaBVPhds0V1Q4og=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qbOJ158hhvgWNQOi8UocdJCS9dr8NVOfMNluB7oaIVA7uvcVdbGXpkz91ag1jv7Cn mxactKIjUAiYhAZAXDPucADlkzTE1iyImY6z89g5tosriuAlxFD+T1guuuibcuxm/O 3Vuzh10qtJXFfCsrDB5AHgcYCCMaAChtip4answw= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3ER4CZ011490; Fri, 3 Nov 2017 09:27:04 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE105.ent.ti.com (157.170.170.35) 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:27:03 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE100.ent.ti.com (157.170.170.30) 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:27:03 -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 vA3EQow0014982; Fri, 3 Nov 2017 09:27:02 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 6/7] ARM: OMAP2+: hwmod: calculate physical register address on am33xx Date: Fri, 3 Nov 2017 16:26:40 +0200 Message-ID: <1509719201-32700-7-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 Add support for the address translation logic for am33xx. Needed for mapping hwmods towards their corresponding clkctrl providers and clocks. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod.c | 1 + 1 file changed, 1 insertion(+) -- 1.9.1 -- 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/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index bb7c745..ca5ca76 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3840,6 +3840,7 @@ void __init omap_hwmod_init(void) soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; soc_ops.init_clkdm = _init_clkdm; soc_ops.disable_direct_prcm = _omap4_disable_direct_prcm; + soc_ops.xlate_clkctrl = _omap4_xlate_clkctrl; } else { WARN(1, "omap_hwmod: unknown SoC type\n"); } From patchwork Fri Nov 3 14:26:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117906 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3532338qgn; Fri, 3 Nov 2017 07:27:39 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Qzo85XEU9rBx2XSfSszLrNJ+HvDdCrapl4cnPUzOtFG8u2ky9yzVI1Z0nQnAO3/6gdQXcl X-Received: by 10.98.110.73 with SMTP id j70mr7933504pfc.146.1509719259104; Fri, 03 Nov 2017 07:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719259; cv=none; d=google.com; s=arc-20160816; b=UQTOQ9GP6XBAe7r6NCRzUGzmsEj1cb80naOHrby6NaqsBi30ZFmBWJ25yX89uZeDtS 5j+ICo7CVgzL/C3IzLxoo7D4nNHs+ZU76NS0/oB01tvSa+1tJUh2GJ0hTaTgrgy7VihT dZ4/4k9xe7+A7AtRlVcHazmLCXO45PceV7CK1XzaKI91vkUZ/fhYENEEdcJuU04q8XNV wNUCDxO77fOJPOYLUpX2d+81cNewtD7vdizLq4fOSru8xK9yHOZ8nVBek25i45qi/flt ATjmr3KGUydkhS3bwA6CwCdeZ1nSUcyVoyOsYNOsVyrksTrhlqE8KODFWncyflT7/2CD omEw== 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 :arc-authentication-results; bh=L74mkgUcPDHK2JSjT/2vc4KsGWNUbNEFUg54EdJ4Gas=; b=pJ6ZYD+7P2KVTOEDsxKCYttJZoDjqaXxqXRjvAzCaEDMKp84SZBwh4xhxbnsq+sADp Idgn7Jw63QioMDOFowiyu2l/8Z4tWCoxP5+/I0NRD6EQlPCF9agp+9Rq0j49boRv/sJM l2Epqcow1hDTm/ySiRU5RVt2HMj+oNdFZjypcIqzEw5aIHILQsJ8mzoZvwnAO3VHwnwI I5welZf6bUJMtNmNbEY8Lx8fmc8yDsWRN2C0C1Q5dBXzHuXzLAO5v6gId2FM9b5UkwsD /KnSGtSqQN4g/WiuguzJnT6JSlxB/kTlSS1wL3fFLqsHkXC/NTMHG4ndvWAbTic6xed4 Gpcg== 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=Kyk/gTxy; 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 v31si4975960plg.808.2017.11.03.07.27.38; Fri, 03 Nov 2017 07:27:39 -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=Kyk/gTxy; 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 S932173AbdKCO1f (ORCPT + 4 others); Fri, 3 Nov 2017 10:27:35 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:31260 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933457AbdKCO1c (ORCPT ); Fri, 3 Nov 2017 10:27:32 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vA3ER5Z8019059; Fri, 3 Nov 2017 09:27:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509719225; bh=c0E3mW0Eps0jxQVpcHjPJxLq8C7T/Fp8CxPCpCunUh0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Kyk/gTxy+pOQgKvN0h3nukeiQtZWk4CcGJGAie/DAqgjdSmCaVW8nqyaqZo7NX5BS 2ebZsWVc1SNEWp8SWhfR/xlt7wswApy2Ji4SPIe5UUaRJ9GkKwauJO3WWomyjOiHaK d0CtFHMHFBEzARvwxpL5hUF2JX6Kn4whZJPLn7II= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vA3ER5Pc011532; Fri, 3 Nov 2017 09:27:05 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE100.ent.ti.com (157.170.170.30) 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:27:05 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE108.ent.ti.com (157.170.170.38) 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:27:05 -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 vA3EQow1014982; Fri, 3 Nov 2017 09:27:04 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 7/7] ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod Date: Fri, 3 Nov 2017 16:26:41 +0200 Message-ID: <1509719201-32700-8-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 "default_sata_clkdm" does not exist, instead replace this with the correct clockdomain name which is just "default_clkdm". Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 2 +- 1 file 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 -- 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/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c index 310afe4..95f1222 100644 --- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c @@ -988,7 +988,7 @@ static struct omap_hwmod dm81xx_sata_hwmod = { .name = "sata", - .clkdm_name = "default_sata_clkdm", + .clkdm_name = "default_clkdm", .flags = HWMOD_NO_IDLEST, .prcm = { .omap4 = {