[U-Boot] [RFC] CONFIG naming convetion
Robin Getz
rgetz at blackfin.uclinux.org
Sat Jul 18 17:15:26 CEST 2009
On Sat 18 Jul 2009 07:03, Jean-Christophe PLAGNIOL-VILLARD pondered:
> Hi all,
>
> Currently we have a mess in the drivers CONFIG naming convention
> as example on I2C we have
> CONFIG_I2C_XXXXX
> CONFIG_DRIVER_XXX_I2C
> CONFIG_XXXX_I2C
> CONFIG_SYS_I2C_XXXX
>
> I think it will good to have common and clean naming convention
> so I'll propose we use this one
> CONFIG_namespace_XXXXX
> and
> CONFIG_SYS_namespace_XXXXX
>
> so it will resutly for I2C to this
>
> CONFIG_I2C_XXXXX
> CONFIG_SYS_I2C_XXXX
>
> and the Makefile and KConfig it will be easier to sort and read
I think this goes way beyond I2C....
There are ~4866 unique options in ./include/configs/*
Most of which have no name spaces at all, some are not even
used in any source files (that are in mainline anyway).
We have 2815, which already start with CONFIG_SYS_xxx, like
CONFIG_SYS_16M_MBMR Which is used in a single board:
board/snmc/qs860t/qs860t.c: memctl->memc_mbmr = CONFIG_SYS_16M_MBMR;
board/snmc/qs860t/qs860t.c: size = dram_size (CONFIG_SYS_16M_MBMR, (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
include/configs/QS860T.h:#define CONFIG_SYS_16M_MBMR 0x18802114 /* Mem Periodic Timer Prescaler */
It doesn't appear very "system" oriented to me...
It would be nice to come up with some list of namespaces, and what they
they should be used for...
For example, should it be:
CONFIG_DRIVER_OMAP24XX_I2C
or
CONFIG_SYS_I2C_DRIVER_OMAP24XX
or
CONFIG_DRIVER_I2C_OMAP24XX
Again - which is only used in one place:
drivers/i2c/Makefile:COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
include/configs/omap2420h4.h:#define CONFIG_DRIVER_OMAP24XX_I2C
Which is fine - since it is a driver, which I'm sure that people out of tree use.
we assumed that it was:
CONFIG_DRIVER_NAND_BFIN
but it depends on who added it...
CONFIG_PATA_BFIN
drivers/block/Makefile:COBJS-$(CONFIG_PATA_BFIN) += pata_bfin.o
include/configs/bf548-ezkit.h:#define CONFIG_PATA_BFIN
I would think should be CONFIG_DRIVERS_PATA_BFIN
?
More information about the U-Boot
mailing list