From patchwork Mon Apr 11 08:19:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 65458 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp1331822lbl; Mon, 11 Apr 2016 01:21:52 -0700 (PDT) X-Received: by 10.98.75.214 with SMTP id d83mr31158011pfj.22.1460362884785; Mon, 11 Apr 2016 01:21:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a22si2161726pfj.116.2016.04.11.01.21.24; Mon, 11 Apr 2016 01:21:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbcDKIVW (ORCPT + 7 others); Mon, 11 Apr 2016 04:21:22 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:59791 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753714AbcDKIUq (ORCPT ); Mon, 11 Apr 2016 04:20:46 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u3B8KGRh002294; Mon, 11 Apr 2016 03:20:16 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3B8KGca021125; Mon, 11 Apr 2016 03:20:16 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Mon, 11 Apr 2016 03:20:16 -0500 Received: from sokoban.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3B8JL6K024976; Mon, 11 Apr 2016 03:20:14 -0500 From: Tero Kristo To: , , , , CC: , , Subject: [PATCH 22/30] ARM: AM33xx: fix module_wait_ready without clkctrl register Date: Mon, 11 Apr 2016 11:19:13 +0300 Message-ID: <1460362761-4842-23-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460362761-4842-1-git-send-email-t-kristo@ti.com> References: <1460362761-4842-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org If the module has no clkctrl register defined, module_wait_ready should not try to access this. This can potentially cause an illegal register access, and result in bad idle reporting also. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cm33xx.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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 7b181f9..c073fb5 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -220,6 +220,9 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, { int i = 0; + if (!clkctrl_offs) + return 0; + omap_test_timeout(_is_module_ready(inst, clkctrl_offs), MAX_MODULE_READY_TIME, i);