Skip to contentSkip to conversation

dw_mmc: set fixed burst in BMOD register

PATCH In review Jaehoon Chung 3 participants 3 messages Feb 25, 2011 – Mar 17, 2011

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 1/3 dw_mmc: set fixed burst in BMOD register

This patch is applied fixed burst.
If use internal DMA controller, i think that need to set this bit.

I tested when set this bit or not. I found that increase performance with IDMAC

---
 drivers/mmc/host/dw_mmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc.c +2 -2
index 58476c1..46e5a89 100644
@@ -315,7 +315,7 @@ static void dw_mci_idmac_stop_dma(struct dw_mci *host)
 
 	/* Stop the IDMAC running */
 	temp = mci_readl(host, BMOD);
-	temp &= ~SDMMC_IDMAC_ENABLE;
+	temp &= ~(SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB);
 	mci_writel(host, BMOD, temp);
 }
 
@@ -384,7 +384,7 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
 
 	/* Enable the IDMAC */
 	temp = mci_readl(host, BMOD);
-	temp |= SDMMC_IDMAC_ENABLE;
+	temp |= SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB;
 	mci_writel(host, BMOD, temp);
 
 	/* Start it running */
#1 lore raw

Hi Will,

Quoted 25 lines · Jaehoon Chung

This patch is applied fixed burst.
If use internal DMA controller, i think that need to set this bit.

I tested when set this bit or not. I found that increase performance with IDMAC

---
 drivers/mmc/host/dw_mmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 58476c1..46e5a89 100644
@@ -315,7 +315,7 @@ static void dw_mci_idmac_stop_dma(struct dw_mci *host)
 
 	/* Stop the IDMAC running */
 	temp = mci_readl(host, BMOD);
-	temp &= ~SDMMC_IDMAC_ENABLE;
+	temp &= ~(SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB);
 	mci_writel(host, BMOD, temp);
 }
 

drivers/mmc/host/dw_mmc.c static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len) · line 390

Quoted 8 lines
drivers/mmc/host/dw_mmc.c +1 -1
@@ -384,7 +384,7 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
 
 	/* Enable the IDMAC */
 	temp = mci_readl(host, BMOD);
-	temp |= SDMMC_IDMAC_ENABLE;
+	temp |= SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB;
 	mci_writel(host, BMOD, temp);
 
 	/* Start it running */

Any thoughts on this patch?

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#2 lore raw
Quoted 35 lines · Chris Ball

Hi Will,

Quoted 32 lines · Jaehoon Chung

This patch is applied fixed burst.
If use internal DMA controller, i think that need to set this bit.

I tested when set this bit or not. I found that increase performance with IDMAC

---
 drivers/mmc/host/dw_mmc.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc.c +2 -2
index 58476c1..46e5a89 100644
@@ -315,7 +315,7 @@ static void dw_mci_idmac_stop_dma(struct dw_mci *host)
 
       /* Stop the IDMAC running */
       temp = mci_readl(host, BMOD);
-     temp &= ~SDMMC_IDMAC_ENABLE;
+     temp &= ~(SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB);
       mci_writel(host, BMOD, temp);
  }
 
@@ -384,7 +384,7 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
 
       /* Enable the IDMAC */
       temp = mci_readl(host, BMOD);
-     temp |= SDMMC_IDMAC_ENABLE;
+     temp |= SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB;
       mci_writel(host, BMOD, temp);
 
Quoted 3 lines

drivers/mmc/host/dw_mmc.c static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len) · line 390

Quoted 1 line
drivers/mmc/host/dw_mmc.c +0 -0
       /* Start it running */

Any thoughts on this patch?

From the documentation I have it's not clear what this bit does. I have very limited access to hardware with internal DMA support, so I can't really test it either. I'm willing to believe the patch improves things but I can't really say one way or the other.