projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
048f71f
)
spi: mt65xx: Add dma max segment size declaration
author
zhichao.liu
<zhichao.liu@mediatek.com>
Tue, 27 Sep 2022 08:32:48 +0000
(16:32 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 27 Sep 2022 12:48:36 +0000
(13:48 +0100)
Add spi dma max segment size declaration according to spi
hardware capability, instead of 64KB by system default
setting, to improve bus bandwidth for mass data transmission.
Signed-off-by: zhichao.liu <zhichao.liu@mediatek.com>
Link:
https://lore.kernel.org/r/20220927083248.25404-1-zhichao.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-mt65xx.c
b/drivers/spi/spi-mt65xx.c
index 0a3b9f7eed30f1edf0dfc8868b453698908061c3..11aeae7fe7fc9fd59e7e40e0f1e3e162a1b54914 100644
(file)
--- a/
drivers/spi/spi-mt65xx.c
+++ b/
drivers/spi/spi-mt65xx.c
@@
-1184,6
+1184,11
@@
static int mtk_spi_probe(struct platform_device *pdev)
if (!dev->dma_mask)
dev->dma_mask = &dev->coherent_dma_mask;
+ if (mdata->dev_comp->ipm_design)
+ dma_set_max_seg_size(dev, SZ_16M);
+ else
+ dma_set_max_seg_size(dev, SZ_256K);
+
ret = devm_request_irq(dev, irq, mtk_spi_interrupt,
IRQF_TRIGGER_NONE, dev_name(dev), master);
if (ret)