diff mbox series

[1/2] ASoC: Intel: baytrail: Fix register access

Message ID 20200507133405.32251-1-amadeuszx.slawinski@linux.intel.com (mailing list archive)
State Accepted
Commit 6a5d6fd332624e4eee9a450bb3d18f761548822f
Headers show
Series [1/2] ASoC: Intel: baytrail: Fix register access | expand

Commit Message

Amadeusz Sławiński May 7, 2020, 1:34 p.m. UTC
Baytrail has 64 bit registers, so we should use *read64* to read from it
and then use proper mask values to check status.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/baytrail/sst-baytrail-ipc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Brent Lu May 12, 2020, 6:19 a.m. UTC | #1
> -----Original Message-----
> From: Alsa-devel <alsa-devel-bounces@alsa-project.org> On Behalf Of
> Amadeusz Slawinski
> Sent: Thursday, May 7, 2020 9:34 PM
> To: Rojewski, Cezary <cezary.rojewski@intel.com>; Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com>; Liam Girdwood
> <lgirdwood@gmail.com>; Jie Yang <yang.jie@linux.intel.com>; Mark Brown
> <broonie@kernel.org>; Takashi Iwai <tiwai@suse.com>
> Cc: alsa-devel@alsa-project.org; Amadeusz Sławiński
> <amadeuszx.slawinski@linux.intel.com>
> Subject: [PATCH 1/2] ASoC: Intel: baytrail: Fix register access
> 
> Baytrail has 64 bit registers, so we should use *read64* to read from it and
> then use proper mask values to check status.
> 
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

Tested-by: Brent Lu <brent.lu@intel.com>


Regards,
Brent

> ---
>  sound/soc/intel/baytrail/sst-baytrail-ipc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> index 74274bd38f7a..34746fd871b0 100644
> --- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> +++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> @@ -666,8 +666,8 @@ static bool byt_is_dsp_busy(struct sst_dsp *dsp)  {
>  	u64 ipcx;
> 
> -	ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX);
> -	return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE));
> +	ipcx = sst_dsp_shim_read64_unlocked(dsp, SST_IPCX);
> +	return (ipcx & (SST_BYT_IPCX_BUSY | SST_BYT_IPCX_DONE));
>  }
> 
>  int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
> --
> 2.17.1
Cezary Rojewski May 12, 2020, 7:33 a.m. UTC | #2
On 2020-05-12 8:19 AM, Lu, Brent wrote:
>> -----Original Message-----
>> From: Alsa-devel <alsa-devel-bounces@alsa-project.org> On Behalf Of
>> Amadeusz Slawinski
>> Sent: Thursday, May 7, 2020 9:34 PM
>> To: Rojewski, Cezary <cezary.rojewski@intel.com>; Pierre-Louis Bossart
>> <pierre-louis.bossart@linux.intel.com>; Liam Girdwood
>> <lgirdwood@gmail.com>; Jie Yang <yang.jie@linux.intel.com>; Mark Brown
>> <broonie@kernel.org>; Takashi Iwai <tiwai@suse.com>
>> Cc: alsa-devel@alsa-project.org; Amadeusz Sławiński
>> <amadeuszx.slawinski@linux.intel.com>
>> Subject: [PATCH 1/2] ASoC: Intel: baytrail: Fix register access
>>
>> Baytrail has 64 bit registers, so we should use *read64* to read from it and
>> then use proper mask values to check status.
>>
>> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
> 
> Tested-by: Brent Lu <brent.lu@intel.com>
> 
> 
> Regards,
> Brent
> 

Thanks Brent!

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Mark Brown May 12, 2020, 3:10 p.m. UTC | #3
On Thu, 7 May 2020 09:34:04 -0400, Amadeusz Sławiński wrote:
> Baytrail has 64 bit registers, so we should use *read64* to read from it
> and then use proper mask values to check status.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7

Thanks!

[1/2] ASoC: Intel: baytrail: Fix register access
      commit: 6a5d6fd332624e4eee9a450bb3d18f761548822f
[2/2] ASoC: Intel: Use readq to read 64 bit registers
      commit: 6c47660e3c3acad9401f8fe1d288d4234f05549c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
index 74274bd38f7a..34746fd871b0 100644
--- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
+++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
@@ -666,8 +666,8 @@  static bool byt_is_dsp_busy(struct sst_dsp *dsp)
 {
 	u64 ipcx;
 
-	ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX);
-	return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE));
+	ipcx = sst_dsp_shim_read64_unlocked(dsp, SST_IPCX);
+	return (ipcx & (SST_BYT_IPCX_BUSY | SST_BYT_IPCX_DONE));
 }
 
 int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)