<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 27, 2022 at 2:04 PM Chancel Liu <<a href="mailto:chancel.liu@nxp.com">chancel.liu@nxp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a<br>
multiple of 8bytes can enable scatter-gather. NBYTES is calculated by<br>
bus width times maxburst. On i.MX93 platform the value of maxburst is<br>
specified to 8. It makes sure that NBYTES is a multiple of 8bytes.<br>
<br>
Signed-off-by: Chancel Liu <<a href="mailto:chancel.liu@nxp.com" target="_blank">chancel.liu@nxp.com</a>><br></blockquote><div><br></div><div>Acked-by: Shengjiu Wang <<a href="mailto:shengjiu.wang@gmail.com">shengjiu.wang@gmail.com</a>></div><div><br></div><div>best regards</div><div>wang shengjiu </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
 sound/soc/fsl/fsl_sai.c | 11 +++++++----<br>
 sound/soc/fsl/fsl_sai.h |  1 +<br>
 2 files changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c<br>
index 68e1cc4c369a..a0ea27f06997 100644<br>
--- a/sound/soc/fsl/fsl_sai.c<br>
+++ b/sound/soc/fsl/fsl_sai.c<br>
@@ -872,10 +872,10 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)<br>
<br>
        regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),<br>
                           FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),<br>
-                          sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX);<br>
+                          sai->soc_data->fifo_depth - sai->dma_params_tx.maxburst);<br>
        regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),<br>
                           FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),<br>
-                          FSL_SAI_MAXBURST_RX - 1);<br>
+                          sai->dma_params_rx.maxburst - 1);<br>
<br>
        snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,<br>
                                &sai->dma_params_rx);<br>
@@ -1416,8 +1416,10 @@ static int fsl_sai_probe(struct platform_device *pdev)<br>
<br>
        sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0;<br>
        sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0;<br>
-       sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;<br>
-       sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX;<br>
+       sai->dma_params_rx.maxburst =<br>
+               sai->soc_data->max_burst[RX] ? sai->soc_data->max_burst[RX] : FSL_SAI_MAXBURST_RX;<br>
+       sai->dma_params_tx.maxburst =<br>
+               sai->soc_data->max_burst[TX] ? sai->soc_data->max_burst[TX] : FSL_SAI_MAXBURST_TX;<br>
<br>
        sai->pinctrl = devm_pinctrl_get(&pdev->dev);<br>
<br>
@@ -1588,6 +1590,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx93_data = {<br>
        .pins = 4,<br>
        .flags = 0,<br>
        .max_register = FSL_SAI_MCTL,<br>
+       .max_burst = {8, 8},<br>
 };<br>
<br>
 static const struct of_device_id fsl_sai_ids[] = {<br>
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h<br>
index 697f6690068c..197748a888d5 100644<br>
--- a/sound/soc/fsl/fsl_sai.h<br>
+++ b/sound/soc/fsl/fsl_sai.h<br>
@@ -235,6 +235,7 @@ struct fsl_sai_soc_data {<br>
        unsigned int reg_offset;<br>
        unsigned int flags;<br>
        unsigned int max_register;<br>
+       unsigned int max_burst[2];<br>
 };<br>
<br>
 /**<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div></div>