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: 966772 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6BNLTZd009200 for ; Mon, 11 Jul 2011 23:21:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753842Ab1GKXV2 (ORCPT ); Mon, 11 Jul 2011 19:21:28 -0400 Received: from na3sys009aog117.obsmtp.com ([74.125.149.242]:54724 "EHLO na3sys009aog117.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488Ab1GKXV1 (ORCPT ); Mon, 11 Jul 2011 19:21:27 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]) (using TLSv1) by na3sys009aob117.postini.com ([74.125.148.12]) with SMTP ID DSNKThuFd4wRtPeQe5KEvP/sAppOqHfE8XBt@postini.com; Mon, 11 Jul 2011 16:21:27 PDT Received: by mail-iy0-f169.google.com with SMTP id 8so4869749iyl.0 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 Cc: linux-arm-kernel@lists.infradead.org, Paul Walmsley 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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:21:29 +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);