gpio: stp-xway: get rid of the #include <lantiq_soc.h> dependency
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 2 Jul 2019 22:32:47 +0000 (00:32 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Jul 2019 07:41:02 +0000 (09:41 +0200)
Use the xway_stp_{r,w}32 helpers in xway_stp_w32_mask instead of relying
on ltq_{r,w}32 from the architecture specific <lantiq_soc.h>.
This will allow the driver to be compile-tested on all architectures
that support MMIO.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20190702223248.31934-4-martin.blumenstingl@googlemail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-stp-xway.c

index cbdeba9144c130ef2180ade983593caa0ffeb19c..d946d0ece14af2fd92e679b650645b18f1ecc5f0 100644 (file)
@@ -18,8 +18,6 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <lantiq_soc.h>
-
 /*
  * The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
  * peripheral controller used to drive external shift register cascades. At most
@@ -74,8 +72,7 @@
 #define xway_stp_r32(m, reg)           __raw_readl(m + reg)
 #define xway_stp_w32(m, val, reg)      __raw_writel(val, m + reg)
 #define xway_stp_w32_mask(m, clear, set, reg) \
-               ltq_w32((ltq_r32(m + reg) & ~(clear)) | (set), \
-               m + reg)
+               xway_stp_w32(m, (xway_stp_r32(m, reg) & ~(clear)) | (set), reg)
 
 struct xway_stp {
        struct gpio_chip gc;