From patchwork Wed Mar 23 13:49:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 656011 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 p2NDn3mQ011660 for ; Wed, 23 Mar 2011 13:49:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756129Ab1CWNtT (ORCPT ); Wed, 23 Mar 2011 09:49:19 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:64872 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755994Ab1CWNtS (ORCPT ); Wed, 23 Mar 2011 09:49:18 -0400 Received: from axis700.grange (pD9EB90DE.dip0.t-ipconnect.de [217.235.144.222]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MDVnR-1QEA903E8j-00GwPa; Wed, 23 Mar 2011 14:49:15 +0100 Received: by axis700.grange (Postfix, from userid 1000) id 68B4E189B86; Wed, 23 Mar 2011 14:49:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 66659189B85; Wed, 23 Mar 2011 14:49:15 +0100 (CET) Date: Wed, 23 Mar 2011 14:49:15 +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 v3] mmc: tmio: remove work-around for unmasked SDIO interrupts In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:B/6luV6J0y7AQIn9+4CtTtSgoOVcXEYrdouCbQt6jxR r/882EPIp6PHKPLHOL9+7pYfnF/POwnrLgeLPRqc13RRSS5XrB JQ0jIZOAcopztB92ADDvGmp1RPV3hg+Whu6NuwiIXDJIpppoGQ KfhA/IBoOEP1LJfGmHsutWiAeHP30+9e36L71CER8hxYvuqtpK W5tS2zNnVPiqBqcaoA1J85ayj47ywS7jAyp7e+7u+A= 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]); Wed, 23 Mar 2011 13:49:20 +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)