From patchwork Mon Oct 30 09:11:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117453 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2337573qgn; Mon, 30 Oct 2017 02:11:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S/QAuAWHr1dzeFrG2kwnL/K1XaEIEeSNB+/dcZ7E5tOKYoQ4/wokqq3s1il3QAGJz0KqjV X-Received: by 10.98.64.75 with SMTP id n72mr8008831pfa.317.1509354708973; Mon, 30 Oct 2017 02:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509354708; cv=none; d=google.com; s=arc-20160816; b=EMvQM0TnpN6UKKq56sT7jyuvQ0QRXcizmabMhZq+7ML+FILyZTuEAmdRQWYwyUmAWN p6Ezias7tVw2hf2bW0ay5kdbFjGuA0gM5/GtIr5UwYj73Cp5kl+6jFkpLi5QRKRrdAGw hoEVp6PZ715+ENQgWbHVuCNhBRlgmQkiGkIHHMwgmOsjKyKWat94oSoG2hkydQnPxsLg t66rku8DsypGt0GwKjcDFDt/F6N9Qy5ZG5GtXGsdh1Ig8GQz0qtN77Pyy6okhjlx+izg ZPhXkmI+y4R3GxPuQVDTCCHpnak/YjC5uJK1JEwJ8gOpqfCfRtVBXyl73LGHaW5YVQq5 3rKA== 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=ObwcJZGtdb2vqn+OHLOpqulaF2TJ4aMfdb4WUA/L9Pk=; b=0de7uQAn13SGJW1vLD5oiumZ26YAOxRURBpBJ1dcqPPbvIxqKPwilUfQgvcUiDawF4 7aYmtYO8rmbWTKz5mPQGawD3hkwxDuEq5Zik1Igpo8Bo4m4O7r9JkqHKma0q0CB4a+43 uxYKAATpu4O5sljgruy5farJzDAcTSKo+Kc6BaL45gvey2giLMt8Cfe/dPtA5CWSdy6O zoACr7YhpeGPpxCzEgMyyKIOWnm896cEFVeIB8s2FScRzwGUxeKgKy1mUA9yznJrG63l +lCeeveyO7a64ZMCqWRjDxgTgY37RxsNlajQg3TLFW6gV2HR0iEALvOrZBgs8E3Om9Er L7vQ== 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=hhTrIxoM; 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 c25si9579140pgn.756.2017.10.30.02.11.48; Mon, 30 Oct 2017 02:11:48 -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=hhTrIxoM; 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 S1751630AbdJ3JLr (ORCPT + 4 others); Mon, 30 Oct 2017 05:11:47 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:56607 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdJ3JLq (ORCPT ); Mon, 30 Oct 2017 05:11:46 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9U9BFRM007432; Mon, 30 Oct 2017 04:11:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509354675; bh=v2F6v1h+hsw8CRRxFRKeo2ImeyLRg1hlt+3Ps+zpLR8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hhTrIxoM4oBLx5XUx6TboeLS04w0BqMP/WXl50znxH85HMpWz7bnMQ9+/LgJMWbMI 8d8RePhhh6GVgM+eqOtFBVPfgM6QI5xxVJwJgmrl8ZNFQxJc/tUmcKy0KLg54txFji qRB9tgC5cbsPg3fJMoiVvGKUbtBv9HcxyHWLnukc= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U9BFKq027897; Mon, 30 Oct 2017 04:11:15 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 30 Oct 2017 04:11:15 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 30 Oct 2017 04:11:15 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U9BCxJ008159; Mon, 30 Oct 2017 04:11:14 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 1/2] ARM: OMAP3: hwmod_data: add missing module_offs for MMC3 Date: Mon, 30 Oct 2017 11:11:03 +0200 Message-ID: <1509354664-27694-2-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509354664-27694-1-git-send-email-t-kristo@ti.com> References: <1509354664-27694-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 MMC3 hwmod data is missing the module_offs definition. MMC3 belongs under core, so add CORE_MOD for it. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/omap_hwmod_3xxx_data.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_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index c327643..c12e7b5 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -1656,6 +1656,7 @@ .main_clk = "mmchs3_fck", .prcm = { .omap2 = { + .module_offs = CORE_MOD, .prcm_reg_id = 1, .module_bit = OMAP3430_EN_MMC3_SHIFT, .idlest_reg_id = 1, From patchwork Mon Oct 30 09:11:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117452 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2337569qgn; Mon, 30 Oct 2017 02:11:48 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Qn5oIWmtdxts2oDbZXKxfcdaLzkADEjqy8F533c5U2K+oSxfPWNnXuXtG7Ud7iXnC5lYXg X-Received: by 10.159.252.133 with SMTP id bb5mr6712308plb.415.1509354708727; Mon, 30 Oct 2017 02:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509354708; cv=none; d=google.com; s=arc-20160816; b=PMFuQFoaYkMfEepK7kVzHzWZ5m6gsUVgGP79ms91AOwLU8X1ScC4Q8LPuYSNudzRdy y6ggCwgVPnYR3lURCZfIdT1ehV+LD2clBKTHNpofm1EjzAlSJnKeXfSIm58Gzs1JVbeo BMQKog1vEbiMSbSkAZq2UYXJyfX4eR6JUKuxbp8PKRqjVw0NJ3S/pLSydTTflwUnA/vc Nh3bJt0KFGXhXbJMKcHt9JV1UKSGMFjsK1AP7RkBqW9sfbYZqbLuNBXLLQf1qzdFEKVb F058haXTAjZZjxb71brxNO2w/Uaz0hMMDli4ZSYkofYLOZIy2njrIerUyoLW/b0bpjK3 IASA== 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=RlVFr3m+9lkVFOXymw0FRrz2DYHoYWkh0xOYfuVeZ50=; b=sgnkQrSubyQI+LPaLBdu5FV4Txczd2kfK2+WbNl0Kppm73A43CSESNdmI+Q55cVYnZ BGyF0b39flR0zPUnitMexjnjE17QPFJsSJp+Ysl7UwMdhb/pewwhMWhLJfsuvUV1R3TL KVCB6AekpLzoEzJqftuhYuonyFfdvHfvaLq9SZdNTxQHwvAsdkP1t+FZAmGX4M75Sd6h BR78SPOPJ7GHfvTV2aklI4LEQgKAh1fv4+lWyFOT6MaEm8ogV7v13yn1yTQk9QA6M6b1 uxIpxoU+PwUlivcu4ZLwKNhPCTZ9MP09Vs+OWc2T9pLJe1jlRBOHpCCJrIW0nn5D9oPS M9IA== 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=kpF5Ykv5; 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 c25si9579140pgn.756.2017.10.30.02.11.48; Mon, 30 Oct 2017 02:11:48 -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=kpF5Ykv5; 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 S1751823AbdJ3JLq (ORCPT + 4 others); Mon, 30 Oct 2017 05:11:46 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:11471 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbdJ3JLq (ORCPT ); Mon, 30 Oct 2017 05:11:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9U9BHOK008932; Mon, 30 Oct 2017 04:11:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509354677; bh=Cp4pjADM6JbY5mXiX336UZ1exb6Z9gfDw4UDflntgTc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kpF5Ykv5Ww6rLQciPm+ATg1rIPVsHMhIi+JQ1FstK4p2uQB5ZR95RkJSeiZFXQXA6 K6mUyV0+uY2Iyia3EaI3/KZRfz/9uhoSencjbmEjFyB9gPhvbsI1X5AREhXBpqwVu6 wlF4kZ4dyJjbGWeOlczux6hFteLUlICVhW2u31OE= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U9BHek004980; Mon, 30 Oct 2017 04:11:17 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 30 Oct 2017 04:11:16 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 30 Oct 2017 04:11:16 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U9BCxK008159; Mon, 30 Oct 2017 04:11:15 -0500 From: Tero Kristo To: , CC: Subject: [PATCH 2/2] ARM: OMAP2/3: CM: fix cm_split_idlest functionality Date: Mon, 30 Oct 2017 11:11:04 +0200 Message-ID: <1509354664-27694-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509354664-27694-1-git-send-email-t-kristo@ti.com> References: <1509354664-27694-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 cm_split_idlest doesn't take the CM base offset into account right now, causing it to read reserved registers which show idlestatus as active always. This will cause the wait_module_ready functionality to be effectively an expensive NOP, which will cause problems if the module hasn't really activated during its execution. Fix by adding the CM offset into the calculation so the wait_module_ready will access correct register. Signed-off-by: Tero Kristo Reported-by: Filip Matijevic --- arch/arm/mach-omap2/cm_common.c | 6 +++++- arch/arm/mach-omap2/prcm-common.h | 1 + 2 files changed, 6 insertions(+), 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/cm_common.c b/arch/arm/mach-omap2/cm_common.c index 1752e92..b7511a5 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c @@ -68,14 +68,17 @@ void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2) int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, u8 *idlest_reg_id) { + int ret; if (!cm_ll_data->split_idlest_reg) { WARN_ONCE(1, "cm: %s: no low-level function defined\n", __func__); return -EINVAL; } - return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, + ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, idlest_reg_id); + *prcm_inst -= cm_base.offset; + return ret; } /** @@ -347,6 +350,7 @@ int __init omap2_cm_base_init(void) if (mem) { mem->pa = res.start + data->offset; mem->va = data->mem + data->offset; + mem->offset = data->offset; } data->np = np; diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index ee7041d..ac9ee2e 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h @@ -529,6 +529,7 @@ struct omap_prcm_irq_setup { struct omap_domain_base { u32 pa; void __iomem *va; + s16 offset; }; /**