RFC: arch/powerpc Kconfig cleanup

Subsystems: cell broadband engine architecture, linux for powerpc (32-bit and 64-bit), the rest

8 messages, 6 authors, 2007-03-16 · open the first message on its own page

RFC: arch/powerpc Kconfig cleanup

From: Kumar Gala <hidden>
Date: 2007-03-15 23:37:49

arch/powerpc/Kconfig has become something of a mess and platform support
is scattered between it and various arch/powerpc/platforms/*/Kconfig
files.  I've got some ideas on some simple clean up that will introduce a
arch/powerpc/platforms/Kconfig and pull out platform config information
from arch/powerpc/Kconfig.

Beyond general cleanup, there are several config options that should
exist under the "Platform support" menu but end up getting duplicated
across sub-architectures (QE, CPM2, etc.)

By introducing a platforms/Kconfig we will have a place to put those
config options so we don't have to duplicate them.

One think I noticed is that various platforms/*/Kconfig create top level
menu choices for things like:

Cell Broadband Engine options
PS3 Platform Options
PA Semi PWRficient options
iSeries device drivers
Machine Type (for embedded 6xx)

I didn't know if people were ok with having these move under the 'Platform
support' menu or would prefer they stay as top level menu choices.  Here's
a work up of a patch for Cell that moves things around and puts the 'Cell
Broarband Engine options' under 'Platform support'.

- k
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ecc4302..26b4053 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -475,54 +475,7 @@ config PPC_PASEMI
 	  This option enables support for PA Semi's PWRficient line
 	  of SoC processors, including PA6T-1682M

-config PPC_CELL
-	bool
-	default n
-
-config PPC_CELL_NATIVE
-	bool
-	select PPC_CELL
-	select PPC_DCR_MMIO
-	select PPC_OF_PLATFORM_PCI
-	select PPC_INDIRECT_IO
-	select PPC_NATIVE
-	select MPIC
-	default n
-
-config PPC_IBM_CELL_BLADE
-	bool "IBM Cell Blade"
-	depends on PPC_MULTIPLATFORM && PPC64
-	select PPC_CELL_NATIVE
-	select PPC_RTAS
-	select MMIO_NVRAM
-	select PPC_UDBG_16550
-	select UDBG_RTAS_CONSOLE
-
-config PPC_PS3
-	bool "Sony PS3 (incomplete)"
-	depends on PPC_MULTIPLATFORM && PPC64
-	select PPC_CELL
-	select USB_ARCH_HAS_OHCI
-	select USB_OHCI_LITTLE_ENDIAN
-	select USB_OHCI_BIG_ENDIAN_MMIO
-	select USB_ARCH_HAS_EHCI
-	select USB_EHCI_BIG_ENDIAN_MMIO
-	help
-	  This option enables support for the Sony PS3 game console
-	  and other platforms using the PS3 hypervisor.
-	  Support for this platform is not yet complete, so
-	  enabling this will not result in a bootable kernel on a
-	  PS3 system.
-
-config PPC_CELLEB
-	bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
-	depends on PPC_MULTIPLATFORM && PPC64
-	select PPC_CELL
-	select PPC_OF_PLATFORM_PCI
-	select HAS_TXX9_SERIAL
-	select PPC_UDBG_BEAT
-	select USB_OHCI_BIG_ENDIAN_MMIO
-	select USB_EHCI_BIG_ENDIAN_MMIO
+source arch/powerpc/platforms/cell/Kconfig

 config PPC_NATIVE
 	bool
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 06a85b7..ea43542 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -1,3 +1,52 @@
+config PPC_CELL
+	bool
+	default n
+
+config PPC_CELL_NATIVE
+	bool
+	select PPC_CELL
+	select PPC_DCR_MMIO
+	select PPC_OF_PLATFORM_PCI
+	select PPC_INDIRECT_IO
+	select PPC_NATIVE
+	select MPIC
+	default n
+
+config PPC_IBM_CELL_BLADE
+	bool "IBM Cell Blade"
+	depends on PPC_MULTIPLATFORM && PPC64
+	select PPC_CELL_NATIVE
+	select PPC_RTAS
+	select MMIO_NVRAM
+	select PPC_UDBG_16550
+	select UDBG_RTAS_CONSOLE
+
+config PPC_PS3
+	bool "Sony PS3 (incomplete)"
+	depends on PPC_MULTIPLATFORM && PPC64
+	select PPC_CELL
+	select USB_ARCH_HAS_OHCI
+	select USB_OHCI_LITTLE_ENDIAN
+	select USB_OHCI_BIG_ENDIAN_MMIO
+	select USB_ARCH_HAS_EHCI
+	select USB_EHCI_BIG_ENDIAN_MMIO
+	help
+	  This option enables support for the Sony PS3 game console
+	  and other platforms using the PS3 hypervisor.
+	  Support for this platform is not yet complete, so
+	  enabling this will not result in a bootable kernel on a
+	  PS3 system.
+
+config PPC_CELLEB
+	bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
+	depends on PPC_MULTIPLATFORM && PPC64
+	select PPC_CELL
+	select PPC_OF_PLATFORM_PCI
+	select HAS_TXX9_SERIAL
+	select PPC_UDBG_BEAT
+	select USB_OHCI_BIG_ENDIAN_MMIO
+	select USB_EHCI_BIG_ENDIAN_MMIO
+
 menu "Cell Broadband Engine options"
 	depends on PPC_CELL

