Skip to content

Commit 6c47660

Browse files
Amadeusz Sławińskibroonie
authored andcommitted
ASoC: Intel: Use readq to read 64 bit registers
In order to fix issue described in: "ASoC: Intel: sst: ipc command timeout" https://patchwork.kernel.org/patch/11482829/ use readq function, which is meant to read 64 bit values from registers. On 32 bit platforms it falls back to two readl calls. Reported-by: Brent Lu <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Tested-by: Brent Lu <[email protected]> Acked-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6a5d6fd commit 6c47660

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sound/soc/intel/common/sst-dsp.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <linux/interrupt.h>
1111
#include <linux/module.h>
1212
#include <linux/platform_device.h>
13-
#include <linux/io.h>
13+
#include <linux/io-64-nonatomic-lo-hi.h>
1414
#include <linux/delay.h>
1515

1616
#include "sst-dsp.h"
@@ -34,16 +34,13 @@ EXPORT_SYMBOL_GPL(sst_shim32_read);
3434

3535
void sst_shim32_write64(void __iomem *addr, u32 offset, u64 value)
3636
{
37-
memcpy_toio(addr + offset, &value, sizeof(value));
37+
writeq(value, addr + offset);
3838
}
3939
EXPORT_SYMBOL_GPL(sst_shim32_write64);
4040

4141
u64 sst_shim32_read64(void __iomem *addr, u32 offset)
4242
{
43-
u64 val;
44-
45-
memcpy_fromio(&val, addr + offset, sizeof(val));
46-
return val;
43+
return readq(addr + offset);
4744
}
4845
EXPORT_SYMBOL_GPL(sst_shim32_read64);
4946

0 commit comments

Comments
 (0)