From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] ARM: OMAP2+: omap_device: add fail hook for runtime_pm when bad data is detected Date: Mon, 09 Dec 2013 08:06:29 -0800 Message-ID: <87mwka80vu.fsf@linaro.org> References: <1386121153-32351-1-git-send-email-nm@ti.com> <20131205190343.GI26766@atomide.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail-pb0-f53.google.com ([209.85.160.53]:45917 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932609Ab3LIQGb (ORCPT ); Mon, 9 Dec 2013 11:06:31 -0500 Received: by mail-pb0-f53.google.com with SMTP id ma3so5673105pbc.40 for ; Mon, 09 Dec 2013 08:06:31 -0800 (PST) In-Reply-To: <20131205190343.GI26766@atomide.com> (Tony Lindgren's message of "Thu, 5 Dec 2013 11:03:43 -0800") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Tony Lindgren Cc: Nishanth Menon , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Jakobi , Joel F Tony Lindgren writes: > * Nishanth Menon [131203 17:40]: >> Due to the cross dependencies between hwmod for automanaged device >> information for OMAP and dts node definitions, we can run into scenarios >> where the dts node is defined, however it's hwmod entry is yet to be >> added. In these cases: >> a) omap_device does not register a pm_domain (since it cannot find >> hwmod entry). >> b) driver does not know about (a), does a pm_runtime_get_sync which >> never fails >> c) It then tries to do some operation on the device (such as read the >> revision register (as part of probe) without clock or adequate OMAP >> generic PM operation performed for enabling the module. >> >> This causes a crash such as that reported in: >> https://bugzilla.kernel.org/show_bug.cgi?id=66441 >> >> When 'ti,hwmod' is provided in dt node, it is expected that the device >> will not function without the OMAP's power automanagement. Hence, when >> we hit a fail condition (due to hwmod entries not present or other >> similar scenario), fail at pm_domain level due to lack of data, provide >> enough information for it to be fixed, however, it allows for the driver >> to take appropriate measures to prevent crash. > > Kevin, any comments on this one? Looks like a good approach to catch these corner cases. Acked-by: Kevin Hilman