Skip to contentSkip to conversation

sandbox: allow "make ARCH=sandbox allyesconfig"

PATCH Applied Holger Schurig 2 participants 2 messages Jun 26, 2014

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 sandbox: allow "make ARCH=sandbox allyesconfig"

Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code.

This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out.

---
 common/Kconfig                   |   21 +++++++++++++++++++++
 drivers/ata/Kconfig              |    1 +
 drivers/input/Kconfig            |    2 +-
 drivers/net/Kconfig              |    4 ++++
 drivers/regulator/Kconfig        |    1 +
 drivers/usb/host/Kconfig         |    1 +
 drivers/video/imx-ipu-v3/Kconfig |    1 +
 7 files changed, 30 insertions(+), 1 deletion(-)
common/Kconfig +21 -0
index 1afee93..0bf5d2c 100644
@@ -25,6 +25,26 @@ config ENV_HANDLING
 	select CRC32
 	bool
 
+config HAS_CACHE
+	bool
+	default n if SANDBOX
+	default y
+	help
+	  This allows you do run "make ARCH=sandbox allyesconfig".
+
+	  Drivers that depend on a cache implementation can depend on this
+	  config, so that you don't get a compilation error.
+
+config HAS_DMA
+	bool
+	default n if SANDBOX
+	default y
+	help
+	  This allows you do run "make ARCH=sandbox allyesconfig".
+
+	  Drivers that depend on a DMA implementation can depend on this
+	  config, so that you don't get a compilation error.
+
 config GENERIC_GPIO
 	bool
 
@@ -637,6 +657,7 @@ config BAREBOXENV_TARGET
 
 config BAREBOXCRC32_TARGET
 	bool
+	depends on ARCH != sandbox
 	prompt "build bareboxcrc32 tool for target"
 	help
 	  'bareboxcrc32' is a userspacetool to generate the crc32 checksums the same way
drivers/ata/Kconfig +1 -0
index 9830cc0..7850e4a 100644
@@ -34,6 +34,7 @@ config DISK_ATA
 
 config DISK_AHCI
 	bool "AHCI support"
+	depends on HAS_DMA
 	select DISK_ATA
 
 config DISK_AHCI_IMX
drivers/input/Kconfig +1 -1
index 3d9016b..07545ed 100644
@@ -32,7 +32,7 @@ config KEYBOARD_IMX_KEYPAD
 
 config KEYBOARD_QT1070
 	tristate "Atmel AT42QT1070 Touch Sensor Chip"
-	depends on I2C
+	depends on I2C && GENERIC_GPIO
 	select POLLER
 	help
 	  Say Y here if you want to use Atmel AT42QT1070 QTouch
drivers/net/Kconfig +4 -0
index 7a0d5e1..80c3414 100644
@@ -34,6 +34,7 @@ config DRIVER_NET_AR231X
 
 config DRIVER_NET_ARC_EMAC
 	bool "ARC Ethernet MAC driver"
+	depends on HAS_DMA
 	select PHYLIB
 	help
 	  This option enables support for the ARC EMAC ethernet
@@ -46,6 +47,7 @@ config DRIVER_NET_AT91_ETHER
 
 config DRIVER_NET_CALXEDA_XGMAC
 	bool "Calxeda xgmac"
+	depends on HAS_DMA
 
 config DRIVER_NET_CS8900
 	bool "cs8900 ethernet driver"
@@ -63,6 +65,7 @@ config DRIVER_NET_DAVINCI_EMAC
 
 config DRIVER_NET_DESIGNWARE
 	bool "Designware Universal MAC ethernet driver"
+	depends on HAS_DMA
 	select PHYLIB
 	help
 	  This option enables support for the Synopsys
@@ -80,6 +83,7 @@ config DRIVER_NET_EP93XX
 
 config DRIVER_NET_ETHOC
 	bool "OpenCores ethernet MAC driver"
+	depends on HAS_CACHE
 	select PHYLIB
 	help
 	  This option enables support for the OpenCores 10/100 Mbps
drivers/regulator/Kconfig +1 -0
index 55f87a4..493b18a 100644
@@ -6,6 +6,7 @@ if REGULATOR
 
 config REGULATOR_FIXED
 	bool "fixed/gpio regulator"
+	depends on GENERIC_GPIO
 	help
 	  This enables a simple fixed regulator. It is used for regulators
 	  which are not software controllable or controllable via gpio.
drivers/usb/host/Kconfig +1 -0
index 5a3ce40..a69e758 100644
@@ -1,5 +1,6 @@
 config USB_EHCI
 	bool "EHCI driver"
+	depends on HAS_DMA
 
 config USB_EHCI_OMAP
 	depends on ARCH_OMAP3
drivers/video/imx-ipu-v3/Kconfig +1 -0
index 3d656e5..368167b 100644
@@ -1,5 +1,6 @@
 config DRIVER_VIDEO_IMX_IPUV3
 	bool "i.MX IPUv3 driver"
+	depends on ARCH_IMX
 	help
 	  Support the IPUv3 found on Freescale i.MX51/53/6 SoCs
 
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#1 lore raw
Quoted 36 lines · Holger Schurig

Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code.

This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out.

---
 common/Kconfig                   |   21 +++++++++++++++++++++
 drivers/ata/Kconfig              |    1 +
 drivers/input/Kconfig            |    2 +-
 drivers/net/Kconfig              |    4 ++++
 drivers/regulator/Kconfig        |    1 +
 drivers/usb/host/Kconfig         |    1 +
 drivers/video/imx-ipu-v3/Kconfig |    1 +
 7 files changed, 30 insertions(+), 1 deletion(-)
common/Kconfig +9 -0
index 1afee93..0bf5d2c 100644
@@ -25,6 +25,26 @@ config ENV_HANDLING
 	select CRC32
 	bool
 
+config HAS_CACHE
+	bool
+	default n if SANDBOX
+	default y
+	help
+	  This allows you do run "make ARCH=sandbox allyesconfig".
+
+	  Drivers that depend on a cache implementation can depend on this
+	  config, so that you don't get a compilation error.

common/Kconfig config ENV_HANDLING · line 46

Quoted 10 lines
common/Kconfig +10 -0
+
+config HAS_DMA
+	bool
+	default n if SANDBOX
+	default y
+	help
+	  This allows you do run "make ARCH=sandbox allyesconfig".
+
+	  Drivers that depend on a DMA implementation can depend on this
+	  config, so that you don't get a compilation error.

Only ARM implements the dma_* functions. Can we skip the 'default x' here and select HAS_DMA from the ARM Kconfig file?

Same with HAS_CACHE. The functions are implemented by ppc, nios2 and openrisc.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox