On 12/19/22 10:18, Shengjiu Wang wrote:
[...]
+ if (tx_keep_tere) {
+ regmap_read(sai->regmap, FSL_SAI_TCSR(ofs), &tcsr);
+ tcsr &= FSL_SAI_CSR_TERE;
+ }
if (tx)
- regmap_write(sai->regmap, FSL_SAI_TCSR(ofs),
FSL_SAI_CSR_SR);
+ regmap_write(sai->regmap, FSL_SAI_TCSR(ofs),
FSL_SAI_CSR_SR | tcsr);
if (rx)
- regmap_write(sai->regmap, FSL_SAI_RCSR(ofs),
FSL_SAI_CSR_SR);
+ regmap_write(sai->regmap, FSL_SAI_RCSR(ofs),
FSL_SAI_CSR_SR | rcsr);
usleep_range(1000, 2000);
Not sure if you have test your patch.
On the hardware I have available, MX8MNano EVK is not one of them.
there is kernel dump for "scheduling while atomic"
Is it still there if you replace the usleep_range() with udelay() ?
[ 248.778590] BUG: scheduling while atomic: swapper/0/0/0x00010003
[ 248.784618] Modules linked in:
[ 248.787677] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
6.1.0-rc6-00014-gf2b129b4c056-dirty #136
[...]
@@ -1295,6 +1356,13 @@ static int fsl_sai_probe(struct platform_device
*pdev)
int irq, ret, i;
int index;
u32 dmas[4];
+ const char *mclk_parent_names[FSL_SAI_MCLK_MAX];
+ const char *mclk_rxtx_names[2] = { "mclk_rx", "mclk_tx" };
please consider multi sai instance case, this name will duplicate
that cause sai probe issue.
What kind of issue ? Details please.
[...]