]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ARM: s3c24xx: move spi fiq handler into platform
authorArnd Bergmann <arnd@arndb.de>
Tue, 3 Sep 2019 09:31:09 +0000 (11:31 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 19 Aug 2020 19:45:38 +0000 (21:45 +0200)
The fiq handler needs access to some register definitions that
should not be used directly by device drivers.

Since this is closely related to the irqchip driver anyway,
move it into the same place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[krzk: Add a header guard in include/linux/spi/s3c24xx-fiq.h, fix
       SPDX comment style, update maintainer's entry]
Co-developed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-23-krzk%40kernel.org
Acked-by: Mark Brown <broonie@kernel.org>
MAINTAINERS
arch/arm/mach-s3c24xx/Makefile
arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c [new file with mode: 0644]
arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S [moved from drivers/spi/spi-s3c24xx-fiq.S with 98% similarity]
drivers/spi/Makefile
drivers/spi/spi-s3c24xx.c
include/linux/spi/s3c24xx-fiq.h [moved from drivers/spi/spi-s3c24xx-fiq.h with 66% similarity]

index 45906c58ff4ada7a1431d490e6fb1b37ad122bbf..a14144691ca588c5db5e30f6af9b57131cd4f522 100644 (file)
@@ -15317,6 +15317,7 @@ S:      Maintained
 F:     Documentation/devicetree/bindings/spi/spi-samsung.txt
 F:     drivers/spi/spi-s3c*
 F:     include/linux/platform_data/spi-s3c64xx.h
+F:     include/linux/spi/s3c24xx-fiq.h
 
 SAMSUNG SXGBE DRIVERS
 M:     Byungho An <bh74.an@samsung.com>
index 3ad297bd6b4a3b37cf9c8417d0a38dae4e45ba82..b69eee24940bdb2cbdf4e54b44a9900dee58c3ed 100644 (file)
@@ -9,6 +9,8 @@
 
 obj-y                          += common.o
 obj-y                          += irq-s3c24xx.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)  += irq-s3c24xx-fiq.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)  += irq-s3c24xx-fiq-exports.o
 
 obj-$(CONFIG_CPU_S3C2410)      += s3c2410.o
 obj-$(CONFIG_S3C2410_PLL)      += pll-s3c2410.o
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
new file mode 100644 (file)
index 0000000..84cf863
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/stddef.h>
+#include <linux/export.h>
+#include <linux/spi/s3c24xx-fiq.h>
+
+EXPORT_SYMBOL(s3c24xx_spi_fiq_rx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_tx);
similarity index 98%
rename from drivers/spi/spi-s3c24xx-fiq.S
rename to arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
index 9d5f8f1e5e81ff70530bda8346f53ede0e95e67a..2a84535a14fd7f6d3e937baa9807b522da3a50d0 100644 (file)
@@ -13,7 +13,7 @@
 #include <mach/map.h>
 #include <mach/regs-irq.h>
 
-#include "spi-s3c24xx-fiq.h"
+#include <linux/spi/s3c24xx-fiq.h>
 
 #define S3C2410_SPTDAT           (0x10)
 #define S3C2410_SPRDAT           (0x14)
index cf955ea803cd3c68b4a4821987d15ef60fc61bf6..eba6fb607aa2bf21ad5325a40cd6a9be5c7e0d51 100644 (file)
@@ -97,7 +97,6 @@ obj-$(CONFIG_SPI_RPCIF)                       += spi-rpc-if.o
 obj-$(CONFIG_SPI_RSPI)                 += spi-rspi.o
 obj-$(CONFIG_SPI_S3C24XX)              += spi-s3c24xx-hw.o
 spi-s3c24xx-hw-y                       := spi-s3c24xx.o
-spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
 obj-$(CONFIG_SPI_S3C64XX)              += spi-s3c64xx.o
 obj-$(CONFIG_SPI_SC18IS602)            += spi-sc18is602.o
 obj-$(CONFIG_SPI_SH)                   += spi-sh.o
index 0691248c7c0d977739631b6de70082b4e0fa252f..6ac6f0b6f2375127e8493d15ade3c79eda09b1f7 100644 (file)
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
 #include <linux/spi/s3c24xx.h>
+#include <linux/spi/s3c24xx-fiq.h>
 #include <linux/module.h>
 
 #include <asm/fiq.h>
 
 #include "spi-s3c24xx-regs.h"
-#include "spi-s3c24xx-fiq.h"
 
 /**
  * s3c24xx_spi_devstate - per device data
@@ -229,10 +229,6 @@ struct spi_fiq_code {
        u8      data[];
 };
 
-extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
-
 /**
  * ack_bit - turn IRQ into IRQ acknowledgement bit
  * @irq: The interrupt number
@@ -282,7 +278,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
        regs.uregs[fiq_rrx]  = (long)hw->rx;
        regs.uregs[fiq_rtx]  = (long)hw->tx + 1;
        regs.uregs[fiq_rcount] = hw->len - 1;
-       regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ;
 
        set_fiq_regs(&regs);
 
similarity index 66%
rename from drivers/spi/spi-s3c24xx-fiq.h
rename to include/linux/spi/s3c24xx-fiq.h
index 7786b0ea56ec86d813bd7c802daaee07269f7364..d2842ac1de27471e93de99b735fa7af307e0dc5c 100644 (file)
@@ -7,11 +7,19 @@
  * S3C24XX SPI - FIQ pseudo-DMA transfer support
 */
 
+#ifndef __LINUX_SPI_S3C24XX_FIQ_H
+#define __LINUX_SPI_S3C24XX_FIQ_H __FILE__
+
 /* We have R8 through R13 to play with */
 
 #ifdef __ASSEMBLY__
 #define __REG_NR(x)     r##x
 #else
+
+extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
+
 #define __REG_NR(x)     (x)
 #endif
 
@@ -21,3 +29,5 @@
 #define fiq_rtx                __REG_NR(11)
 #define fiq_rcount     __REG_NR(12)
 #define fiq_rirq       __REG_NR(13)
+
+#endif /* __LINUX_SPI_S3C24XX_FIQ_H */