brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.10 / 0020-Add-sync_after_dma-module-parameter.patch
index 544d94978f4ab50e653bd116d4123e256f836c7f..1e82fab4cea8dff27078a121566add63245a8468 100644 (file)
@@ -1,12 +1,14 @@
-From 9e42f33f4f80999a2c65a50b2a7ac6562ca194f5 Mon Sep 17 00:00:00 2001
+From a30b981976f90774867ec2a60bac86ebe7244d9a Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Tue, 17 Jul 2012 00:48:27 +0100
-Subject: [PATCH 020/174] Add sync_after_dma module parameter
+Subject: [PATCH 020/196] Add sync_after_dma module parameter
 
 ---
  drivers/mmc/host/sdhci-bcm2708.c | 60 +++++++++++++++++++++-------------------
  1 file changed, 32 insertions(+), 28 deletions(-)
 
+diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c
+index 7bba950..3792b9f 100644
 --- a/drivers/mmc/host/sdhci-bcm2708.c
 +++ b/drivers/mmc/host/sdhci-bcm2708.c
 @@ -51,7 +51,6 @@
@@ -17,7 +19,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
  #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA
  /* #define CHECK_DMA_USE */
  #endif
-@@ -131,6 +130,7 @@ static inline unsigned long int since_ns
+@@ -131,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t)
  
  static bool allow_highspeed = 1;
  static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ;
@@ -25,7 +27,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
  
  #if 0
  static void hptime_test(void)
-@@ -822,34 +822,34 @@ static void sdhci_bcm2708_dma_complete_i
+@@ -822,34 +822,34 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host,
                                                SDHCI_INT_SPACE_AVAIL);
                }
        } else {
@@ -38,6 +40,12 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
 -                 the SD controller to finish reading/writing to the card. */
 -              u32 state_mask;
 -              int timeout=5000;
+-
+-              DBG("PDMA over - sync card\n");
+-              if (data->flags & MMC_DATA_READ)
+-                      state_mask = SDHCI_DOING_READ;
+-              else
+-                      state_mask = SDHCI_DOING_WRITE;
 +              if (sync_after_dma) {
 +                      /* On the Arasan controller the stop command (which will be
 +                         scheduled after this completes) does not seem to work
@@ -47,12 +55,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
 +                         the SD controller to finish reading/writing to the card. */
 +                      u32 state_mask;
 +                      int timeout=30*5000;
--              DBG("PDMA over - sync card\n");
--              if (data->flags & MMC_DATA_READ)
--                      state_mask = SDHCI_DOING_READ;
--              else
--                      state_mask = SDHCI_DOING_WRITE;
++
 +                      DBG("PDMA over - sync card\n");
 +                      if (data->flags & MMC_DATA_READ)
 +                              state_mask = SDHCI_DOING_READ;
@@ -85,7 +88,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
                if (host_priv->complete) {
                        (*host_priv->complete)(host);
                        DBG("PDMA %s complete\n",
-@@ -1193,7 +1193,9 @@ static int sdhci_bcm2708_probe(struct pl
+@@ -1193,7 +1193,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev)
                       SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
                       SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
                 SDHCI_QUIRK_MISSING_CAPS |
@@ -111,3 +114,6 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter
 +MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete");
  
  
+-- 
+1.9.1
+