Re: RFC: arch/powerpc Kconfig cleanup

From: Grant Likely <hidden>
Date: 2007-03-15 23:45:17

On 3/15/07, Kumar Gala [off-list ref] wrote:
arch/powerpc/Kconfig has become something of a mess and platform support
is scattered between it and various arch/powerpc/platforms/*/Kconfig
files.  I've got some ideas on some simple clean up that will introduce a
arch/powerpc/platforms/Kconfig and pull out platform config information
from arch/powerpc/Kconfig.

Beyond general cleanup, there are several config options that should
exist under the "Platform support" menu but end up getting duplicated
across sub-architectures (QE, CPM2, etc.)

By introducing a platforms/Kconfig we will have a place to put those
config options so we don't have to duplicate them.
I'm all for this, go for it!

g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

Re: RFC: arch/powerpc Kconfig cleanup

From: Olof Johansson <hidden>
Date: 2007-03-16 00:05:33

On Thu, Mar 15, 2007 at 06:34:25PM -0500, Kumar Gala wrote:
I didn't know if people were ok with having these move under the 'Platform
support' menu or would prefer they stay as top level menu choices.  Here's
a work up of a patch for Cell that moves things around and puts the 'Cell
Broarband Engine options' under 'Platform support'.
Looks good to me. I rarely notice menu organization myself since I tend
to edit .config by hand and run menuconfig. Go for it.


-Olof

Re: RFC: arch/powerpc Kconfig cleanup

From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-03-16 00:34:45

On Friday 16 March 2007, Kumar Gala wrote:
+
+config PPC_PS3
+=A0=A0=A0=A0=A0=A0=A0bool "Sony PS3 (incomplete)"
+=A0=A0=A0=A0=A0=A0=A0depends on PPC_MULTIPLATFORM && PPC64
+=A0=A0=A0=A0=A0=A0=A0select PPC_CELL
+=A0=A0=A0=A0=A0=A0=A0select USB_ARCH_HAS_OHCI
+=A0=A0=A0=A0=A0=A0=A0select USB_OHCI_LITTLE_ENDIAN
+=A0=A0=A0=A0=A0=A0=A0select USB_OHCI_BIG_ENDIAN_MMIO
+=A0=A0=A0=A0=A0=A0=A0select USB_ARCH_HAS_EHCI
+=A0=A0=A0=A0=A0=A0=A0select USB_EHCI_BIG_ENDIAN_MMIO
+=A0=A0=A0=A0=A0=A0=A0help
+=A0=A0=A0=A0=A0=A0=A0 =A0This option enables support for the Sony PS3 ga=
me console
+=A0=A0=A0=A0=A0=A0=A0 =A0and other platforms using the PS3 hypervisor.
+=A0=A0=A0=A0=A0=A0=A0 =A0Support for this platform is not yet complete, =
so
+=A0=A0=A0=A0=A0=A0=A0 =A0enabling this will not result in a bootable ker=
nel on a
+=A0=A0=A0=A0=A0=A0=A0 =A0PS3 system.
+
+config PPC_CELLEB
+=A0=A0=A0=A0=A0=A0=A0bool "Toshiba's Cell Reference Set 'Celleb' Archite=
cture"
+=A0=A0=A0=A0=A0=A0=A0depends on PPC_MULTIPLATFORM && PPC64
+=A0=A0=A0=A0=A0=A0=A0select PPC_CELL
+=A0=A0=A0=A0=A0=A0=A0select PPC_OF_PLATFORM_PCI
+=A0=A0=A0=A0=A0=A0=A0select HAS_TXX9_SERIAL
+=A0=A0=A0=A0=A0=A0=A0select PPC_UDBG_BEAT
+=A0=A0=A0=A0=A0=A0=A0select USB_OHCI_BIG_ENDIAN_MMIO
+=A0=A0=A0=A0=A0=A0=A0select USB_EHCI_BIG_ENDIAN_MMIO
I'm not sure if these should really be part of cell/Kconfig, as they are
about platform code that is in other directories. I think it would make
more sense conceptually to have them in ps3/Kconfig and celleb/Kconfig.

At some point we should also separate the common code (mostly spufs)
from the cell native support that does not apply to ps3 and celleb.

	Arnd <><

Re: RFC: arch/powerpc Kconfig cleanup

From: Geoff Levand <hidden>
Date: 2007-03-16 00:43:14

Kumar Gala wrote:
One think I noticed is that various platforms/*/Kconfig create top level
menu choices for things like:

