|
79 | 79 | #define POWER_LAZY_OFF 1 |
80 | 80 | #define POWER_ON 2 |
81 | 81 |
|
| 82 | +#define REG_EXRDFIFO_EN 0x80 |
| 83 | +#define REG_EXRDFIFO_CFG 0x84 |
82 | 84 |
|
83 | 85 | /*****************************************************************************\ |
84 | 86 | * * |
@@ -967,10 +969,12 @@ static ssize_t attr_dma_store(struct device *_dev, |
967 | 969 | int on = simple_strtol(buf, NULL, 0); |
968 | 970 | if (on) { |
969 | 971 | host->flags |= SDHCI_USE_PLATDMA; |
| 972 | + sdhci_bcm2708_writel(host, 1, REG_EXRDFIFO_EN); |
970 | 973 | printk(KERN_INFO "%s: DMA enabled\n", |
971 | 974 | mmc_hostname(host->mmc)); |
972 | 975 | } else { |
973 | 976 | host->flags &= ~(SDHCI_USE_PLATDMA | SDHCI_REQ_USE_DMA); |
| 977 | + sdhci_bcm2708_writel(host, 0, REG_EXRDFIFO_EN); |
974 | 978 | printk(KERN_INFO "%s: DMA disabled\n", |
975 | 979 | mmc_hostname(host->mmc)); |
976 | 980 | } |
@@ -1399,6 +1403,12 @@ static int __devinit sdhci_bcm2708_probe(struct platform_device *pdev) |
1399 | 1403 | ret = device_create_file(&pdev->dev, &dev_attr_dma_wait); |
1400 | 1404 | ret = device_create_file(&pdev->dev, &dev_attr_status); |
1401 | 1405 |
|
| 1406 | +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA |
| 1407 | + /* enable extension fifo for paced DMA transfers */ |
| 1408 | + sdhci_bcm2708_writel(host, 1, REG_EXRDFIFO_EN); |
| 1409 | + sdhci_bcm2708_writel(host, 4, REG_EXRDFIFO_CFG); |
| 1410 | +#endif |
| 1411 | + |
1402 | 1412 | printk(KERN_INFO "%s: BCM2708 SDHC host at 0x%08llx DMA %d IRQ %d\n", |
1403 | 1413 | mmc_hostname(host->mmc), (unsigned long long)iomem->start, |
1404 | 1414 | host_priv->dma_chan, host_priv->dma_irq); |
|
0 commit comments