aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
commit800930b924c19a56b3a6e94ad351cd0715fb410d (patch)
tree70158d97f68604d69da8da779507469cf930bf07 /target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch
parent68c939ba0b0a0dda84e7a2ae370155be9a5593bc (diff)
downloadupstream-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.gz
upstream-800930b924c19a56b3a6e94ad351cd0715fb410d.tar.bz2
upstream-800930b924c19a56b3a6e94ad351cd0715fb410d.zip
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y rebased against linux-3.10.y stable (3.10.32). This should hopefully make it easier for us in the future to leverage the raspberry/rpi-* branches. Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39770 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch b/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch
new file mode 100644
index 0000000000..ad7103ef71
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch
@@ -0,0 +1,49 @@
+From 3e9891e91d7dda096ab1cc2518830938ad69880d Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Sun, 12 May 2013 12:25:52 +0100
+Subject: [PATCH 021/174] sdhci-bcm2708: use extension FIFO to buffer DMA
+ transfers
+
+The additional FIFO might speed up transfers in some cases.
+---
+ drivers/mmc/host/sdhci-bcm2708.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/mmc/host/sdhci-bcm2708.c
++++ b/drivers/mmc/host/sdhci-bcm2708.c
+@@ -74,6 +74,9 @@
+ /* Mhz clock that the EMMC core is running at. Should match the platform clockman settings */
+ #define BCM2708_EMMC_CLOCK_FREQ 50000000
+
++#define REG_EXRDFIFO_EN 0x80
++#define REG_EXRDFIFO_CFG 0x84
++
+ /*****************************************************************************\
+ * *
+ * Debug *
+@@ -957,10 +960,12 @@ static ssize_t attr_dma_store(struct dev
+ int on = simple_strtol(buf, NULL, 0);
+ if (on) {
+ host->flags |= SDHCI_USE_PLATDMA;
++ sdhci_bcm2708_writel(host, 1, REG_EXRDFIFO_EN);
+ printk(KERN_INFO "%s: DMA enabled\n",
+ mmc_hostname(host->mmc));
+ } else {
+ host->flags &= ~(SDHCI_USE_PLATDMA | SDHCI_REQ_USE_DMA);
++ sdhci_bcm2708_writel(host, 0, REG_EXRDFIFO_EN);
+ printk(KERN_INFO "%s: DMA disabled\n",
+ mmc_hostname(host->mmc));
+ }
+@@ -1272,6 +1277,12 @@ static int sdhci_bcm2708_probe(struct pl
+ ret = device_create_file(&pdev->dev, &dev_attr_dma_wait);
+ ret = device_create_file(&pdev->dev, &dev_attr_status);
+
++#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA
++ /* enable extension fifo for paced DMA transfers */
++ sdhci_bcm2708_writel(host, 1, REG_EXRDFIFO_EN);
++ sdhci_bcm2708_writel(host, 4, REG_EXRDFIFO_CFG);
++#endif
++
+ printk(KERN_INFO "%s: BCM2708 SDHC host at 0x%08llx DMA %d IRQ %d\n",
+ mmc_hostname(host->mmc), (unsigned long long)iomem->start,
+ host_priv->dma_chan, host_priv->dma_irq);