PS3 Platform Options
The PS3 Kconfigs need a complete cleanup, but I haven't had a chance to do
it yet.

-Geoff

Re: RFC: arch/powerpc Kconfig cleanup

From: Kumar Gala <hidden>
Date: 2007-03-16 01:17:06

On Mar 15, 2007, at 7:34 PM, Arnd Bergmann wrote:
On Friday 16 March 2007, Kumar Gala wrote:
quoted
+
+config PPC_PS3
+       bool "Sony PS3 (incomplete)"
+       depends on PPC_MULTIPLATFORM && PPC64
+       select PPC_CELL
+       select USB_ARCH_HAS_OHCI
+       select USB_OHCI_LITTLE_ENDIAN
+       select USB_OHCI_BIG_ENDIAN_MMIO
+       select USB_ARCH_HAS_EHCI
+       select USB_EHCI_BIG_ENDIAN_MMIO
+       help
+         This option enables support for the Sony PS3 game console
+         and other platforms using the PS3 hypervisor.
+         Support for this platform is not yet complete, so
+         enabling this will not result in a bootable kernel on a
+         PS3 system.
+
+config PPC_CELLEB
+       bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
+       depends on PPC_MULTIPLATFORM && PPC64
+       select PPC_CELL
+       select PPC_OF_PLATFORM_PCI
+       select HAS_TXX9_SERIAL
+       select PPC_UDBG_BEAT
+       select USB_OHCI_BIG_ENDIAN_MMIO
+       select USB_EHCI_BIG_ENDIAN_MMIO
I'm not sure if these should really be part of cell/Kconfig, as  
they are
about platform code that is in other directories. I think it would  
make
more sense conceptually to have them in ps3/Kconfig and celleb/ 
Kconfig.

At some point we should also separate the common code (mostly spufs)
from the cell native support that does not apply to ps3 and celleb.
Fair point, I'll fix that up.  I'm more interested if people are ok  
with having the 'Cell Broadband Engine options' under 'Platform  
support' is ok or if it should stay at the top level.

- k

RE: arch/powerpc Kconfig cleanup

From: Li Yang-r58472 <hidden>
Date: 2007-03-16 06:58:31

arch/powerpc/Kconfig has become something of a mess and platform
support
is scattered between it and various arch/powerpc/platforms/*/Kconfig
files.  I've got some ideas on some simple clean up that will
introduce a
arch/powerpc/platforms/Kconfig and pull out platform config
information
from arch/powerpc/Kconfig.
=20
Beyond general cleanup, there are several config options that should
exist under the "Platform support" menu but end up getting duplicated
across sub-architectures (QE, CPM2, etc.)
=20
By introducing a platforms/Kconfig we will have a place to put those
config options so we don't have to duplicate them.
Sounds good to me.

- Leo

Re: RFC: arch/powerpc Kconfig cleanup

From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-03-16 10:55:31

On Friday 16 March 2007, Kumar Gala wrote:
quoted
At some point we should also separate the common code (mostly spufs)
from the cell native support that does not apply to ps3 and celleb.
=20
Fair point, I'll fix that up. =A0I'm more interested if people are ok =A0
with having the 'Cell Broadband Engine options' under 'Platform =A0
support' is ok or if it should stay at the top level.
I was never happy with having it at the top level, but I couldn't
figure out a better way at the time, and I think I just copied what
some other platforms did.

I think it would be good to turn them into menuconfig entries, so
that if platforms/Kconfig basically contains

source arch/powerpc/platforms/pseries/Kconfig
source arch/powerpc/platforms/powermac/Kconfig
source arch/powerpc/platforms/cell/Kconfig
source arch/powerpc/platforms/celleb/Kconfig
source arch/powerpc/platforms/ps3/Kconfig
=2E..

each of them can either be

config CELLEB
	bool "support for celleb"
	select FOO
	select BAR

or

menuconfig PSERIES
	bool "support for pseries"
	select BAR
	select BAZ
config PSERIES_FOO
	bool "option foo for pseries"
	depends on PSERIES
endmenu

	Arnd <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help