LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* fake config option w/kbuild?
@ 2007-03-15 15:19 Kumar Gala
2007-03-15 19:12 ` Adrian Bunk
2007-03-18 16:24 ` Roman Zippel
0 siblings, 2 replies; 5+ messages in thread
From: Kumar Gala @ 2007-03-15 15:19 UTC (permalink / raw)
To: Sam Ravnborg, Roman Zippel; +Cc: Linux Kernel list
Guys, I was wondering if there was a way to have a fake config
option, one that acts just like a normal config option, but doesn't
get a #define CONFIG_<FOOBAR> .. for it and thus can't be used in code.
I explain my problem, and maybe there is a better solution.
I have a config option call QE that exists on two flavor's of
powerpc. For PPC, we have one top level menu to select the processor
(in this case 83xx or 85xx). We than have a second top level menu to
select the platform (which board). The platform menu is where I want
the 'QE' option to exist. Each flavor (83xx, 85xx) has its own
Kconfig that defines what's in the platform menu. However, the QE
config choice is common between them.
So for now we are doing something like:
arch/powerpc/Kconfig:
config QE
bool
default n
arch/powerpc/platform/83xx/Kconfig:
config QE_83xx
bool "QUICC Engine Support"
select QE
depends on PPC_MPC836x || PPC_MPC832x
default y
---help---
The QUICC Engine (QE) is a new generation of communications
coprocessors on Freescale embedded CPUs (akin to CPM in
older chips).
arch/powerpc/platform/85xx/Kconfig:
config QE_85xx
bool "QUICC Engine Support"
select QE
depends on PPC_MPC8568
default y
---help---
The QUICC Engine (QE) is a new generation of communications
coprocessors on Freescale embedded CPUs (akin to CPM in
older chips).
My initial question is that I don't want anyone using CONFIG_QE_83xx
or CONFIG_QE_85xx in code, the second part is if there is a way to
remove duplicating the QE_83xx/QE_85xx options down in platform/8{3,5}
xx/Kconfig.
thanks
- kumar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fake config option w/kbuild?
2007-03-15 15:19 fake config option w/kbuild? Kumar Gala
@ 2007-03-15 19:12 ` Adrian Bunk
2007-03-15 20:08 ` Kumar Gala
2007-03-18 16:24 ` Roman Zippel
1 sibling, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2007-03-15 19:12 UTC (permalink / raw)
To: Kumar Gala; +Cc: Sam Ravnborg, Roman Zippel, Linux Kernel list
On Thu, Mar 15, 2007 at 10:19:03AM -0500, Kumar Gala wrote:
>...
> My initial question is that I don't want anyone using CONFIG_QE_83xx
> or CONFIG_QE_85xx in code, the second part is if there is a way to
> remove duplicating the QE_83xx/QE_85xx options down in platform/8{3,5}
> xx/Kconfig.
What about the following solution:
arch/powerpc/Kconfig.qe:
<-- snip -->
config MACH_SUPPORTS_QE
bool
config QE
bool "QUICC Engine Support"
depends on MACH_SUPPORTS_QE
help
...
<-- snip -->
arch/powerpc/platforms/83xx/Kconfig:
<-- snip -->
...
source arch/powerpc/Kconfig.qe
config PPC_MPC836x
bool
select MACH_SUPPORTS_QE
...
....
<-- snip -->
> thanks
>
> - kumar
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fake config option w/kbuild?
2007-03-15 19:12 ` Adrian Bunk
@ 2007-03-15 20:08 ` Kumar Gala
2007-03-17 23:33 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2007-03-15 20:08 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Sam Ravnborg, Roman Zippel, Linux Kernel list
On Mar 15, 2007, at 2:12 PM, Adrian Bunk wrote:
> On Thu, Mar 15, 2007 at 10:19:03AM -0500, Kumar Gala wrote:
>> ...
>> My initial question is that I don't want anyone using CONFIG_QE_83xx
>> or CONFIG_QE_85xx in code, the second part is if there is a way to
>> remove duplicating the QE_83xx/QE_85xx options down in platform/8
>> {3,5}
>> xx/Kconfig.
>
>
> What about the following solution:
>
>
> arch/powerpc/Kconfig.qe:
>
> <-- snip -->
>
> config MACH_SUPPORTS_QE
> bool
>
> config QE
> bool "QUICC Engine Support"
> depends on MACH_SUPPORTS_QE
> help
> ...
>
> <-- snip -->
>
>
> arch/powerpc/platforms/83xx/Kconfig:
>
> <-- snip -->
>
> ...
> source arch/powerpc/Kconfig.qe
>
> config PPC_MPC836x
> bool
> select MACH_SUPPORTS_QE
> ...
> ....
>
> <-- snip -->
Not sure this helps since I end up having to source arch/powerpc/
Kconfig.qe from both arch/powerpc/platforms/83xx/Kconfig & arch/
powerpc/platforms/85xx/Kconfig and then mconf grips about having
already scanned Kconfig.qe.
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fake config option w/kbuild?
2007-03-15 20:08 ` Kumar Gala
@ 2007-03-17 23:33 ` Adrian Bunk
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2007-03-17 23:33 UTC (permalink / raw)
To: Kumar Gala; +Cc: Sam Ravnborg, Roman Zippel, Linux Kernel list
On Thu, Mar 15, 2007 at 03:08:47PM -0500, Kumar Gala wrote:
>
> On Mar 15, 2007, at 2:12 PM, Adrian Bunk wrote:
>
> >On Thu, Mar 15, 2007 at 10:19:03AM -0500, Kumar Gala wrote:
> >>...
> >>My initial question is that I don't want anyone using CONFIG_QE_83xx
> >>or CONFIG_QE_85xx in code, the second part is if there is a way to
> >>remove duplicating the QE_83xx/QE_85xx options down in platform/8
> >>{3,5}
> >>xx/Kconfig.
> >
> >
> >What about the following solution:
> >
> >
> >arch/powerpc/Kconfig.qe:
> >
> ><-- snip -->
> >
> >config MACH_SUPPORTS_QE
> > bool
> >
> >config QE
> > bool "QUICC Engine Support"
> > depends on MACH_SUPPORTS_QE
> > help
> > ...
> >
> ><-- snip -->
> >
> >
> >arch/powerpc/platforms/83xx/Kconfig:
> >
> ><-- snip -->
> >
> >...
> >source arch/powerpc/Kconfig.qe
> >
> >config PPC_MPC836x
> > bool
> > select MACH_SUPPORTS_QE
> > ...
> >....
> >
> ><-- snip -->
>
> Not sure this helps since I end up having to source arch/powerpc/
> Kconfig.qe from both arch/powerpc/platforms/83xx/Kconfig & arch/
> powerpc/platforms/85xx/Kconfig and then mconf grips about having
> already scanned Kconfig.qe.
Sorry, my fault that I didn't test it myself before suggesting it.
It seems there is no solution for both not duplicating the options and
getting them in the desired menu.
> - k
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fake config option w/kbuild?
2007-03-15 15:19 fake config option w/kbuild? Kumar Gala
2007-03-15 19:12 ` Adrian Bunk
@ 2007-03-18 16:24 ` Roman Zippel
1 sibling, 0 replies; 5+ messages in thread
From: Roman Zippel @ 2007-03-18 16:24 UTC (permalink / raw)
To: Kumar Gala; +Cc: Sam Ravnborg, Linux Kernel list
Hi,
On Thursday 15 March 2007 16:19, Kumar Gala wrote:
> Guys, I was wondering if there was a way to have a fake config
> option, one that acts just like a normal config option, but doesn't
> get a #define CONFIG_<FOOBAR> .. for it and thus can't be used in code.
>
> I explain my problem, and maybe there is a better solution.
>
> I have a config option call QE that exists on two flavor's of
> powerpc. For PPC, we have one top level menu to select the processor
> (in this case 83xx or 85xx). We than have a second top level menu to
> select the platform (which board). The platform menu is where I want
> the 'QE' option to exist. Each flavor (83xx, 85xx) has its own
> Kconfig that defines what's in the platform menu. However, the QE
> config choice is common between them.
>
> So for now we are doing something like:
>
> arch/powerpc/Kconfig:
>
> config QE
> bool
> default n
>
> arch/powerpc/platform/83xx/Kconfig:
>
> config QE_83xx
> bool "QUICC Engine Support"
> select QE
> depends on PPC_MPC836x || PPC_MPC832x
> default y
> ---help---
> The QUICC Engine (QE) is a new generation of communications
> coprocessors on Freescale embedded CPUs (akin to CPM in
> older chips).
>
> arch/powerpc/platform/85xx/Kconfig:
>
> config QE_85xx
> bool "QUICC Engine Support"
> select QE
> depends on PPC_MPC8568
> default y
> ---help---
> The QUICC Engine (QE) is a new generation of communications
> coprocessors on Freescale embedded CPUs (akin to CPM in
> older chips).
>
> My initial question is that I don't want anyone using CONFIG_QE_83xx
> or CONFIG_QE_85xx in code, the second part is if there is a way to
> remove duplicating the QE_83xx/QE_85xx options down in platform/8{3,5}
> xx/Kconfig.
The duplication is maybe difficult to avoid without moving it, but a symbol
can have multiple prompts so you can just replace QE_8[35]xx with QE
(although a little more verbose name wouldn't hurt either).
bye, Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-18 16:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 15:19 fake config option w/kbuild? Kumar Gala
2007-03-15 19:12 ` Adrian Bunk
2007-03-15 20:08 ` Kumar Gala
2007-03-17 23:33 ` Adrian Bunk
2007-03-18 16:24 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).