From patchwork Sun Dec 30 18:31:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 1919901 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 98EA3402E1 for ; Sun, 30 Dec 2012 18:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754789Ab2L3Sbj (ORCPT ); Sun, 30 Dec 2012 13:31:39 -0500 Received: from utopia.booyaka.com ([74.50.51.50]:38210 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754715Ab2L3Sbj (ORCPT ); Sun, 30 Dec 2012 13:31:39 -0500 Received: (qmail 13095 invoked by uid 1019); 30 Dec 2012 18:31:38 -0000 Date: Sun, 30 Dec 2012 18:31:38 +0000 (UTC) From: Paul Walmsley To: linux-omap@vger.kernel.org cc: linux-arm-kernel@lists.infradead.org, mgreer@animalcreek.com Subject: [PATCH] ARM: OMAP AM3517/05: hwmod data: block WFI when EMAC active Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org According to Mark Greer, on OMAP AM3517/3505 chips, the EMAC is unable to wake the ARM up from WFI: http://www.spinics.net/lists/arm-kernel/msg174734.html Further troubleshooting was unable to narrow the problem down. So we don't have much choice other than to block WFI when the EMAC is active with the HWMOD_BLOCK_WFI flag. However, for some reason, we don't have an EMAC hwmod -- probably some bug in the data -- so set the flag on the MDIO hwmod data instead. Based on Mark's original patch. We're removing the omap_device-based pm_lats code, so a different approach was needed. Signed-off-by: Paul Walmsley Cc: Mark A. Greer --- Applies after the WFI cleanup series -- intended for a post-cleanup fixes pull request or a new feature pull request. arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 8bb2628..4a68735 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3439,7 +3439,13 @@ static struct omap_hwmod_class am35xx_mdio_class = { static struct omap_hwmod am35xx_mdio_hwmod = { .name = "davinci_mdio", .class = &am35xx_mdio_class, - .flags = HWMOD_NO_IDLEST, + /* + * According to Mark Greer, the MPU will not return from WFI + * when the EMAC signals an interrupt. We're missing an EMAC + * hwmod for some reason, so add the flag to the MDIO instead. + * http://www.spinics.net/lists/arm-kernel/msg174734.html + */ + .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI), }; /*