From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] net: davinci_emac: Add pre_open, post_stop platform callbacks Date: Thu, 03 May 2012 07:22:34 -0700 Message-ID: <87sjfhmjit.fsf@ti.com> References: <20120502234718.GA5432@animalcreek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]:50099 "EHLO na3sys009aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756048Ab2ECOWc (ORCPT ); Thu, 3 May 2012 10:22:32 -0400 Received: by dady13 with SMTP id y13so1791297dad.5 for ; Thu, 03 May 2012 07:22:31 -0700 (PDT) In-Reply-To: (Vaibhav Bedia's message of "Thu, 3 May 2012 10:44:44 +0000") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Bedia, Vaibhav" Cc: "Mark A. Greer" , "netdev@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" "Bedia, Vaibhav" writes: > On Thu, May 03, 2012 at 05:17:18, Mark A. Greer wrote: >> From: "Mark A. Greer" >> >> The davinci EMAC driver has been incorporated into the am35x >> family of SoC's which is OMAP-based. The incorporation is >> incomplete in that the EMAC cannot unblock the [ARM] core if >> its blocked on a 'wfi' instruction. This is an issue with >> the cpu_idle code because it has the core execute a 'wfi' >> instruction. >> >> To work around this issue, add platform data callbacks which >> are called at the beginning of the open routine and at the >> end of the stop routine of the davinci_emac driver. The >> callbacks allow the platform code to issue disable_hlt() and >> enable_hlt() calls appropriately. Calling disable_hlt() >> prevents cpu_idle from issuing the 'wfi' instruction. >> >> It is not sufficient to simply call disable_hlt() when >> there is an EMAC present because it could be present but >> not actually used in which case, we do want the 'wfi' to >> be executed. >> > > Are you trying to say that if ARM executes _just_ wfi and _absolutely > nothing else_ is done in the OMAP PM code, EMAC stops working? > > However, if this is indeed the case, then probably a better solution would be > to invoke disable_hlt() from the board file when EMAC support is compiled in. No. As Mark stated in the changelog, doing that will prevent any low-power states states even if the EMAC is not in use. IMO, it is best to only prevent WFI when absolutely needed. Kevin