From patchwork Thu Jun 30 13:15:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 71242 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp389136qgy; Thu, 30 Jun 2016 06:15:55 -0700 (PDT) X-Received: by 10.66.73.134 with SMTP id l6mr21592260pav.43.1467292552103; Thu, 30 Jun 2016 06:15:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ww9si4494690pab.83.2016.06.30.06.15.51; Thu, 30 Jun 2016 06:15:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbcF3NPv (ORCPT + 3 others); Thu, 30 Jun 2016 09:15:51 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:37028 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082AbcF3NPu (ORCPT ); Thu, 30 Jun 2016 09:15:50 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5UDEEeG011921; Thu, 30 Jun 2016 08:14:14 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5UDFPJ0008350; Thu, 30 Jun 2016 08:15:25 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 30 Jun 2016 08:15:25 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5UDFBS0004769; Thu, 30 Jun 2016 08:15:24 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 5/5] ARM: AM33xx: fix module_wait_ready without clkctrl register Date: Thu, 30 Jun 2016 16:15:03 +0300 Message-ID: <1467292503-4376-6-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467292503-4376-1-git-send-email-t-kristo@ti.com> References: <1467292503-4376-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 Acked-by: Tony Lindgren --- arch/arm/mach-omap2/cm33xx.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 -- 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 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);