From patchwork Wed Feb 24 10:07:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 81718 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1OA8fl3006379 for ; Wed, 24 Feb 2010 10:08:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756372Ab0BXKIk (ORCPT ); Wed, 24 Feb 2010 05:08:40 -0500 Received: from compulab.co.il ([67.18.134.219]:48393 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756239Ab0BXKIj (ORCPT ); Wed, 24 Feb 2010 05:08:39 -0500 Received: from [62.90.235.247] (helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1NkEAW-0003c9-Gl; Wed, 24 Feb 2010 04:08:37 -0600 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 85A7A9A0358; Wed, 24 Feb 2010 12:08:35 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G6QVEQbQF8dP; Wed, 24 Feb 2010 12:08:35 +0200 (IST) Received: from [10.1.1.77] (droid.compulab.local [10.1.1.77]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 3B2B39A034E; Wed, 24 Feb 2010 12:08:35 +0200 (IST) Message-ID: <4B84FA55.5040804@compulab.co.il> Date: Wed, 24 Feb 2010 12:07:17 +0200 From: Mike Rapoport User-Agent: Thunderbird 2.0.0.23 (X11/20100106) MIME-Version: 1.0 To: David Vrabel CC: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, madhu.cr@ti.com, Mike Rapoport Subject: Re: [PATCH 0/2] mmc: omap_hsmmc: support SDIO cards (#2) References: In-Reply-To: X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Feb 2010 10:08:42 +0000 (UTC) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 53fa85d..6ed71b7 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -82,6 +82,7 @@ #define BWR_ENABLE (1 << 4) #define BRR_ENABLE (1 << 5) #define CTPL (1 << 11) +#define CLKEXTFREE (1 << 16) #define INIT_STREAM (1 << 1) #define DP_SELECT (1 << 21) #define DDIR (1 << 4) @@ -189,6 +190,7 @@ struct omap_hsmmc_host { int protect_card; int reqs_blocked; int use_reg; + int sdio_int; struct omap_mmc_platform_data *pdata; }; @@ -763,16 +765,19 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, struct mmc_data *data) { int cmdreg = 0, resptype = 0, cmdtype = 0; + int int_en_mask = INT_EN_MASK; dev_dbg(mmc_dev(host->mmc), "%s: CMD%d, argument 0x%08x\n", mmc_hostname(host->mmc), cmd->opcode, cmd->arg); host->cmd = cmd; if (host->use_dma) - OMAP_HSMMC_WRITE(host->base, IE, - INT_EN_MASK & ~(BRR_ENABLE | BWR_ENABLE)); - else - OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + int_en_mask &= ~(BRR_ENABLE | BWR_ENABLE); + + if (host->sdio_int) + int_en_mask |= CIRQ; + + OMAP_HSMMC_WRITE(host->base, IE, int_en_mask); host->response_busy = 0; if (cmd->flags & MMC_RSP_PRESENT) { @@ -1619,10 +1624,12 @@ static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable) if (enable) { clk_enable(host->fclk); ie |= CIRQ_ENABLE; - con |= CTPL; + con |= CTPL | CLKEXTFREE; + host->sdio_int = 1; } else { ie &= ~CIRQ_ENABLE; - con &= ~CTPL; + con &= ~(CTPL | CLKEXTFREE); + host->sdio_int = 0; } OMAP_HSMMC_WRITE(host->base, CON, con); OMAP_HSMMC_WRITE(host->base, IE, ie);