Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: s3c24xx: move spi fiq handler into platform

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>

authored by

Arnd Bergmann and committed by
Krzysztof Kozlowski
f131a444 7dbad03e

+24 -8
+1
MAINTAINERS
··· 15317 15317 F: Documentation/devicetree/bindings/spi/spi-samsung.txt 15318 15318 F: drivers/spi/spi-s3c* 15319 15319 F: include/linux/platform_data/spi-s3c64xx.h 15320 + F: include/linux/spi/s3c24xx-fiq.h 15320 15321 15321 15322 SAMSUNG SXGBE DRIVERS 15322 15323 M: Byungho An <bh74.an@samsung.com>
+2
arch/arm/mach-s3c24xx/Makefile
··· 9 9 10 10 obj-y += common.o 11 11 obj-y += irq-s3c24xx.o 12 + obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq.o 13 + obj-$(CONFIG_SPI_S3C24XX_FIQ) += irq-s3c24xx-fiq-exports.o 12 14 13 15 obj-$(CONFIG_CPU_S3C2410) += s3c2410.o 14 16 obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o
+9
arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + 3 + #include <linux/stddef.h> 4 + #include <linux/export.h> 5 + #include <linux/spi/s3c24xx-fiq.h> 6 + 7 + EXPORT_SYMBOL(s3c24xx_spi_fiq_rx); 8 + EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx); 9 + EXPORT_SYMBOL(s3c24xx_spi_fiq_tx);
-1
drivers/spi/Makefile
··· 97 97 obj-$(CONFIG_SPI_RSPI) += spi-rspi.o 98 98 obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o 99 99 spi-s3c24xx-hw-y := spi-s3c24xx.o 100 - spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o 101 100 obj-$(CONFIG_SPI_S3C64XX) += spi-s3c64xx.o 102 101 obj-$(CONFIG_SPI_SC18IS602) += spi-sc18is602.o 103 102 obj-$(CONFIG_SPI_SH) += spi-sh.o
+1 -1
drivers/spi/spi-s3c24xx-fiq.S arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
··· 13 13 #include <mach/map.h> 14 14 #include <mach/regs-irq.h> 15 15 16 - #include "spi-s3c24xx-fiq.h" 16 + #include <linux/spi/s3c24xx-fiq.h> 17 17 18 18 #define S3C2410_SPTDAT (0x10) 19 19 #define S3C2410_SPRDAT (0x14)
+10
drivers/spi/spi-s3c24xx-fiq.h include/linux/spi/s3c24xx-fiq.h
··· 7 7 * S3C24XX SPI - FIQ pseudo-DMA transfer support 8 8 */ 9 9 10 + #ifndef __LINUX_SPI_S3C24XX_FIQ_H 11 + #define __LINUX_SPI_S3C24XX_FIQ_H __FILE__ 12 + 10 13 /* We have R8 through R13 to play with */ 11 14 12 15 #ifdef __ASSEMBLY__ 13 16 #define __REG_NR(x) r##x 14 17 #else 18 + 19 + extern struct spi_fiq_code s3c24xx_spi_fiq_txrx; 20 + extern struct spi_fiq_code s3c24xx_spi_fiq_tx; 21 + extern struct spi_fiq_code s3c24xx_spi_fiq_rx; 22 + 15 23 #define __REG_NR(x) (x) 16 24 #endif 17 25 ··· 29 21 #define fiq_rtx __REG_NR(11) 30 22 #define fiq_rcount __REG_NR(12) 31 23 #define fiq_rirq __REG_NR(13) 24 + 25 + #endif /* __LINUX_SPI_S3C24XX_FIQ_H */
+1 -6
drivers/spi/spi-s3c24xx.c
··· 19 19 #include <linux/spi/spi.h> 20 20 #include <linux/spi/spi_bitbang.h> 21 21 #include <linux/spi/s3c24xx.h> 22 + #include <linux/spi/s3c24xx-fiq.h> 22 23 #include <linux/module.h> 23 24 24 25 #include <asm/fiq.h> 25 26 26 27 #include "spi-s3c24xx-regs.h" 27 - #include "spi-s3c24xx-fiq.h" 28 28 29 29 /** 30 30 * s3c24xx_spi_devstate - per device data ··· 229 229 u8 data[]; 230 230 }; 231 231 232 - extern struct spi_fiq_code s3c24xx_spi_fiq_txrx; 233 - extern struct spi_fiq_code s3c24xx_spi_fiq_tx; 234 - extern struct spi_fiq_code s3c24xx_spi_fiq_rx; 235 - 236 232 /** 237 233 * ack_bit - turn IRQ into IRQ acknowledgement bit 238 234 * @irq: The interrupt number ··· 278 282 regs.uregs[fiq_rrx] = (long)hw->rx; 279 283 regs.uregs[fiq_rtx] = (long)hw->tx + 1; 280 284 regs.uregs[fiq_rcount] = hw->len - 1; 281 - regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ; 282 285 283 286 set_fiq_regs(&regs); 284 287