All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: mt65xx: Add dma max segment size declaration
@ 2022-09-27  8:32 Zhichao Liu
  2022-09-27 14:07 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Zhichao Liu @ 2022-09-27  8:32 UTC (permalink / raw)
  To: Mark Brown, linux-spi; +Cc: zhichao.liu

From: "zhichao.liu" <zhichao.liu@mediatek.com>

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>
---
 drivers/spi/spi-mt65xx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 0a3b9f7eed30..11aeae7fe7fc 100644
--- 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)
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: mt65xx: Add dma max segment size declaration
  2022-09-27  8:32 [PATCH] spi: mt65xx: Add dma max segment size declaration Zhichao Liu
@ 2022-09-27 14:07 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-09-27 14:07 UTC (permalink / raw)
  To: linux-spi, Zhichao Liu

On Tue, 27 Sep 2022 16:32:48 +0800, Zhichao Liu wrote:
> From: "zhichao.liu" <zhichao.liu@mediatek.com>
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-27 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27  8:32 [PATCH] spi: mt65xx: Add dma max segment size declaration Zhichao Liu
2022-09-27 14:07 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.