* [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers
@ 2020-05-08 6:25 Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 2/5] common: introduce COMPILE_TEST option for build-testing Ahmad Fatoum
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 6:25 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Some of the i.MXs drivers can be build tested even if building for other
platforms. Support adding a future COMPILE_TEST dependency to some of
these drivers by explicitly having their Kconfig symbol select STMP_DEVICE
if the driver calls stmp_reset_block.
This has not been necessary for the normal build, because the ARCH
symbols for the IMX23 and IMX28 already selected STMP_DEVICE.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/mci/Kconfig | 1 +
drivers/mtd/nand/Kconfig | 1 +
drivers/pwm/Kconfig | 1 +
drivers/serial/Kconfig | 1 +
drivers/spi/Kconfig | 1 +
5 files changed, 5 insertions(+)
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index d1a42e459d04..ffb265e0dfbc 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -54,6 +54,7 @@ config MCI_DW_PIO
config MCI_MXS
bool "i.MX23/i.MX28"
depends on ARCH_MXS
+ select STMP_DEVICE
help
Enable this entry to add support to read and write SD cards on a
i.MX23/i.MX28 based system.
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 3c5da4a40cce..f93f7e504b4f 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -74,6 +74,7 @@ config NAND_IMX
config NAND_MXS
bool
select NAND_BBT
+ select STMP_DEVICE
prompt "i.MX23/28/6 NAND driver"
depends on MXS_APBH_DMA
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 9268aac9122a..f4aead19fd26 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -25,6 +25,7 @@ config PWM_IMX
config PWM_MXS
bool "i.MXs PWM Support"
depends on ARCH_MXS
+ select STMP_DEVICE
help
This enables PWM support for Freescale i.MX23/i.MX28 SoCs
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index bd02fe2137c4..14cd430ee489 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -48,6 +48,7 @@ config DRIVER_SERIAL_STM378X
config DRIVER_SERIAL_AUART
depends on ARCH_MXS
+ select STMP_DEVICE
bool "i.MX23/i.MX28 application UART serial driver"
config DRIVER_SERIAL_LINUX_CONSOLE
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index a53b961b89be..323d93efeb1a 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -77,6 +77,7 @@ config DRIVER_SPI_IMX_2_3
config DRIVER_SPI_MXS
bool "i.MX (23,28) SPI Master driver"
depends on ARCH_IMX28
+ select STMP_DEVICE
config DRIVER_SPI_MVEBU
bool "Marvell MVEBU SoC SPI master driver"
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/5] common: introduce COMPILE_TEST option for build-testing
2020-05-08 6:25 [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers Ahmad Fatoum
@ 2020-05-08 6:25 ` Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 3/5] drivers: mark first batch of compilable drivers for COMPILE_TEST Ahmad Fatoum
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 6:25 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Compile-time analysis may help us catch latent bugs in barebox. For this
to be most effective, we need an easy way to compile as much of barebox
as possible. Giving all driver options prompts would do this, but at the
cost of making user experience worse, by asking them about drivers for HW
that's clearly not relevant to the platform they selected.
Do as Linux does and provide a default-off COMPILE_TEST option, which we
can use to make extra drivers selectable.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/Kconfig | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/common/Kconfig b/common/Kconfig
index 97f609d84b0f..4bb0b80ebd58 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1332,6 +1332,19 @@ config KASAN
Enables KASAN (KernelAddressSANitizer) - runtime memory debugger,
designed to find out-of-bounds accesses and use-after-free bugs.
+config COMPILE_TEST
+ bool "compile-test drivers of other platforms"
+ default n
+ help
+ Some drivers can be compiled on a different platform than they are
+ intended to be run on. Despite they cannot be used there due to
+ missing HW support, developers still, opposing to users, might want
+ to build such drivers to compile-test them.
+
+ If you are a developer and want to build as much as currently possible,
+ say Y here. If you are a user, say N here to avoid being prompted for
+ inclusion of unrelated drivers.
+
endmenu
config HAS_DEBUG_LL
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/5] drivers: mark first batch of compilable drivers for COMPILE_TEST
2020-05-08 6:25 [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 2/5] common: introduce COMPILE_TEST option for build-testing Ahmad Fatoum
@ 2020-05-08 6:25 ` Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options Ahmad Fatoum
3 siblings, 0 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 6:25 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
All of these drivers have a runtime dependency on SoC peripherals, but
can nevertheless be compile-tested. Add COMPILE_TEST as an alternate
dependency.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/aiodev/Kconfig | 2 +-
drivers/bus/Kconfig | 4 ++--
drivers/crypto/caam/Kconfig | 2 +-
drivers/crypto/imx-scc/Kconfig | 4 ++--
drivers/gpio/Kconfig | 16 ++++++++--------
drivers/hw_random/Kconfig | 4 ++--
drivers/input/Kconfig | 2 +-
drivers/mci/Kconfig | 14 +++++++-------
drivers/memory/Kconfig | 2 +-
drivers/mfd/Kconfig | 2 +-
drivers/mtd/nand/Kconfig | 8 ++++----
drivers/net/Kconfig | 10 +++++-----
drivers/net/phy/Kconfig | 2 +-
drivers/pci/Kconfig | 2 +-
drivers/phy/Kconfig | 2 +-
drivers/pinctrl/Kconfig | 4 ++--
drivers/pwm/Kconfig | 4 ++--
drivers/watchdog/Kconfig | 18 +++++++++---------
18 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/drivers/aiodev/Kconfig b/drivers/aiodev/Kconfig
index 7f1d0fd4a9a9..a4909d8ecdc6 100644
--- a/drivers/aiodev/Kconfig
+++ b/drivers/aiodev/Kconfig
@@ -18,7 +18,7 @@ config IMX_THERMAL
config QORIQ_THERMAL
tristate "QorIQ Thermal Monitoring Unit"
- depends on ARCH_IMX8MQ
+ depends on ARCH_IMX8MQ || COMPILE_TEST
help
Support for Thermal Monitoring Unit (TMU) found on QorIQ and
i.MX8MQ platforms.
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 1a2ff9129e8e..6b4e1d30e365 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -7,7 +7,7 @@ config BUS_OMAP_GPMC
bool "TI OMAP/AM33xx GPMC support"
config TI_SYSC
- depends on ARCH_OMAP
+ depends on ARCH_OMAP || COMPILE_TEST
bool "TI sysc interconnect target module driver"
default y
help
@@ -15,7 +15,7 @@ config TI_SYSC
found on many TI SoCs.
config IMX_WEIM
- depends on ARCH_IMX
+ depends on ARCH_IMX || COMPILE_TEST
bool "i.MX WEIM driver"
config MVEBU_MBUS
diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig
index 6bb8278d69e8..398167850122 100644
--- a/drivers/crypto/caam/Kconfig
+++ b/drivers/crypto/caam/Kconfig
@@ -1,6 +1,6 @@
config CRYPTO_DEV_FSL_CAAM
bool "Freescale CAAM-Multicore driver backend"
- depends on ARCH_IMX6
+ depends on ARCH_IMX6 || COMPILE_TEST
help
Enables the driver module for Freescale's Cryptographic Accelerator
and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
diff --git a/drivers/crypto/imx-scc/Kconfig b/drivers/crypto/imx-scc/Kconfig
index bc4676a10af7..b5dffb62f6da 100644
--- a/drivers/crypto/imx-scc/Kconfig
+++ b/drivers/crypto/imx-scc/Kconfig
@@ -1,12 +1,12 @@
config CRYPTO_DEV_MXC_SCC
tristate "Support for Freescale Security Controller (SCC)"
- depends on ARCH_IMX25 && OFTREE
+ depends on (ARCH_IMX25 || COMPILE_TEST) && OFTREE
help
This option enables support for the Security Controller (SCC)
found in Freescale i.MX25 chips.
config CRYPTO_DEV_MXC_SCC_BLOB_GEN
tristate "Support for SCC blob gen"
- depends on ARCH_IMX25
+ depends on ARCH_IMX25 || COMPILE_TEST
select BLOBGEN
select CRYPTO_DEV_MXC_SCC
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 7e4fc90d3934..5f0ba7994ebe 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -11,7 +11,7 @@ config GPIO_GENERIC
config GPIO_DIGIC
bool "GPIO support for Canon DIGIC"
- depends on ARCH_DIGIC
+ depends on ARCH_DIGIC || COMPILE_TEST
config GPIO_74164
bool "Generic SPI attached shift register"
@@ -23,7 +23,7 @@ config GPIO_74164
config GPIO_CLPS711X
bool "GPIO support for CLPS711X"
- depends on ARCH_CLPS711X
+ depends on ARCH_CLPS711X || COMPILE_TEST
select GPIO_GENERIC
help
Say yes here to enable the GPIO driver for the CLPS711X CPUs
@@ -31,7 +31,7 @@ config GPIO_CLPS711X
config GPIO_DAVINCI
bool "TI Davinci/Keystone GPIO support"
default y if ARCH_DAVINCI
- depends on ARM && ARCH_DAVINCI
+ depends on (ARM && ARCH_DAVINCI) || COMPILE_TEST
help
Say yes here to enable GPIO support for TI Davinci/Keystone SoCs.
@@ -53,13 +53,13 @@ config GPIO_MXS
config GPIO_JZ4740
bool "GPIO support for Ingenic SoCs"
- depends on MACH_MIPS_XBURST
+ depends on MACH_MIPS_XBURST || COMPILE_TEST
help
Say yes here to enable the GPIO driver for the Ingenic SoCs.
config GPIO_MALTA_FPGA_I2C
bool "Malta CBUS FPGA I2C GPIO"
- depends on MACH_MIPS_MALTA
+ depends on MACH_MIPS_MALTA || COMPILE_TEST
help
Support access to the CBUS FPGA I2C lines through the gpio library.
@@ -69,7 +69,7 @@ config GPIO_MALTA_FPGA_I2C
config GPIO_MPC8XXX
bool "MPC512x/MPC8xxx/QorIQ GPIO support"
- depends on ARCH_LAYERSCAPE
+ depends on ARCH_LAYERSCAPE || COMPILE_TEST
select GPIO_GENERIC
help
Say Y here if you're going to use hardware that connects to the
@@ -80,7 +80,7 @@ config GPIO_OMAP
config GPIO_ORION
bool "GPIO support for Marvell Orion/MVEBU SoCs"
- depends on ARCH_MVEBU
+ depends on ARCH_MVEBU || COMPILE_TEST
help
Say yes here to add the driver for the GPIO controller
found on Marvell Orion and MVEBU SoCs (Armada 370/XP,
@@ -142,7 +142,7 @@ config GPIO_STMPE
config GPIO_TEGRA
bool "GPIO support for the Tegra SoCs"
- depends on ARCH_TEGRA
+ depends on ARCH_TEGRA || COMPILE_TEST
help
Say yes here to include the driver for the GPIO controller found on the
Tegra line of SoCs.
diff --git a/drivers/hw_random/Kconfig b/drivers/hw_random/Kconfig
index 492105456821..1923c755dbba 100644
--- a/drivers/hw_random/Kconfig
+++ b/drivers/hw_random/Kconfig
@@ -9,14 +9,14 @@ if HWRNG
config HWRNG_MXC_RNGC
tristate "Freescale i.MX RNGC Random Number Generator"
- depends on ARCH_IMX25 || ARCH_IMX35 || ARCH_IMX53
+ depends on ARCH_IMX25 || ARCH_IMX35 || ARCH_IMX53 || COMPILE_TEST
help
This driver provides kernel-side support for the Random Number
Generator hardware found on some Freescale i.MX processors.
config HWRNG_STM32
tristate "STM32 Random Number Generator"
- depends on ARCH_STM32MP
+ depends on ARCH_STM32MP || COMPILE_TEST
help
This driver provides barebox support for the Random Number
Generator hardware found on the STM32 family of MPUs and MCUs.
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index e40032d91b2f..95aa51ebfc9e 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -27,7 +27,7 @@ config KEYBOARD_GPIO
config KEYBOARD_IMX_KEYPAD
bool "IMX Keypad"
- depends on ARCH_IMX
+ depends on ARCH_IMX || COMPILE_TEST
select INPUT_MATRIXKMAP
select POLLER
select INPUT
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index ffb265e0dfbc..b2f16390e77e 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -68,16 +68,16 @@ config MCI_S3C
config MCI_BCM283X
bool "MCI support for BCM283X"
- depends on ARCH_BCM283X
+ depends on ARCH_BCM283X || COMPILE_TEST
config MCI_BCM283X_SDHOST
bool "BCM283X sdhost"
- depends on ARCH_BCM283X
+ depends on ARCH_BCM283X || COMPILE_TEST
select MCI_SDHCI
config MCI_DOVE
bool "Marvell Dove SDHCI"
- depends on ARCH_DOVE
+ depends on ARCH_DOVE || COMPILE_TEST
select MCI_SDHCI
help
Enable this entry to add support to read and write SD cards on a
@@ -85,14 +85,14 @@ config MCI_DOVE
config MCI_IMX
bool "i.MX"
- depends on ARCH_IMX27 || ARCH_IMX31
+ depends on ARCH_IMX27 || ARCH_IMX31 || COMPILE_TEST
help
Enable this entry to add support to read and write SD cards on a
Freescale i.MX based system.
config MCI_IMX_ESDHC
bool "i.MX esdhc"
- depends on ARCH_IMX || ARCH_LAYERSCAPE
+ depends on ARCH_IMX || ARCH_LAYERSCAPE || COMPILE_TEST
select MCI_SDHCI
help
Enable this entry to add support to read and write SD cards on a
@@ -128,7 +128,7 @@ config MCI_ATMEL
config MCI_ATMEL_SDHCI
bool "ATMEL SDHCI (sama5d2)"
select MCI_SDHCI
- depends on ARCH_AT91
+ depends on ARCH_AT91 || COMPILE_TEST
help
Enable this entry to add support to read and write SD cards on an
Atmel sama5d2
@@ -142,7 +142,7 @@ config MCI_MMCI
config MCI_TEGRA
bool "Tegra SD/MMC"
- depends on ARCH_TEGRA
+ depends on ARCH_TEGRA || COMPILE_TEST
select MCI_SDHCI
help
Enable this to support SD and MMC card read/write on a Tegra based
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 39fd64477328..134dc9e37a56 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -2,7 +2,7 @@ menu "Memory controller drivers"
config MC_TEGRA124
bool "Support for Tegra124 memory controller"
- depends on ARCH_TEGRA
+ depends on ARCH_TEGRA || COMPILE_TEST
help
Say yes here to include the driver for the memory controller found on
the Tegra124 SoC. This driver performs the necessary initialization
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 32a2c661fc4f..42346154e63a 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -84,7 +84,7 @@ config SMSC_SUPERIO
config MFD_STM32_TIMERS
bool "STM32 Timers"
- depends on ARCH_STM32MP
+ depends on ARCH_STM32MP || COMPILE_TEST
help
Select this to get regmap support for the timer blocks on STM32
MCUs and MPUs.
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index f93f7e504b4f..fff9903d1d35 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -87,7 +87,7 @@ config NAND_OMAP_GPMC
config MTD_NAND_OMAP_ELM
bool "Support for ELM (Error Location Module) on OMAP platforms"
- depends on NAND_OMAP_GPMC
+ depends on NAND_OMAP_GPMC || COMPILE_TEST
help
This config enables the ELM hardware engine, which can be used to
locate and correct errors when using BCH ECC scheme. This offloads
@@ -98,14 +98,14 @@ config MTD_NAND_OMAP_ELM
config NAND_ORION
bool
prompt "Marvell Orion NAND driver"
- depends on ARCH_KIRKWOOD
+ depends on ARCH_KIRKWOOD || COMPILE_TEST
help
Support for the Orion NAND controller, present in Kirkwood SoCs.
config NAND_MRVL_NFC
bool
prompt "Marvell PXA3xx NAND driver"
- depends on ARCH_ARMADA_370 || ARCH_ARMADA_XP || ARCH_PXA3XX
+ depends on ARCH_ARMADA_370 || ARCH_ARMADA_XP || ARCH_PXA3XX || COMPILE_TEST
help
Support for the PXA3xx NAND controller, present in Armada 370/XP and
PXA3xx SoCs.
@@ -118,7 +118,7 @@ config NAND_ATMEL
config NAND_ATMEL_PMECC
bool
prompt "PMECC support"
- depends on NAND_ATMEL
+ depends on NAND_ATMEL || COMPILE_TEST
select NAND_ECC_HW
help
Support for PMECC present on the SoC sam9x5 and sam9n12
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index efa16b30e40e..9bb498527557 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -45,7 +45,7 @@ config DRIVER_NET_CALXEDA_XGMAC
config DRIVER_NET_CS8900
bool "cs8900 ethernet driver"
- depends on HAS_CS8900
+ depends on HAS_CS8900 || COMPILE_TEST
config DRIVER_NET_CPSW
bool "CPSW ethernet driver"
@@ -75,7 +75,7 @@ config DRIVER_NET_DESIGNWARE_GENERIC
config DRIVER_NET_DESIGNWARE_SOCFPGA
bool "Designware Universal MAC ethernet driver for SoCFPGA platforms"
- depends on ARCH_SOCFPGA
+ depends on ARCH_SOCFPGA || COMPILE_TEST
select MFD_SYSCON
select RESET_CONTROLLER
help
@@ -112,7 +112,7 @@ endif
config DRIVER_NET_DM9K
bool "Davicom dm9k[E|A|B] ethernet driver"
- depends on HAS_DM9000
+ depends on HAS_DM9000 || COMPILE_TEST
select PHYLIB
config DRIVER_NET_E1000
@@ -154,7 +154,7 @@ config DRIVER_NET_ETHOC
config DRIVER_NET_FEC_IMX
bool "i.MX FEC Ethernet driver"
- depends on ARCH_HAS_FEC_IMX
+ depends on ARCH_HAS_FEC_IMX || COMPILE_TEST
select PHYLIB
config DRIVER_NET_FSL_FMAN
@@ -179,7 +179,7 @@ config DRIVER_NET_KS8851_MLL
config DRIVER_NET_MACB
bool "macb Ethernet driver"
- depends on HAS_MACB
+ depends on HAS_MACB || COMPILE_TEST
select PHYLIB
config DRIVER_NET_MICREL
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 2806af376fbe..6cb162a43777 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -68,7 +68,7 @@ comment "MII bus device drivers"
config MDIO_MVEBU
bool "Driver for MVEBU SoC MDIO bus"
- depends on ARCH_MVEBU
+ depends on ARCH_MVEBU || COMPILE_TEST
help
Driver for the MDIO bus found on Marvell EBU SoCs.
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 025c418f2bcf..542d734c3c8e 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -49,7 +49,7 @@ config PCI_IMX6
config PCI_LAYERSCAPE
bool "Freescale Layerscape PCIe controller"
- depends on ARCH_LAYERSCAPE
+ depends on ARCH_LAYERSCAPE || COMPILE_TEST
select PCIE_DW
select OF_PCI
select PCI
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index b5c8e98b9e48..0b513b68d0ef 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -26,7 +26,7 @@ source "drivers/phy/freescale/Kconfig"
config PHY_STM32_USBPHYC
tristate "STM32 USB HS PHY Controller"
- depends on ARCH_STM32MP
+ depends on ARCH_STM32MP || COMPILE_TEST
help
Enable this to support the High-Speed USB transceivers that are part
of some STMicroelectronics STM32 SoCs.
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 4f05f5d49458..5553571983d2 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -19,7 +19,7 @@ config PINCTRL_AT91
config PINCTRL_BCM283X
bool "GPIO and pinmux support for BCM283X"
- depends on ARCH_BCM283X
+ depends on ARCH_BCM283X || COMPILE_TEST
help
The pinmux controller on BCM2835
@@ -57,7 +57,7 @@ config PINCTRL_AT91PIO4
config PINCTRL_MXS
bool "MXS pinctrl"
- depends on ARCH_MXS
+ depends on ARCH_MXS || COMPILE_TEST
default ARCH_MXS
help
This pinmux controller is found on i.MX23,28
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index f4aead19fd26..478ea49eede7 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -18,7 +18,7 @@ config PWM_PXA
config PWM_IMX
bool "i.MX PWM Support"
- depends on ARCH_IMX
+ depends on ARCH_IMX || COMPILE_TEST
help
This enables PWM support for Freescale i.MX SoCs
@@ -31,7 +31,7 @@ config PWM_MXS
config PWM_STM32
bool "STM32 PWM Support"
- depends on ARCH_STM32MP
+ depends on ARCH_STM32MP || COMPILE_TEST
help
This enables PWM support for STM32 MCUs and MPUs.
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index fe979d930698..d9734ef58895 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -18,7 +18,7 @@ config WATCHDOG_POLLER
config WATCHDOG_AR9344
bool "QCA AR9344"
- depends on SOC_QCA_AR9344 || SOC_QCA_AR9331
+ depends on SOC_QCA_AR9344 || SOC_QCA_AR9331 || COMPILE_TEST
help
Add support for watchdog on the QCA AR9344 SoC.
@@ -30,7 +30,7 @@ config WATCHDOG_EFI
config WATCHDOG_DAVINCI
bool "TI Davinci"
- depends on ARCH_DAVINCI
+ depends on ARCH_DAVINCI || COMPILE_TEST
help
Add support for watchdog on the TI Davinci SoC.
@@ -42,31 +42,31 @@ config WATCHDOG_DW
config WATCHDOG_MXS28
bool "i.MX28"
- depends on ARCH_IMX28
+ depends on ARCH_IMX28 || COMPILE_TEST
help
Add support for watchdog management for the i.MX28 SoC.
config WATCHDOG_IMX
bool "i.MX watchdog"
- depends on ARCH_IMX || ARCH_LAYERSCAPE
+ depends on ARCH_IMX || ARCH_LAYERSCAPE || COMPILE_TEST
help
Add support for watchdog found on Freescale i.MX SoCs.
config WATCHDOG_JZ4740
bool "Ingenic jz4740 SoC hardware watchdog"
- depends on MACH_MIPS_XBURST
+ depends on MACH_MIPS_XBURST || COMPILE_TEST
help
Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
config WATCHDOG_OMAP
bool "TI OMAP"
- depends on ARCH_OMAP
+ depends on ARCH_OMAP || COMPILE_TEST
help
Add support for watchdog on the TI OMAP SoC.
config WATCHDOG_ORION
bool "Watchdog for Armada XP"
- depends on ARCH_ARMADA_XP
+ depends on ARCH_ARMADA_XP || COMPILE_TEST
help
Add support for watchdog on the Marvall Armada XP
@@ -78,7 +78,7 @@ config WATCHDOG_KVX
config WATCHDOG_BCM2835
bool "Watchdog for BCM283x SoCs"
- depends on ARCH_BCM283X
+ depends on ARCH_BCM283X || COMPILE_TEST
help
Add support for watchdog on the Broadcom BCM283X SoCs.
@@ -90,7 +90,7 @@ config RAVE_SP_WATCHDOG
config STM32_IWDG_WATCHDOG
bool "STM32 IWDG"
- depends on ARCH_STM32MP
+ depends on ARCH_STM32MP || COMPILE_TEST
select MFD_SYSCON
help
Enable to support configuration of the STM32's on-SoC IWDG watchdog.
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers
2020-05-08 6:25 [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 2/5] common: introduce COMPILE_TEST option for build-testing Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 3/5] drivers: mark first batch of compilable drivers for COMPILE_TEST Ahmad Fatoum
@ 2020-05-08 6:25 ` Ahmad Fatoum
2020-05-08 12:34 ` Sascha Hauer
2020-05-08 6:25 ` [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options Ahmad Fatoum
3 siblings, 1 reply; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 6:25 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Many clock source and GPIO controller drivers don't have a prompt, but
are instead default y if their respective platform is enabled. Maintain
this behavior, but add a prompt for when COMPILE_TEST is enabled, so
they can be included in test builds.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/clocksource/Kconfig | 16 +++++++++-------
drivers/gpio/Kconfig | 12 ++++++++----
drivers/pinctrl/Kconfig | 8 ++++----
3 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 8805cda39e02..bc2aae7ad723 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -75,16 +75,18 @@ config CLOCKSOURCE_ATMEL_PIT
bool
config CLOCKSOURCE_ARM_ARCHITECTED_TIMER
- bool
- default y
- depends on ARM && (CPU_64v8 || CPU_V7)
+ bool "ARM architected timer clock source" if COMPILE_TEST
+ default y if ARM && (CPU_64v8 || CPU_V7)
+ depends on (ARM && (CPU_64v8 || CPU_V7)) || COMPILE_TEST
config CLOCKSOURCE_ARM_GLOBAL_TIMER
- bool
- depends on ARM && CPU_V7
+ bool "ARM global timer clock source" if COMPILE_TEST
+ depends on (ARM && CPU_V7) || COMPILE_TEST
+
config CLOCKSOURCE_IMX_GPT
- def_bool y
- depends on ARCH_HAS_IMX_GPT
+ bool "i.MX GPT clock source" if COMPILE_TEST
+ default y if ARCH_HAS_IMX_GPT
+ depends on ARCH_HAS_IMX_GPT || COMPILE_TEST
config CLOCKSOURCE_DW_APB_TIMER
bool "DW APB timer driver"
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 5f0ba7994ebe..261b6e666257 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -43,13 +43,16 @@ config GPIO_GENERIC_PLATFORM
GPIO controllers
config GPIO_IMX
- def_bool ARCH_IMX
+ bool "i.MX GPIO controller" if COMPILE_TEST
+ default y if ARCH_IMX
config GPIO_VF610
- def_bool ARCH_VF610
+ bool "VF610 GPIO controller" if COMPILE_TEST
+ default y if ARCH_VF610
config GPIO_MXS
- def_bool ARCH_MXS
+ bool "MXS GPIO controller" if COMPILE_TEST
+ default y if ARCH_MXS
config GPIO_JZ4740
bool "GPIO support for Ingenic SoCs"
@@ -76,7 +79,8 @@ config GPIO_MPC8XXX
MPC512x/831x/834x/837x/8572/8610/QorIQ GPIOs.
config GPIO_OMAP
- def_bool ARCH_OMAP
+ bool "OMAP GPIO controller" if COMPILE_TEST
+ default y if ARCH_OMAP
config GPIO_ORION
bool "GPIO support for Marvell Orion/MVEBU SoCs"
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 5553571983d2..6de9d946720c 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -73,20 +73,20 @@ config PINCTRL_SINGLE
bool "pinctrl single"
config PINCTRL_TEGRA20
- bool
+ bool "Tegra20 pinctrl support" if COMPILE_TEST
default y if ARCH_TEGRA_2x_SOC
help
The pinmux controller found on the Tegra 20 line of SoCs.
config PINCTRL_TEGRA30
- bool
+ bool "Tegra30 pinctrl support" if COMPILE_TEST
default y if ARCH_TEGRA_3x_SOC
default y if ARCH_TEGRA_124_SOC
help
The pinmux controller found on the Tegra 30+ line of SoCs.
config PINCTRL_TEGRA_XUSB
- bool
+ bool "Tegra SerDes pinmux support" if COMPILE_TEST
default y if ARCH_TEGRA_124_SOC
select GENERIC_PHY
help
@@ -100,7 +100,7 @@ config PINCTRL_VF610
Pinmux controller found on Vybrid VF610 family of SoCs
config PINCTRL_STM32
- bool
+ bool "STM32 pinctrl support" if COMPILE_TEST
default y if ARCH_STM32MP
help
Pinmux and GPIO controller found on STM32 family
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options
2020-05-08 6:25 [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers Ahmad Fatoum
` (2 preceding siblings ...)
2020-05-08 6:25 ` [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers Ahmad Fatoum
@ 2020-05-08 6:25 ` Ahmad Fatoum
2020-05-08 7:45 ` Ahmad Fatoum
3 siblings, 1 reply; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 6:25 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Some Kconfig options we have are promptless and off-by-default and
instead can only be enabled by being selected from platform options.
For some of those that aren't compile testable, add a new
COMPILE_TEST-only prompt.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/Kconfig | 4 ++--
drivers/clocksource/Kconfig | 28 ++++++++++++++--------------
drivers/ddr/fsl/Kconfig | 2 +-
drivers/pci/Kconfig | 2 +-
lib/Kconfig | 2 +-
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig
index 4bb0b80ebd58..460ac487cb05 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -38,8 +38,8 @@ config BLOCK_WRITE
bool
config ELF
- bool
- depends on MIPS
+ bool "ELF Support" if COMPILE_TEST
+ depends on MIPS || COMPILE_TEST
config FILETYPE
bool
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index bc2aae7ad723..92d83f7e7d2b 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -12,16 +12,16 @@ config ARM_SMP_TWD
depends on ARM && CPU_V7
config CLOCKSOURCE_BCM283X
- bool
- depends on ARCH_BCM283X
+ bool "BCM283x clock source" if COMPILE_TEST
+ depends on ARCH_BCM283X || COMPILE_TEST
config CLOCKSOURCE_CLPS711X
- bool
- depends on ARCH_CLPS711X
+ bool "CLPS711x clock source" if COMPILE_TEST
+ depends on ARCH_CLPS711X || COMPILE_TEST
config CLOCKSOURCE_DIGIC
- bool
- depends on ARCH_DIGIC
+ bool "DIGIC clock source" if COMPILE_TEST
+ depends on ARCH_DIGIC || COMPILE_TEST
config CLOCKSOURCE_DUMMY_RATE
int
@@ -52,20 +52,20 @@ config CLOCKSOURCE_KVX
depends on KVX
config CLOCKSOURCE_MVEBU
- bool
- depends on ARCH_MVEBU
+ bool "MVEBU clock source" if COMPILE_TEST
+ depends on ARCH_MVEBU || COMPILE_TEST
config CLOCKSOURCE_NOMADIK
- bool
- depends on ARM
+ bool "Nomadik clock source" if COMPILE_TEST
+ depends on ARM || COMPILE_TEST
config CLOCKSOURCE_ORION
- bool
- depends on ARCH_MVEBU
+ bool "ORION clock source" if COMPILE_TEST
+ depends on ARCH_MVEBU || COMPILE_TEST
config CLOCKSOURCE_UEMD
- bool
- depends on ARCH_UEMD
+ bool "UEMD clock source" if COMPILE_TEST
+ depends on ARCH_UEMD || COMPILE_TEST
config CLOCKSOURCE_ROCKCHIP
bool
diff --git a/drivers/ddr/fsl/Kconfig b/drivers/ddr/fsl/Kconfig
index 9cae9028a2f5..09920bb8632e 100644
--- a/drivers/ddr/fsl/Kconfig
+++ b/drivers/ddr/fsl/Kconfig
@@ -1,5 +1,5 @@
config DDR_FSL
- bool
+ bool "Freescale DDR support" if COMPILE_TEST
if DDR_FSL
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 542d734c3c8e..058546097621 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -1,5 +1,5 @@
config HW_HAS_PCI
- bool
+ bool "Compile in PCI core" if COMPILE_TEST
if HW_HAS_PCI
diff --git a/lib/Kconfig b/lib/Kconfig
index e4b347375971..b4a80797009c 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -97,7 +97,7 @@ config IMAGE_SPARSE
bool
config STMP_DEVICE
- bool
+ bool "STMP device support" if COMPILE_TEST
config FSL_QE_FIRMWARE
select CRC32
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options
2020-05-08 6:25 ` [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options Ahmad Fatoum
@ 2020-05-08 7:45 ` Ahmad Fatoum
0 siblings, 0 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 7:45 UTC (permalink / raw)
To: barebox
On 5/8/20 8:25 AM, Ahmad Fatoum wrote:
> Some Kconfig options we have are promptless and off-by-default and
> instead can only be enabled by being selected from platform options.
>
> For some of those that aren't compile testable, add a new
s/aren't/are/
I can send a v2 if needed.
> COMPILE_TEST-only prompt.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/Kconfig | 4 ++--
> drivers/clocksource/Kconfig | 28 ++++++++++++++--------------
> drivers/ddr/fsl/Kconfig | 2 +-
> drivers/pci/Kconfig | 2 +-
> lib/Kconfig | 2 +-
> 5 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 4bb0b80ebd58..460ac487cb05 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -38,8 +38,8 @@ config BLOCK_WRITE
> bool
>
> config ELF
> - bool
> - depends on MIPS
> + bool "ELF Support" if COMPILE_TEST
> + depends on MIPS || COMPILE_TEST
>
> config FILETYPE
> bool
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index bc2aae7ad723..92d83f7e7d2b 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -12,16 +12,16 @@ config ARM_SMP_TWD
> depends on ARM && CPU_V7
>
> config CLOCKSOURCE_BCM283X
> - bool
> - depends on ARCH_BCM283X
> + bool "BCM283x clock source" if COMPILE_TEST
> + depends on ARCH_BCM283X || COMPILE_TEST
>
> config CLOCKSOURCE_CLPS711X
> - bool
> - depends on ARCH_CLPS711X
> + bool "CLPS711x clock source" if COMPILE_TEST
> + depends on ARCH_CLPS711X || COMPILE_TEST
>
> config CLOCKSOURCE_DIGIC
> - bool
> - depends on ARCH_DIGIC
> + bool "DIGIC clock source" if COMPILE_TEST
> + depends on ARCH_DIGIC || COMPILE_TEST
>
> config CLOCKSOURCE_DUMMY_RATE
> int
> @@ -52,20 +52,20 @@ config CLOCKSOURCE_KVX
> depends on KVX
>
> config CLOCKSOURCE_MVEBU
> - bool
> - depends on ARCH_MVEBU
> + bool "MVEBU clock source" if COMPILE_TEST
> + depends on ARCH_MVEBU || COMPILE_TEST
>
> config CLOCKSOURCE_NOMADIK
> - bool
> - depends on ARM
> + bool "Nomadik clock source" if COMPILE_TEST
> + depends on ARM || COMPILE_TEST
>
> config CLOCKSOURCE_ORION
> - bool
> - depends on ARCH_MVEBU
> + bool "ORION clock source" if COMPILE_TEST
> + depends on ARCH_MVEBU || COMPILE_TEST
>
> config CLOCKSOURCE_UEMD
> - bool
> - depends on ARCH_UEMD
> + bool "UEMD clock source" if COMPILE_TEST
> + depends on ARCH_UEMD || COMPILE_TEST
>
> config CLOCKSOURCE_ROCKCHIP
> bool
> diff --git a/drivers/ddr/fsl/Kconfig b/drivers/ddr/fsl/Kconfig
> index 9cae9028a2f5..09920bb8632e 100644
> --- a/drivers/ddr/fsl/Kconfig
> +++ b/drivers/ddr/fsl/Kconfig
> @@ -1,5 +1,5 @@
> config DDR_FSL
> - bool
> + bool "Freescale DDR support" if COMPILE_TEST
>
> if DDR_FSL
>
> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> index 542d734c3c8e..058546097621 100644
> --- a/drivers/pci/Kconfig
> +++ b/drivers/pci/Kconfig
> @@ -1,5 +1,5 @@
> config HW_HAS_PCI
> - bool
> + bool "Compile in PCI core" if COMPILE_TEST
>
> if HW_HAS_PCI
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index e4b347375971..b4a80797009c 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -97,7 +97,7 @@ config IMAGE_SPARSE
> bool
>
> config STMP_DEVICE
> - bool
> + bool "STMP device support" if COMPILE_TEST
>
> config FSL_QE_FIRMWARE
> select CRC32
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers
2020-05-08 6:25 ` [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers Ahmad Fatoum
@ 2020-05-08 12:34 ` Sascha Hauer
2020-05-08 12:50 ` Sascha Hauer
0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2020-05-08 12:34 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Fri, May 08, 2020 at 08:25:29AM +0200, Ahmad Fatoum wrote:
> Many clock source and GPIO controller drivers don't have a prompt, but
> are instead default y if their respective platform is enabled. Maintain
> this behavior, but add a prompt for when COMPILE_TEST is enabled, so
> they can be included in test builds.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/clocksource/Kconfig | 16 +++++++++-------
> drivers/gpio/Kconfig | 12 ++++++++----
> drivers/pinctrl/Kconfig | 8 ++++----
> 3 files changed, 21 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 8805cda39e02..bc2aae7ad723 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -75,16 +75,18 @@ config CLOCKSOURCE_ATMEL_PIT
> bool
>
> config CLOCKSOURCE_ARM_ARCHITECTED_TIMER
> - bool
> - default y
> - depends on ARM && (CPU_64v8 || CPU_V7)
> + bool "ARM architected timer clock source" if COMPILE_TEST
> + default y if ARM && (CPU_64v8 || CPU_V7)
> + depends on (ARM && (CPU_64v8 || CPU_V7)) || COMPILE_TEST
This driver compiles only on ARM. It uses get_cntpct() which is a
contains inline assembly.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers
2020-05-08 12:34 ` Sascha Hauer
@ 2020-05-08 12:50 ` Sascha Hauer
2020-05-08 13:51 ` Ahmad Fatoum
0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2020-05-08 12:50 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Fri, May 08, 2020 at 02:34:31PM +0200, Sascha Hauer wrote:
> On Fri, May 08, 2020 at 08:25:29AM +0200, Ahmad Fatoum wrote:
> > Many clock source and GPIO controller drivers don't have a prompt, but
> > are instead default y if their respective platform is enabled. Maintain
> > this behavior, but add a prompt for when COMPILE_TEST is enabled, so
> > they can be included in test builds.
> >
> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > ---
> > drivers/clocksource/Kconfig | 16 +++++++++-------
> > drivers/gpio/Kconfig | 12 ++++++++----
> > drivers/pinctrl/Kconfig | 8 ++++----
> > 3 files changed, 21 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > index 8805cda39e02..bc2aae7ad723 100644
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -75,16 +75,18 @@ config CLOCKSOURCE_ATMEL_PIT
> > bool
> >
> > config CLOCKSOURCE_ARM_ARCHITECTED_TIMER
> > - bool
> > - default y
> > - depends on ARM && (CPU_64v8 || CPU_V7)
> > + bool "ARM architected timer clock source" if COMPILE_TEST
> > + default y if ARM && (CPU_64v8 || CPU_V7)
> > + depends on (ARM && (CPU_64v8 || CPU_V7)) || COMPILE_TEST
>
> This driver compiles only on ARM. It uses get_cntpct() which is a
> contains inline assembly.
Skipped this hunk while applying and added the following patch to
actually make the Atmel MCI driver compilable when COMPILE_TEST is
selected.
Sascha
------------------------------8<-------------------------
From f4abcd9f1f7ddb5a032d8c07a6adcb95b31cb7c0 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Fri, 8 May 2020 14:45:00 +0200
Subject: [PATCH] ARM: at91: Move mci platform data to include/
To be able to add the Atmel mci driver to COMPILE_TEST move the
definition of struct atmel_mci_platform_data to include/ where it
can be reached from foreign SoCs as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-at91/include/mach/board.h | 11 +----------
drivers/mci/atmel_mci.c | 2 +-
include/platform_data/atmel-mci.h | 15 +++++++++++++++
3 files changed, 17 insertions(+), 11 deletions(-)
create mode 100644 include/platform_data/atmel-mci.h
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 4c4b51180c..033341e270 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -147,16 +147,7 @@ static inline struct device_d * at91_register_uart(unsigned id, unsigned pins)
}
#endif
-/* Multimedia Card Interface */
-struct atmel_mci_platform_data {
- unsigned slot_b;
- unsigned bus_width;
- int detect_pin;
- int wp_pin;
- char *devname;
-};
-
-void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data);
+#include <platform_data/atmel-mci.h>
/* SPI Master platform data */
struct at91_spi_platform_data {
diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 0d3b245ced..b4c4e7769e 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -21,9 +21,9 @@
#include <clock.h>
#include <gpio.h>
#include <io.h>
-#include <mach/board.h>
#include <linux/clk.h>
#include <linux/err.h>
+#include <platform_data/atmel-mci.h>
#include <of_gpio.h>
#include "atmel-mci-regs.h"
diff --git a/include/platform_data/atmel-mci.h b/include/platform_data/atmel-mci.h
new file mode 100644
index 0000000000..d99ee3d138
--- /dev/null
+++ b/include/platform_data/atmel-mci.h
@@ -0,0 +1,15 @@
+#ifndef PLATFORM_DATA_ATMEL_MCI_H
+#define PLATFORM_DATA_ATMEL_MCI_H
+
+/* Multimedia Card Interface */
+struct atmel_mci_platform_data {
+ unsigned slot_b;
+ unsigned bus_width;
+ int detect_pin;
+ int wp_pin;
+ char *devname;
+};
+
+void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data);
+
+#endif /* PLATFORM_DATA_ATMEL_MCI_H */
--
2.26.2
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers
2020-05-08 12:50 ` Sascha Hauer
@ 2020-05-08 13:51 ` Ahmad Fatoum
0 siblings, 0 replies; 9+ messages in thread
From: Ahmad Fatoum @ 2020-05-08 13:51 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hello Sascha,
On 5/8/20 2:50 PM, Sascha Hauer wrote:
> On Fri, May 08, 2020 at 02:34:31PM +0200, Sascha Hauer wrote:
>> On Fri, May 08, 2020 at 08:25:29AM +0200, Ahmad Fatoum wrote:
>>> Many clock source and GPIO controller drivers don't have a prompt, but
>>> are instead default y if their respective platform is enabled. Maintain
>>> this behavior, but add a prompt for when COMPILE_TEST is enabled, so
>>> they can be included in test builds.
>>>
>>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> ---
>>> drivers/clocksource/Kconfig | 16 +++++++++-------
>>> drivers/gpio/Kconfig | 12 ++++++++----
>>> drivers/pinctrl/Kconfig | 8 ++++----
>>> 3 files changed, 21 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>>> index 8805cda39e02..bc2aae7ad723 100644
>>> --- a/drivers/clocksource/Kconfig
>>> +++ b/drivers/clocksource/Kconfig
>>> @@ -75,16 +75,18 @@ config CLOCKSOURCE_ATMEL_PIT
>>> bool
>>>
>>> config CLOCKSOURCE_ARM_ARCHITECTED_TIMER
>>> - bool
>>> - default y
>>> - depends on ARM && (CPU_64v8 || CPU_V7)
>>> + bool "ARM architected timer clock source" if COMPILE_TEST
>>> + default y if ARM && (CPU_64v8 || CPU_V7)
>>> + depends on (ARM && (CPU_64v8 || CPU_V7)) || COMPILE_TEST
>>
>> This driver compiles only on ARM. It uses get_cntpct() which is a
>> contains inline assembly.
>
> Skipped this hunk while applying and added the following patch to
> actually make the Atmel MCI driver compilable when COMPILE_TEST is
> selected.
Great. Thanks!
>
> Sascha
>
> ------------------------------8<-------------------------
> From f4abcd9f1f7ddb5a032d8c07a6adcb95b31cb7c0 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Fri, 8 May 2020 14:45:00 +0200
> Subject: [PATCH] ARM: at91: Move mci platform data to include/
>
> To be able to add the Atmel mci driver to COMPILE_TEST move the
> definition of struct atmel_mci_platform_data to include/ where it
> can be reached from foreign SoCs as well.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-at91/include/mach/board.h | 11 +----------
> drivers/mci/atmel_mci.c | 2 +-
> include/platform_data/atmel-mci.h | 15 +++++++++++++++
> 3 files changed, 17 insertions(+), 11 deletions(-)
> create mode 100644 include/platform_data/atmel-mci.h
>
> diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
> index 4c4b51180c..033341e270 100644
> --- a/arch/arm/mach-at91/include/mach/board.h
> +++ b/arch/arm/mach-at91/include/mach/board.h
> @@ -147,16 +147,7 @@ static inline struct device_d * at91_register_uart(unsigned id, unsigned pins)
> }
> #endif
>
> -/* Multimedia Card Interface */
> -struct atmel_mci_platform_data {
> - unsigned slot_b;
> - unsigned bus_width;
> - int detect_pin;
> - int wp_pin;
> - char *devname;
> -};
> -
> -void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data);
> +#include <platform_data/atmel-mci.h>
>
> /* SPI Master platform data */
> struct at91_spi_platform_data {
> diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
> index 0d3b245ced..b4c4e7769e 100644
> --- a/drivers/mci/atmel_mci.c
> +++ b/drivers/mci/atmel_mci.c
> @@ -21,9 +21,9 @@
> #include <clock.h>
> #include <gpio.h>
> #include <io.h>
> -#include <mach/board.h>
> #include <linux/clk.h>
> #include <linux/err.h>
> +#include <platform_data/atmel-mci.h>
> #include <of_gpio.h>
>
> #include "atmel-mci-regs.h"
> diff --git a/include/platform_data/atmel-mci.h b/include/platform_data/atmel-mci.h
> new file mode 100644
> index 0000000000..d99ee3d138
> --- /dev/null
> +++ b/include/platform_data/atmel-mci.h
> @@ -0,0 +1,15 @@
> +#ifndef PLATFORM_DATA_ATMEL_MCI_H
> +#define PLATFORM_DATA_ATMEL_MCI_H
> +
> +/* Multimedia Card Interface */
> +struct atmel_mci_platform_data {
> + unsigned slot_b;
> + unsigned bus_width;
> + int detect_pin;
> + int wp_pin;
> + char *devname;
> +};
> +
> +void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data);
> +
> +#endif /* PLATFORM_DATA_ATMEL_MCI_H */
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-08 13:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 6:25 [PATCH 1/5] drivers: explicitly select dependency STMP_DEVICE for i.MX23/28 drivers Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 2/5] common: introduce COMPILE_TEST option for build-testing Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 3/5] drivers: mark first batch of compilable drivers for COMPILE_TEST Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 4/5] drivers: add COMPILE_TEST prompts to some on-by-default drivers Ahmad Fatoum
2020-05-08 12:34 ` Sascha Hauer
2020-05-08 12:50 ` Sascha Hauer
2020-05-08 13:51 ` Ahmad Fatoum
2020-05-08 6:25 ` [PATCH 5/5] drivers: add COMPILE_TEST prompts for some off-by-default options Ahmad Fatoum
2020-05-08 7:45 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox