From patchwork Mon Feb 18 12:42:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 2157521 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 C8C6C3FE37 for ; Mon, 18 Feb 2013 12:43:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755256Ab3BRMml (ORCPT ); Mon, 18 Feb 2013 07:42:41 -0500 Received: from mout.gmx.net ([212.227.15.18]:60705 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755096Ab3BRMmi (ORCPT ); Mon, 18 Feb 2013 07:42:38 -0500 Received: from mailout-de.gmx.net ([10.1.76.31]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Lg2yr-1UeGso09pz-00pfFg for ; Mon, 18 Feb 2013 13:42:37 +0100 Received: (qmail invoked by alias); 18 Feb 2013 12:42:36 -0000 Received: from ip-89-176-190-209.net.upcbroadband.cz (EHLO localhost) [89.176.190.209] by mail.gmx.net (mp031) with SMTP; 18 Feb 2013 13:42:36 +0100 X-Authenticated: #20192376 X-Provags-ID: V01U2FsdGVkX1+4fXBTyxG4jZEwnV13SauPjD2LrjDnhDPGIA7hBG oMQmQfwdG4gmhX Date: Mon, 18 Feb 2013 13:42:27 +0100 From: Andreas Fenkart To: Daniel Mack Cc: Tony Lindgren , Andreas Fenkart , cjb@laptop.org, devicetree-discuss@lists.ozlabs.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, santosh.shilimkar@ti.com Subject: Re: [PATCH] mmc: omap_hsmmc: Enable SDIO IRQ using a GPIO in idle mode. Message-ID: <20130218124227.GA24607@blumentopf> References: <20121220220444.GA350@blumentopf> <1356041532-919-1-git-send-email-andreas.fenkart@streamunlimited.com> <20130110202203.GD14149@atomide.com> <512201DE.1070001@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <512201DE.1070001@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi, On Mon, Feb 18, 2013 at 11:26:38AM +0100, Daniel Mack wrote: > On 10.01.2013 21:22, Tony Lindgren wrote: > > * Andreas Fenkart [121220 14:15]: > >> Without functional clock the omap_hsmmc module can't forward > >> SDIO IRQs to the system. This patch reconfigures dat1 line > >> as a gpio while the fclk is off. And uses SDIO IRQ detection of > >> the module, while fclk is present. > > > > Looks pretty good to me, however I could not figure out what > > to apply this on for testing. It fails to apply at least against > > current linux next, can you please update against that? > > > >> +static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable) > >> +{ > >> + struct omap_hsmmc_host *host = mmc_priv(mmc); > >> + u32 irq_mask; > >> + unsigned long flags; > >> + > >> + spin_lock_irqsave(&host->irq_lock, flags); > >> + > >> + host->sdio_irq_en = (enable != 0) ? true : false; > >> + > >> + if (host->active_pinmux) { > >> + irq_mask = OMAP_HSMMC_READ(host->base, ISE); > >> + if (enable) > >> + irq_mask |= CIRQ_ENABLE; > >> + else > >> + irq_mask &= ~CIRQ_ENABLE; > >> + OMAP_HSMMC_WRITE(host->base, IE, irq_mask); > >> + > >> + if (!host->req_in_progress) > >> + OMAP_HSMMC_WRITE(host->base, ISE, irq_mask); > >> + > >> +#if 0 > >> + OMAP_HSMMC_READ(host->base, IE); /* flush posted write */ > >> +#endif > > > > Maybe just replace #if 0 with just a comment in case it turns out to be > > needed for some cases? > > Is there any update on this series? Andreas, did you do more tests? Thanks for all the feedback so far. Yes I did more testing. After reducing the autosuspend delay, I found two more bugs. Hope to progress this week, then need to redo the testing. Plan is to resubmit latest next week. Andi --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -138,7 +138,7 @@ static void apply_clk_hack(void) #define SOFTRESET (1 << 1) #define RESETDONE (1 << 0) -#define MMC_AUTOSUSPEND_DELAY 100 +#define MMC_AUTOSUSPEND_DELAY 1 #define MMC_TIMEOUT_MS 20 One is already fixed[1], the other I'm still working on.