From patchwork Fri Mar 11 08:09:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 627751 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2B89ul8000742 for ; Fri, 11 Mar 2011 08:09:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752284Ab1CKIJu (ORCPT ); Fri, 11 Mar 2011 03:09:50 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:55261 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488Ab1CKIJs (ORCPT ); Fri, 11 Mar 2011 03:09:48 -0500 Received: from axis700.grange (pD9EB8C3C.dip0.t-ipconnect.de [217.235.140.60]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LjfP2-1QUoC03cXA-00bXGl; Fri, 11 Mar 2011 09:09:45 +0100 Received: by axis700.grange (Postfix, from userid 1000) id 83614189B86; Fri, 11 Mar 2011 09:09:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 81037189B85; Fri, 11 Mar 2011 09:09:44 +0100 (CET) Date: Fri, 11 Mar 2011 09:09:44 +0100 (CET) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-mmc@vger.kernel.org, Chris Ball , Ian Molton Subject: [PATCH 4/4 v2] mmc: mn57xx: remove work-around for unmasked SDIO interrupts In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:XXSCEf9Ggr5aPMO3nwI+VFX5ej/OE5AiD584k0Nn2bI WW1Xk0W57T1re5dPwxykDixRgv45uOQK13el6rgRdPVpf9n+BO Mr63DWfWK1B8Ve2RFcth0jEjlXYGMVtRI3pZuAIgNaB2OZznB8 bIk8LsUIcg+gE+kpzJOmbC1bq9/dNZd8ZMi0BYbjhYbYzDZF/3 LZwnp/x9fT8gvK+i8GqhrPIvqemQsqjy78QM+7CxK4= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Mar 2011 08:09:57 +0000 (UTC) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 28e14c7..e1aed25 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -208,26 +208,14 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock) static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) { - struct tmio_mmc_data *pdata = host->pdata; struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); - /* - * Testing on sh-mobile showed that SDIO IRQs are unmasked when - * CTL_CLK_AND_WAIT_CTL gets written, so we have to disable the - * device IRQ here and restore the SDIO IRQ mask before - * re-enabling the device IRQ. - */ - if (pdata->flags & TMIO_MMC_SDIO_IRQ) - disable_irq(host->irq); /* implicit BUG_ON(!res) */ if (resource_size(res) > 0x100) { sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000); msleep(10); } - if (pdata->flags & TMIO_MMC_SDIO_IRQ) { - tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled); - enable_irq(host->irq); - } + sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 & sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); msleep(10); @@ -235,24 +223,17 @@ static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) static void tmio_mmc_clk_start(struct tmio_mmc_host *host) { - struct tmio_mmc_data *pdata = host->pdata; struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); msleep(10); - /* see comment in tmio_mmc_clk_stop above */ - if (pdata->flags & TMIO_MMC_SDIO_IRQ) - disable_irq(host->irq); + /* implicit BUG_ON(!res) */ if (resource_size(res) > 0x100) { sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100); msleep(10); } - if (pdata->flags & TMIO_MMC_SDIO_IRQ) { - tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled); - enable_irq(host->irq); - } } static void tmio_mmc_reset(struct tmio_mmc_host *host)