* PROPOSED patch, standardize drivers menuconfig entries
@ 2009-12-22 16:16 Robert P. J. Day
2009-12-22 16:54 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2009-12-22 16:16 UTC (permalink / raw)
To: U-Boot Version 2 (barebox)
here's a newer pass at cleaning up the drivers menuconfig structure,
not being officially submitted, i'm going to make another pass and see
if i missed anything, but i'm open to suggestions. some observations:
- *all* drivers are now selectable at the top level
- because of that, there's no need to re-test that same
macro in the subdir, which is why some of those lower
Makefiles now have obj-y.
if this looks good, then i'll submit it for real.
diff --git a/drivers/Makefile b/drivers/Makefile
index 5dc7756..285dcc8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -1,8 +1,8 @@
-obj-y += net/
-obj-y += serial/
-obj-y += nand/
-obj-y += nor/
-obj-y += usb/
-obj-$(CONFIG_SPI) += spi/
-obj-$(CONFIG_I2C) += i2c/
-obj-$(CONFIG_VIDEO) += video/
+obj-$(CONFIG_NET_DRIVERS) += net/
+obj-$(CONFIG_SERIAL_DRIVERS) += serial/
+obj-$(CONFIG_NAND_DRIVERS) += nand/
+obj-$(CONFIG_NOR_DRIVERS) += nor/
+obj-$(CONFIG_USB_DRIVERS) += usb/
+obj-$(CONFIG_SPI_DRIVERS) += spi/
+obj-$(CONFIG_I2C_DRIVERS) += i2c/
+obj-$(CONFIG_VIDEO_DRIVERS) += video/
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 46723ed..87c3445 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -1,7 +1,7 @@
-menuconfig I2C
+menuconfig I2C_DRIVERS
bool "I2C drivers "
-if I2C
+if I2C_DRIVERS
config DRIVER_I2C_IMX
bool "i.MX I2C Master driver"
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 5dd642f..ec1f671 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -1,6 +1,4 @@
-obj-$(CONFIG_I2C) += i2c.o
-
-obj-$(CONFIG_DRIVER_I2C_IMX) += i2c-imx.o
-
-obj-$(CONFIG_DRIVER_I2C_MC13892) += mc13892.o
-obj-$(CONFIG_DRIVER_I2C_MC9SDZ60) += mc9sdz60.o
+obj-y += i2c.o
+obj-$(CONFIG_DRIVER_I2C_IMX) += i2c-imx.o
+obj-$(CONFIG_DRIVER_I2C_MC13892) += mc13892.o
+obj-$(CONFIG_DRIVER_I2C_MC9SDZ60) += mc9sdz60.o
diff --git a/drivers/nand/Kconfig b/drivers/nand/Kconfig
index 031b94d..2059558 100644
--- a/drivers/nand/Kconfig
+++ b/drivers/nand/Kconfig
@@ -1,4 +1,4 @@
-menuconfig NAND
+menuconfig NAND_DRIVERS
bool "NAND support "
select MTD_NAND_IDS
help
@@ -6,7 +6,7 @@ menuconfig NAND
devices. For further information see
<http://www.linux-mtd.infradead.org/doc/nand.html>.
-if NAND
+if NAND_DRIVERS
config NAND_IMX
bool
diff --git a/drivers/nand/Makefile b/drivers/nand/Makefile
index 73f7346..fe32025 100644
--- a/drivers/nand/Makefile
+++ b/drivers/nand/Makefile
@@ -1,12 +1,10 @@
-
# Generic NAND options
-obj-$(CONFIG_NAND) += nand.o nand_ecc.o
+obj-y += nand.o nand_ecc.o
+obj-y += nand_base.o nand_bbt.o
obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o
-obj-$(CONFIG_NAND) += nand_base.o nand_bbt.o
-
obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o
obj-$(CONFIG_NAND_IMX) += nand_imx.o
obj-$(CONFIG_NAND_OMAP_GPMC) += nand_omap_gpmc.o
obj-$(CONFIG_NAND_ATMEL) += atmel_nand.o
obj-$(CONFIG_NAND_S3C24X0) += nand_s3c2410.o
-#obj-$(CONFIG_NAND) += nand_util.o
+#obj-y += nand_util.o
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index ed7656e..eb9b34d 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -13,9 +13,12 @@ config HAS_NETX_ETHER
config MIIPHY
bool
-menu "Network drivers "
+menuconfig NET_DRIVERS
+ bool "Network drivers "
depends on NET
+if NET_DRIVERS
+
config DRIVER_NET_CS8900
bool "cs8900 ethernet driver"
depends on HAS_CS8900
@@ -75,5 +78,5 @@ config DRIVER_NET_TAP
source "drivers/net/usb/Kconfig"
-endmenu
+endif
diff --git a/drivers/nor/Kconfig b/drivers/nor/Kconfig
index 7d9497e..1e487c9 100644
--- a/drivers/nor/Kconfig
+++ b/drivers/nor/Kconfig
@@ -1,8 +1,11 @@
-menu "flash drivers "
-
config HAS_CFI
bool
+menuconfig FLASH_DRIVERS
+ bool "flash drivers "
+
+if FLASH_DRIVERS
+
config DRIVER_CFI
bool "cfi flash driver"
help
@@ -71,4 +74,4 @@ config CFI_BUFFER_WRITE
bool "use cfi driver with buffer write"
depends on DRIVER_CFI || DRIVER_CFI_NEW
-endmenu
+endif
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index b0ff5fa..0f9aa7f 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1,4 +1,7 @@
-menu "serial drivers "
+menuconfig SERIAL_DRIVERS
+ bool "Serial drivers "
+
+if SERIAL_DRIVERS
config DRIVER_SERIAL_ARM_DCC
depends on ARM
@@ -61,4 +64,4 @@ config DRIVER_SERIAL_S3C24X0_AUTOSYNC
Say Y here if you want to use the auto flow feature of this
UART. RTS and CTS will be handled by the hardware when enabled.
-endmenu
+endif
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 3eebd08..93e9000 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -1,16 +1,14 @@
-menu "SPI drivers "
-
-config SPI
- bool "Enable SPI driver support"
+menuconfig SPI_DRIVERS
+ bool "SPI drivers "
default y
+if SPI_DRIVERS
+
config DRIVER_SPI_IMX
bool "i.MX SPI Master driver"
depends on ARCH_IMX
- depends on SPI
config DRIVER_SPI_MC13783
bool "MC13783 a.k.a. PMIC driver"
- depends on SPI
-endmenu
+endif
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 81f2c6b..c582b62 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -1,4 +1,3 @@
-obj-$(CONFIG_SPI) += spi.o
-obj-$(CONFIG_DRIVER_SPI_IMX) += imx_spi.o
-
-obj-$(CONFIG_DRIVER_SPI_MC13783) += mc13783.o
+obj-y += spi.o
+obj-$(CONFIG_DRIVER_SPI_IMX) += imx_spi.o
+obj-$(CONFIG_DRIVER_SPI_MC13783) += mc13783.o
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 839efeb..f025170 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -1,7 +1,7 @@
-menuconfig USB
+menuconfig USB_DRIVERS
bool "USB support "
-if USB
+if USB_DRIVERS
config USB_EHCI
bool "EHCI driver"
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index 57d0bed..541f09d 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_USB) += usb.o
+obj-y += usb.o
obj-$(CONFIG_USB_EHCI) += usb_ehci_core.o
obj-$(CONFIG_USB_ULPI) += ulpi.o
obj-$(CONFIG_USB_ISP1504) += isp1504.o
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 804bb91..dde96c9 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -1,5 +1,4 @@
-
-obj-$(CONFIG_USB_GADGET) += composite.o config.o usbstring.o epautoconf.o
-obj-$(CONFIG_USB_GADGET_SERIAL) += u_serial.o serial.o f_serial.o f_acm.o
-obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
+obj-y += composite.o config.o usbstring.o epautoconf.o
+obj-$(CONFIG_USB_GADGET_SERIAL) += u_serial.o serial.o f_serial.o f_acm.o
+obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
obj-$(CONFIG_USB_GADGET_DRIVER_ARC) += fsl_udc.o
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index dbdc7e2..345e449 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1,9 +1,9 @@
-menuconfig VIDEO
+menuconfig VIDEO_DRIVERS
bool "Video drivers "
help
Add support for framebuffer and splash screens
-if VIDEO
+if VIDEO_DRIVERS
config DRIVER_VIDEO_IMX
bool "i.MX framebuffer driver"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 1e0d1b9..b6e17c5 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -1,3 +1,3 @@
-obj-$(CONFIG_VIDEO) += fb.o
-obj-$(CONFIG_DRIVER_VIDEO_IMX) += imx.o
-obj-$(CONFIG_DRIVER_VIDEO_IMX_IPU) += imx-ipu-fb.o
+obj-y += fb.o
+obj-$(CONFIG_DRIVER_VIDEO_IMX) += imx.o
+obj-$(CONFIG_DRIVER_VIDEO_IMX_IPU) += imx-ipu-fb.o
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PROPOSED patch, standardize drivers menuconfig entries
2009-12-22 16:16 PROPOSED patch, standardize drivers menuconfig entries Robert P. J. Day
@ 2009-12-22 16:54 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2009-12-22 16:54 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert P. J. Day wrote:
> here's a newer pass at cleaning up the drivers menuconfig structure,
> not being officially submitted, i'm going to make another pass and see
> if i missed anything, but i'm open to suggestions. some observations:
>
> - *all* drivers are now selectable at the top level
> - because of that, there's no need to re-test that same
> macro in the subdir, which is why some of those lower
> Makefiles now have obj-y.
>
> if this looks good, then i'll submit it for real.
There are some selects that should be fixed, my mx35 shows this error:
arch/arm/mach-imx/Kconfig:173:warning: 'select' used by config symbol 'MACH_PCM038' refers to undefined symbol 'SPI'
arch/arm/mach-imx/Kconfig:217:warning: 'select' used by config symbol 'MACH_FREESCALE_MX35_3STACK' refers to undefined symbol 'I2C'
There's a "#ifdef CONFIG_I2C" in i2c.h, maybe there are more ifdefs.
IMHO there should be reasonable defaults for the new menus...
cheers, Marc
- --
Pengutronix e.K. | Marc Kleine-Budde |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAksw+doACgkQjTAFq1RaXHO1yQCgj0wACcd6+pVdQf41vOHq74Dn
7KMAnjSDh6YzNKd4PG47IpnR4ghcH4pz
=A+rt
-----END PGP SIGNATURE-----
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-22 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-22 16:16 PROPOSED patch, standardize drivers menuconfig entries Robert P. J. Day
2009-12-22 16:54 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox