diff options
author | Viorel Suman <viorel.suman@nxp.com> | 2020-07-20 19:51:47 +0300 |
---|---|---|
committer | Viorel Suman <viorel.suman@nxp.com> | 2020-07-21 09:38:32 +0300 |
commit | 025891eaa5511d7d7fe381e3759a8bcf5bb1bccb (patch) | |
tree | 07f925444ca8be4b89ce1e0fa755e7c101e450b0 /sound/soc/fsl/fsl_xcvr.c | |
parent | b13f65c20531bdabccae0a8d1a050d9204bb9bce (diff) |
MLK-24430: ASoC: fsl_xcvr: reverse the order of Channel Status bits
The Channel Status bits must be reversed.
Fixes: 86401d592b3c ("MLK-23725-1: ASoC: fsl_xcvr: reimplement CS read function")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_xcvr.c')
-rw-r--r-- | sound/soc/fsl/fsl_xcvr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 2e73c0efed02..4e69a6d5fbe9 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1006,7 +1006,7 @@ static irqreturn_t irq0_isr(int irq, void *devid) struct device *dev = &xcvr->pdev->dev; struct regmap *regmap = xcvr->regmap; void __iomem *reg_ctrl, *reg_buff; - u32 isr, val; + u32 isr, val, i; regmap_read(regmap, FSL_XCVR_EXT_ISR, &isr); regmap_write(regmap, FSL_XCVR_EXT_ISR_CLR, isr); @@ -1032,6 +1032,11 @@ static irqreturn_t irq0_isr(int irq, void *devid) /* copy CS buffer */ memcpy_fromio(&xcvr->rx_iec958.status, reg_buff, sizeof(xcvr->rx_iec958.status)); + for (i = 0; i < 6; i++) { + val = *(u32 *)(xcvr->rx_iec958.status + i*4); + *(u32 *)(xcvr->rx_iec958.status + i*4) = + bitrev32(val); + } /* clear CS control register */ memset_io(reg_ctrl, 0, sizeof(val)); } |