diff mbox series

[02/20] ASoC: SOF: Intel: fix u16/32 confusion in LSDIID

Message ID 20230807210959.506849-3-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 7a52d7062e02af4a479da24b40cfd76b54c0cd6c
Headers show
Series ASoC: SOF: Intel: add LunarLake support | expand

Commit Message

Pierre-Louis Bossart Aug. 7, 2023, 9:09 p.m. UTC
Likely a combination of copy-paste and test coverage problem. Oops.

Fixes: 87a6ddc0cf1c ("ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
---
 sound/soc/sof/intel/hda-mlink.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mark Brown Aug. 7, 2023, 10:06 p.m. UTC | #1
On Mon, Aug 07, 2023 at 04:09:41PM -0500, Pierre-Louis Bossart wrote:
> Likely a combination of copy-paste and test coverage problem. Oops.
> 
> Fixes: 87a6ddc0cf1c ("ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers")
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Rander Wang <rander.wang@intel.com>

The above commit doesn't seem to be from mainline?
Pierre-Louis Bossart Aug. 8, 2023, 2:23 p.m. UTC | #2
On 8/7/23 17:06, Mark Brown wrote:
> On Mon, Aug 07, 2023 at 04:09:41PM -0500, Pierre-Louis Bossart wrote:
>> Likely a combination of copy-paste and test coverage problem. Oops.
>>
>> Fixes: 87a6ddc0cf1c ("ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers")
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
>> Reviewed-by: Rander Wang <rander.wang@intel.com>
> 
> The above commit doesn't seem to be from mainline?

git log tells me it's been in your tree since April?

This was part of the series "ASoC: SOF: Intel: hda-mlink: HDaudio
multi-link", commit merge a1d68507c1cd3192785d0b9a1a476590c63e9a3c

git log 87a6ddc0cf1c
commit 87a6ddc0cf1c62dbc7c2cc4b5f764a2e992c5ba6
Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date:   Tue Apr 4 13:41:24 2023 +0300

    ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers

    Each SoundWire peripheral can be programmed from the manager side
    either with a regular command FIFO, or with the HDaudio CORB/RIRB
    DMA-based mechanism. The mapping between SoundWire peripheral and SDI
    address is handled with the LSDIID register.

    This mapping only works of course if each peripheral has a unique
    address across all links. This has already been enforced in previous
    Intel contributions allowing for an IDA-based solution for the device
    number allocation.

    The checks on the dev_num are handled at the SoundWire level, but the
    locking is handled at the hda-mlink level.

    Signed-off-by: Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com>
    Reviewed-by: Rander Wang <rander.wang@intel.com>
    Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Takashi Iwai <tiwai@suse.de>
    Link:
https://lore.kernel.org/r/20230404104127.5629-16-peter.ujfalusi@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
diff mbox series

Patch

diff --git a/sound/soc/sof/intel/hda-mlink.c b/sound/soc/sof/intel/hda-mlink.c
index acad3ea2f471..df87b3791c23 100644
--- a/sound/soc/sof/intel/hda-mlink.c
+++ b/sound/soc/sof/intel/hda-mlink.c
@@ -331,14 +331,14 @@  static bool hdaml_link_check_cmdsync(u32 __iomem *lsync, u32 cmdsync_mask)
 	return !!(val & cmdsync_mask);
 }
 
-static void hdaml_link_set_lsdiid(u32 __iomem *lsdiid, int dev_num)
+static void hdaml_link_set_lsdiid(u16 __iomem *lsdiid, int dev_num)
 {
-	u32 val;
+	u16 val;
 
-	val = readl(lsdiid);
+	val = readw(lsdiid);
 	val |= BIT(dev_num);
 
-	writel(val, lsdiid);
+	writew(val, lsdiid);
 }
 
 static void hdaml_shim_map_stream_ch(u16 __iomem *pcmsycm, int lchan, int hchan,