Commit 17b3cf42 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul

dmaengine: hsu: set maximum allowed segment size for DMA

This tells, for example, IOMMU what the maximum size of a segment
the DMA controller can send.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent c36a0176
...@@ -417,6 +417,8 @@ int hsu_dma_probe(struct hsu_dma_chip *chip) ...@@ -417,6 +417,8 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
hsu->dma.dev = chip->dev; hsu->dma.dev = chip->dev;
dma_set_max_seg_size(hsu->dma.dev, HSU_CH_DxTSR_MASK);
ret = dma_async_device_register(&hsu->dma); ret = dma_async_device_register(&hsu->dma);
if (ret) if (ret)
return ret; return ret;
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
#define HSU_CH_DCR_CHEI BIT(23) #define HSU_CH_DCR_CHEI BIT(23)
#define HSU_CH_DCR_CHTOI(x) BIT(24 + (x)) #define HSU_CH_DCR_CHTOI(x) BIT(24 + (x))
/* Bits in HSU_CH_DxTSR */
#define HSU_CH_DxTSR_MASK GENMASK(15, 0)
#define HSU_CH_DxTSR_TSR(x) ((x) & HSU_CH_DxTSR_MASK)
struct hsu_dma_sg { struct hsu_dma_sg {
dma_addr_t addr; dma_addr_t addr;
unsigned int len; unsigned int len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment