alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/4] ASoC: Intel: common: Replace custom implementation of readq / writeq
@ 2017-01-31 14:14 Andy Shevchenko
  2017-01-31 14:14 ` [PATCH v1 2/4] ASoC: Intel: hifi2: " Andy Shevchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Andy Shevchenko @ 2017-01-31 14:14 UTC (permalink / raw)
  To: Mark Brown, alsa-devel, Liam Girdwood, Vinod Koul; +Cc: Andy Shevchenko

The readq() and writeq() helpers are available in the
linux/io-64-nonatomic-hi-lo.h and linux/io-64-nonatomic-lo-hi.h headers.

Replace custom implementation by the generic helpers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/common/sst-dsp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index 11c0805393ff..748f1f5c02df 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -22,6 +22,8 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 
+#include <linux/io-64-nonatomic-lo-hi.h>
+
 #include "sst-dsp.h"
 #include "sst-dsp-priv.h"
 
@@ -43,16 +45,13 @@ EXPORT_SYMBOL_GPL(sst_shim32_read);
 
 void sst_shim32_write64(void __iomem *addr, u32 offset, u64 value)
 {
-	memcpy_toio(addr + offset, &value, sizeof(value));
+	lo_hi_writeq(value, addr + offset);
 }
 EXPORT_SYMBOL_GPL(sst_shim32_write64);
 
 u64 sst_shim32_read64(void __iomem *addr, u32 offset)
 {
-	u64 val;
-
-	memcpy_fromio(&val, addr + offset, sizeof(val));
-	return val;
+	return lo_hi_readq(addr + offset);
 }
 EXPORT_SYMBOL_GPL(sst_shim32_read64);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-02-09  3:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 14:14 [PATCH v1 1/4] ASoC: Intel: common: Replace custom implementation of readq / writeq Andy Shevchenko
2017-01-31 14:14 ` [PATCH v1 2/4] ASoC: Intel: hifi2: " Andy Shevchenko
2017-01-31 14:14 ` [PATCH v1 3/4] ASoC: Intel: hifi2: Convert write()/write64() to return void Andy Shevchenko
2017-01-31 14:14 ` [PATCH v1 4/4] ASoC: Intel: hifi2: Get rid of snail address in comments Andy Shevchenko
2017-02-03 14:12 ` [PATCH v1 1/4] ASoC: Intel: common: Replace custom implementation of readq / writeq Liam Girdwood
2017-02-06 17:03 ` Vinod Koul
2017-02-08 11:59   ` Andy Shevchenko
2017-02-09  3:56     ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).