From patchwork Mon Jul 11 23:21:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 966782 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6BNLicq009518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Jul 2011 23:22:05 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgPnD-0003CR-St; Mon, 11 Jul 2011 23:21:36 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QgPnD-0005bb-Gj; Mon, 11 Jul 2011 23:21:35 +0000 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgPnA-0005bF-BQ for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2011 23:21:33 +0000 Received: from mail-iy0-f179.google.com ([209.85.210.179]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKThuFd4wRtPeQe5KEvP/sAppOqHfE8XBt@postini.com; Mon, 11 Jul 2011 16:21:32 PDT Received: by mail-iy0-f179.google.com with SMTP id 35so5231412iyn.24 for ; Mon, 11 Jul 2011 16:21:27 -0700 (PDT) Received: by 10.42.213.196 with SMTP id gx4mr6198562icb.253.1310426486790; Mon, 11 Jul 2011 16:21:26 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id d8sm14336557icy.21.2011.07.11.16.21.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 16:21:26 -0700 (PDT) From: Kevin Hilman To: Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH] OMAP2+: PM: fix watchdog boot when runtime PM is disabled Date: Mon, 11 Jul 2011 16:21:24 -0700 Message-Id: <1310426484-30083-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.6 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110711_192132_625134_A07CE63A X-CRM114-Status: GOOD ( 14.09 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.197 listed in list.dnswl.org] Cc: Paul Walmsley , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 11 Jul 2011 23:22:05 +0000 (UTC) Fix boot crash in watchdog driver when runtime PM is disabled. When runtime PM is disabled, devices should be left enabled so that all device accesses in drivers will succeed even though the runtime PM get/put calls are noops. This is already the case for all devices, but the WDT init has its own hwmod postsetup which was not taking this into account. This fixes a boot crash where the first device access in the WDT probe function would crash a booting kernel. Cc: Paul Walmsley Signed-off-by: Kevin Hilman --- Tony, as this is a boot crash, it should probably be queued for v3.0. However, since OMAP2PLUS_TYPICAL always enables runtime PM, this is unlikely to be seen unless specifically testing with runtime PM disabled. arch/arm/mach-omap2/io.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 441e79d..95c08aa 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -395,7 +395,11 @@ void __init omap2_init_common_infrastructure(void) * XXX ideally we could detect whether the MPU WDT was currently * enabled here and make this conditional */ +#ifdef CONFIG_PM_RUNTIME postsetup_state = _HWMOD_STATE_DISABLED; +#else + postsetup_state = _HWMOD_STATE_ENABLED; +#endif omap_hwmod_for_each_by_class("wd_timer", _set_hwmod_postsetup_state, &postsetup_state);