OMAP: HSMMC: do not enable buffer ready interrupt if using DMA
authorAnand Gadiyar <gadiyar@ti.com>
Tue, 22 Sep 2009 23:44:21 +0000 (16:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:32 +0000 (07:39 -0700)
This considerably reduces the number of interrupts during a transfer
and ought to result in some power saving.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Philip Langdale <philipl@overt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/host/omap_hsmmc.c

index 1cf9cfb3b64fb13f262f652ef74323e4bb1392ec..fee895b02f395ebf8177d42b845cf1d05b0d1b31 100644 (file)
@@ -70,6 +70,8 @@
 #define DTO_MASK               0x000F0000
 #define DTO_SHIFT              16
 #define INT_EN_MASK            0x307F0033
+#define BWR_ENABLE             (1 << 4)
+#define BRR_ENABLE             (1 << 5)
 #define INIT_STREAM            (1 << 1)
 #define DP_SELECT              (1 << 21)
 #define DDIR                   (1 << 4)
@@ -241,7 +243,12 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd,
         */
        OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR);
        OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK);
-       OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK);
+
+       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);
 
        host->response_busy = 0;
        if (cmd->flags & MMC_RSP_PRESENT) {