diff options
author | Jan Glauber <jglauber@cavium.com> | 2017-03-30 17:31:26 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-04-24 21:42:10 +0200 |
commit | cd76e5c565e82af62f708120068ec5d226d98c95 (patch) | |
tree | 7fc1adc83e0ee2f5422be8a0c9a25899a3c19aaf /drivers/mmc/host/cavium-thunderx.c | |
parent | mmc: cavium: Add MMC PCI driver for ThunderX SOCs (diff) | |
download | linux-cd76e5c565e82af62f708120068ec5d226d98c95.tar.xz linux-cd76e5c565e82af62f708120068ec5d226d98c95.zip |
mmc: cavium: Add scatter-gather DMA support
Add Support for the scatter-gather DMA available in the
ThunderX MMC units. Up to 16 DMA requests can be processed
together.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/cavium-thunderx.c')
-rw-r--r-- | drivers/mmc/host/cavium-thunderx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c index cba108b72bac..65244e8df5dd 100644 --- a/drivers/mmc/host/cavium-thunderx.c +++ b/drivers/mmc/host/cavium-thunderx.c @@ -82,7 +82,7 @@ static int thunder_mmc_probe(struct pci_dev *pdev, host->dma_base = host->base; host->reg_off = 0x2000; - host->reg_off_dma = 0x180; + host->reg_off_dma = 0x160; host->clk = devm_clk_get(dev, NULL); if (IS_ERR(host->clk)) @@ -101,6 +101,7 @@ static int thunder_mmc_probe(struct pci_dev *pdev, host->release_bus = thunder_mmc_release_bus; host->int_enable = thunder_mmc_int_enable; + host->use_sg = true; host->big_dma_addr = true; host->need_irq_handler_lock = true; host->last_slot = -1; @@ -115,6 +116,8 @@ static int thunder_mmc_probe(struct pci_dev *pdev, */ writeq(127, host->base + MIO_EMM_INT_EN(host)); writeq(3, host->base + MIO_EMM_DMA_INT_ENA_W1C(host)); + /* Clear DMA FIFO */ + writeq(BIT_ULL(16), host->base + MIO_EMM_DMA_FIFO_CFG(host)); ret = thunder_mmc_register_interrupts(host, pdev); if (ret) |