]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mmc: dw_mmc: Regression fix for non-IDMAC DMA
authorSeungwon Jeon <tgih.jun@samsung.com>
Mon, 20 Feb 2012 02:01:43 +0000 (11:01 +0900)
committerChris Ball <cjb@laptop.org>
Tue, 27 Mar 2012 16:19:57 +0000 (12:19 -0400)
3ec7699d3bb1b0ee7 ("mmc: dw_mmc: Add support for pre_req and post_req")
broke non-IDMAC DMA, because dw_mci_pre_dma_transfer() is valid only if
using internal DMA. In case of using other DMA it returns -ENOSYS. It
prevents the DMA operations.  This patch makes dw_mci_pre_dma_transfer()
effective in all DMA cases again.

Reported-by: James Hogan <james@albanarts.com>
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc.c

index 692c3ba303356f65db221cfa47f33acf75c31886..bf3c9b456aaf1080d6db5163eacefb3e7805787a 100644 (file)
@@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host)
        return 0;
 }
 
+static struct dw_mci_dma_ops dw_mci_idmac_ops = {
+       .init = dw_mci_idmac_init,
+       .start = dw_mci_idmac_start_dma,
+       .stop = dw_mci_idmac_stop_dma,
+       .complete = dw_mci_idmac_complete_dma,
+       .cleanup = dw_mci_dma_cleanup,
+};
+#endif /* CONFIG_MMC_DW_IDMAC */
+
 static int dw_mci_pre_dma_transfer(struct dw_mci *host,
                                   struct mmc_data *data,
                                   bool next)
@@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
        return sg_len;
 }
 
-static struct dw_mci_dma_ops dw_mci_idmac_ops = {
-       .init = dw_mci_idmac_init,
-       .start = dw_mci_idmac_start_dma,
-       .stop = dw_mci_idmac_stop_dma,
-       .complete = dw_mci_idmac_complete_dma,
-       .cleanup = dw_mci_dma_cleanup,
-};
-#else
-static int dw_mci_pre_dma_transfer(struct dw_mci *host,
-                                  struct mmc_data *data,
-                                  bool next)
-{
-       return -ENOSYS;
-}
-#endif /* CONFIG_MMC_DW_IDMAC */
-
 static void dw_mci_pre_req(struct mmc_host *mmc,
                           struct mmc_request *mrq,
                           bool is_first_req)