From patchwork Fri Jan 2 21:10:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 5560961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B6780BF6C3 for ; Fri, 2 Jan 2015 21:12:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CEBBE2024D for ; Fri, 2 Jan 2015 21:12:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AC95201F2 for ; Fri, 2 Jan 2015 21:12:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y79Ud-0003uT-C5; Fri, 02 Jan 2015 21:10:47 +0000 Received: from utopia.booyaka.com ([74.50.51.50]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y79UX-0003ph-Vo for linux-arm-kernel@lists.infradead.org; Fri, 02 Jan 2015 21:10:44 +0000 Received: (qmail 29938 invoked by uid 1019); 2 Jan 2015 21:10:17 -0000 Date: Fri, 2 Jan 2015 21:10:17 +0000 (UTC) From: Paul Walmsley To: Roger Quadros Subject: Re: [PATCH] ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc In-Reply-To: <5492F84E.7020706@ti.com> Message-ID: References: <1418917790-1791-1-git-send-email-rogerq@ti.com> <5492F84E.7020706@ti.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150102_131042_152234_F6DA629A X-CRM114-Status: GOOD ( 17.53 ) X-Spam-Score: -0.0 (/) Cc: nm@ti.com, tony@atomide.com, nsekhar@ti.com, linux-kernel@vger.kernel.org, t-kristo@ti.com, bcousson@baylibre.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP + Suman, lakml Hi Roger On Thu, 18 Dec 2014, Roger Quadros wrote: > Fixing up Paul's email id. > > cheers, > -roger > > On 18/12/14 17:49, Roger Quadros wrote: > > There are quite a few hwmods that don't have sysconfig register and so > > _find_mpu_rt_port(oh) will return NULL thus preventing ready state check > > on those modules after the module is enabled. Hmm. Any IP block that exposes registers that are accessible by the MPU should have an MPU register target port, even if there's no SYSCONFIG register. And if an IP block doesn't have registers that are accessible from the MPU, then there shouldn't be much point to waiting for the module to become ready. Looks like the real problem is the test for oh->class->sysc before the call to _init_mpu_rt_base(). That was introduced by commit 6423d6df1440 ("ARM: OMAP2+: hwmod: check for module address space during init"). It's not clear to me why that test was added, since _init_mpu_rt_base() doesn't do anything with oh->class->sysc or SYSCONFIG registers. Could you please test the following patch? I don't have an AM437x-gp-evm. - Paul --- arch/arm/mach-omap2/omap_hwmod.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index cbb908dc5cf0..ce6d11f3eda7 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2451,14 +2451,10 @@ static int __init _init(struct omap_hwmod *oh, void *data) oh->name, np->name); } - if (oh->class->sysc) { - r = _init_mpu_rt_base(oh, NULL, index, np); - if (r < 0) { - WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", - oh->name); - return 0; - } - } + r = _init_mpu_rt_base(oh, NULL, index, np); + if (r < 0) + pr_debug("omap_hwmod: %s: doesn't have mpu register target base\n", + oh->name); r = _init_clocks(oh, NULL); if (r < 0) {