spi: Build coverage cleanups and improvements
Subsystems (3)
Mark Brown
maintainercover spi: Build coverage cleanups and improvements
This series opens up build coverage of a bunch of SPI drivers by allowing build under COMPILE_TEST where possible, while also adding appropriate architecture specific dependencies to a couple of drivers that didn't have them so they don't show up in builds when they're not useful. We also have one fix for the dependencies of the s3c24xx driver which was turned up in the process of doing this.
---
Mark Brown (8):
spi: s3c24xx: Fix dependencies when FIQ support is enabled
spi: rockchip: Add architecture dependency
spi: nxp-flexspi: Fix ARCH_LAYERSCAPE dependency
spi: davinci: Make available for build test
spi: fsi: Make available for build test
spi: qcom-qspi: Make available for build test
spi: s3c24xx: Only have compile time references to FIQ when building it
spi: s3c24xx: Allow build test coverage
drivers/spi/Kconfig | 15 +++++++++------ drivers/spi/spi-s3c24xx.c | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-)
---
base-commit: 7234d746a8339066313518bfa024fa03f363a55e
change-id: 20230221-spi-arch-deps-dba116a915e9
Best regards,
Signature · 1 line
Mark Brown <[email protected]>
Mark Brown
maintainerPATCH 1/8 spi: s3c24xx: Fix dependencies when FIQ support is enabled
The FIQ APIs aren't exported symbols so can't be used from modules, meaning that the s3c24xx driver can only have FIQ support enabled when it's built in.
--- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
@@ -862,7 +862,7 @@ config SPI_S3C24XX config SPI_S3C24XX_FIQ bool "S3C24XX driver with FIQ pseudo-DMA" - depends on SPI_S3C24XX + depends on SPI_S3C24XX=y select FIQ help Enable FIQ support for the S3C24XX SPI driver to provide pseudo
Signature · 1 line
2.30.2
Re: [PATCH 1/8] spi: s3c24xx: Fix dependencies when FIQ support is enabled
Quoted 14 lines · Mark Brown
The FIQ APIs aren't exported symbols so can't be used from modules, meaning that the s3c24xx driver can only have FIQ support enabled when it's built in.
Signed-off-by Mark Brown <[email protected]>--- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spi/Kconfig +0
-0
drivers/spi/Kconfig config SPI_S3C24XX · line 865
Quoted 5 lines
drivers/spi/Kconfig +1
-1@@ -862,7 +862,7 @@ config SPI_S3C24XX config SPI_S3C24XX_FIQ bool "S3C24XX driver with FIQ pseudo-DMA" - depends on SPI_S3C24XX + depends on SPI_S3C24XX=y
The entire SPI_S3C24XX driver is now being dropped (through Arnd's tree) and should be gone by v6.3-rc1:c9dcd56feb82 ("spi: remove s3c24xx driver")
The patch is not needed.
Best regards,
Krzysztof
Mark Brown
maintainerPATCH 2/8 spi: rockchip: Add architecture dependency
In reply to Mark BrownIf base support for Rockchip SoCs has been disabled then the SPI driver won't be terribly useful, add a dependency on ARCH_ROCKCHIP || COMPILE_TEST to avoid it appearing when not needed.
--- drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/spi/Kconfig +1 -0
@@ -783,6 +783,7 @@ config SPI_PXA2XX_PCI config SPI_ROCKCHIP tristate "Rockchip SPI controller driver" + depends on ARCH_ROCKCHIP || COMPILE_TEST help This selects a driver for Rockchip SPI controller.
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 3/8 spi: nxp-flexspi: Fix ARCH_LAYERSCAPE dependency
In reply to Mark BrownCurrently the NXP Flex SPI driver has a dependency on ARCH_LAYERSCAPE || HAS_IOMEM which means that the dependency is almost always true and the driver available. Really these should be two separate dependencies, with an || COMPILE_TEST dependency for the architecture to ensure build coverage is maintained.
--- drivers/spi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/Kconfig +2 -1
@@ -406,7 +406,8 @@ config SPI_HISI_SFC_V3XX config SPI_NXP_FLEXSPI tristate "NXP Flex SPI controller" - depends on ARCH_LAYERSCAPE || HAS_IOMEM + depends on ARCH_LAYERSCAPE || COMPILE_TEST + depends on HAS_IOMEM help This enables support for the Flex SPI controller in master mode. Up to four slave devices can be connected on two buses with two
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 4/8 spi: davinci: Make available for build test
In reply to Mark BrownThere is no build time dependency on the DaVicni or Keystone architecture support so add an || COMPILE_TEST so we've got better build coverage of the driver.
--- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
@@ -276,7 +276,7 @@ config SPI_COLDFIRE_QSPI config SPI_DAVINCI tristate "Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller" - depends on ARCH_DAVINCI || ARCH_KEYSTONE + depends on ARCH_DAVINCI || ARCH_KEYSTONE || COMPILE_TEST select SPI_BITBANG help SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 5/8 spi: fsi: Make available for build test
In reply to Mark BrownThere is no build time dependency on the platform support so add an || COMPILE_TEST so we've got better build coverage of the driver.
--- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
@@ -357,7 +357,7 @@ config SPI_FALCON config SPI_FSI tristate "FSI SPI driver" - depends on FSI + depends on FSI || COMPILE_TEST help This enables support for the driver for FSI bus attached SPI controllers.
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 6/8 spi: qcom-qspi: Make available for build test
In reply to Mark BrownThere is no build time dependency on the Qualcomm platform support so add an || COMPILE_TEST so we've got better build coverage of the driver.
--- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
@@ -826,7 +826,7 @@ config SPI_RSPI config SPI_QCOM_QSPI tristate "QTI QSPI controller" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST help QSPI(Quad SPI) driver for Qualcomm QSPI controller.
Signature · 1 line
2.30.2
Mark Brown
maintainerPATCH 7/8 spi: s3c24xx: Only have compile time references to FIQ when building it
In reply to Mark BrownThere is a config option which allows the FIQ code in the s3c24xx driver to be disabled but it does not cover the inclusion of the API header or the variables added to the driver data. Add some ifdefs protecting these so that we can improve build coverage.
--- drivers/spi/spi-s3c24xx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-s3c24xx.c +4 -0
@@ -21,7 +21,9 @@#include <linux/spi/s3c24xx-fiq.h> #include <linux/module.h> +#ifdef CONFIG_SPI_S3C24XX_FIQ #include <asm/fiq.h> +#endif #include "spi-s3c24xx-regs.h"
@@ -56,10 +58,12 @@ struct s3c24xx_spi {int len;int count; +#ifdef CONFIG_SPI_S3C24XX_FIQ struct fiq_handler fiq_handler;enum spi_fiq_mode fiq_mode;unsigned char fiq_inuse;unsigned char fiq_claimed; +#endif /* data buffers */ const unsigned char *tx;
Signature · 1 line
2.30.2
Re: [PATCH 7/8] spi: s3c24xx: Only have compile time references to FIQ when building it
Quoted 8 lines · Mark Brown
There is a config option which allows the FIQ code in the s3c24xx driver to be disabled but it does not cover the inclusion of the API header or the variables added to the driver data. Add some ifdefs protecting these so that we can improve build coverage.
Signed-off-by Mark Brown <[email protected]>--- drivers/spi/spi-s3c24xx.c | 4 ++++
Similarly to patch #1 and #8 - the driver is being removed.
Best regards,
Krzysztof
Mark Brown
maintainerPATCH 8/8 spi: s3c24xx: Allow build test coverage
In reply to Mark BrownOther than the FIQ code the driver has no platform dependencies so we can include it in compile test coverage, the FIQ code will only build on arm.
--- drivers/spi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/Kconfig +2 -1
@@ -857,7 +857,7 @@ config SPI_QCOM_GENI config SPI_S3C24XX tristate "Samsung S3C24XX series SPI" - depends on ARCH_S3C24XX + depends on ARCH_S3C24XX || COMPILE_TEST select SPI_BITBANG help SPI driver for Samsung S3C24XX series ARM SoCs
@@ -865,6 +865,7 @@ config SPI_S3C24XX config SPI_S3C24XX_FIQ bool "S3C24XX driver with FIQ pseudo-DMA" depends on SPI_S3C24XX=y + depends on ARM select FIQ help Enable FIQ support for the S3C24XX SPI driver to provide pseudo
Signature · 1 line
2.30.2
Mark Brown
maintainerQuoted 8 lines · Mark Brown
This series opens up build coverage of a bunch of SPI drivers by allowing build under
COMPILE_TESTwhere possible, while also adding appropriate architecture specific dependencies to a couple of drivers that didn't have them so they don't show up in builds when they're not useful. We also have one fix for the dependencies of the s3c24xx driver which was turned up in the process of doing this.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/8] spi: s3c24xx: Fix dependencies when FIQ support is enabled
(no commit info)
[2/8] spi: rockchip: Add architecture dependency
commit: 330a200d360f8b140b31d7da8b657da0472484e6
[3/8] spi: nxp-flexspi: Fix ARCH_LAYERSCAPE dependency
commit: c6b15b2437a10b7b381d32f4a5341f655bfa296f
[4/8] spi: davinci: Make available for build test
commit: e48d57d7203441b7a32b4275462ebb9296ea3fa0
[5/8] spi: fsi: Make available for build test
commit: f916c7080d28831493518364492e33fc6a437907
[6/8] spi: qcom-qspi: Make available for build test
commit: ada850541ad33f621425a382d0810b839cb3169e[7/8] spi: s3c24xx: Only have compile time references to FIQ when building it
(no commit info)
[8/8] spi: s3c24xx: Allow build test coverage
(no commit info)
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark