Skip to contentSkip to conversation

spi: mt65xx: Add dma max segment size declaration

PATCH In review Zhichao Liu 2 participants 2 messages Sep 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: mt65xx: Add dma max segment size declaration

From: "zhichao.liu" <[email protected]>

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.

---
 drivers/spi/spi-mt65xx.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/spi/spi-mt65xx.c +5 -0
index 0a3b9f7eed30..11aeae7fe7fc 100644
@@ -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)
Signature · 1 line
2.18.0
maintainer
#1 lore raw
Quoted 8 lines · Zhichao Liu

From: "zhichao.liu" <[email protected]>

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.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: mt65xx: Add dma max segment size declaration

      commit: 309e98548c2b144512d0a212f2d786ae9694f5e4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark