All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH 13/14] Re-organize Kconfig code for 4xx in arch/powerpc
Date: Tue, 20 Feb 2007 13:12:36 +1100 (EST)	[thread overview]
Message-ID: <20070220021236.3609EDDD0A@ozlabs.org> (raw)
In-Reply-To: <20070220020837.GF17818@localhost.localdomain>

Now that we always take a device tree in arch/powerpc, there's no good
reason not to allow a single kernel to support multiple embedded 4xx
boards - the correct platform code can be selected based on the device
tree information.

Therefore, this patch re-arranges the 4xx Kconfig code to allow this.
In addition we:
	- use "select" instead of depends to configure the correct
	  config options for specific 4xx CPUs and workarounds, which
	  makes the information about specific boards and CPUs less
	  scattered.
	- Some old, unused (in arch/powerpc) config options are
	  removed: WANT_EARLY_SERIAL, IBM_OCP, etc.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
---

 arch/powerpc/platforms/4xx/Kconfig |  377 +++++++++++++++----------------------
 1 file changed, 153 insertions(+), 224 deletions(-)

Index: working-2.6/arch/powerpc/platforms/4xx/Kconfig
===================================================================
--- working-2.6.orig/arch/powerpc/platforms/4xx/Kconfig	2007-02-19 13:28:06.000000000 +1100
+++ working-2.6/arch/powerpc/platforms/4xx/Kconfig	2007-02-19 13:38:05.000000000 +1100
@@ -3,278 +3,207 @@ config 4xx
 	depends on 40x || 44x
 	default y
 
-config WANT_EARLY_SERIAL
+config BOOKE
 	bool
-	select SERIAL_8250
-	default n
-
-menu "AMCC 4xx options"
-	depends on 4xx
-
-choice
-	prompt "Machine Type"
-	depends on 40x
-	default WALNUT
-
-config BUBINGA
-	bool "Bubinga"
-	select WANT_EARLY_SERIAL
-	help
-	  This option enables support for the IBM 405EP evaluation board.
-
-config CPCI405
-	bool "CPCI405"
-	help
-	  This option enables support for the CPCI405 board.
-
-config EP405
-	bool "EP405/EP405PC"
-	help
-	  This option enables support for the EP405/EP405PC boards.
-
-config REDWOOD_5
-	bool "Redwood-5"
-	help
-	  This option enables support for the IBM STB04 evaluation board.
-
-config REDWOOD_6
-	bool "Redwood-6"
-	help
-	  This option enables support for the IBM STBx25xx evaluation board.
-
-config SYCAMORE
-	bool "Sycamore"
-	help
-	  This option enables support for the IBM PPC405GPr evaluation board.
-
-config WALNUT
-	bool "Walnut"
-	help
-	  This option enables support for the IBM PPC405GP evaluation board.
-
-config XILINX_ML300
-	bool "Xilinx-ML300"
-	help
-	  This option enables support for the Xilinx ML300 evaluation board.
-
-endchoice
-
-choice
-	prompt "Machine Type"
 	depends on 44x
-	default EBONY
-
-config BAMBOO
-	bool "Bamboo"
-	select WANT_EARLY_SERIAL
-	help
-	  This option enables support for the IBM PPC440EP evaluation board.
-
-config EBONY
-	bool "Ebony"
-	select WANT_EARLY_SERIAL
-	help
-	  This option enables support for the IBM PPC440GP evaluation board.
-
-config LUAN
-	bool "Luan"
-	select WANT_EARLY_SERIAL
-	help
-	  This option enables support for the IBM PPC440SP evaluation board.
-
-config OCOTEA
-	bool "Ocotea"
-	select WANT_EARLY_SERIAL
-	help
-	  This option enables support for the IBM PPC440GX evaluation board.
+	default y
 
-endchoice
+menu "AMCC 40x options"
+	depends on 40x
 
-config EP405PC
-	bool "EP405PC Support"
-	depends on EP405
+#config BUBINGA
+#	bool "Bubinga"
+#	depends on 40x
+#	default n
+#	select 405EP
+#	help
+#	  This option enables support for the IBM 405EP evaluation board.
+
+#config CPCI405
+#	bool "CPCI405"
+#	depends on 40x
+#	default n
+#	select 405GP
+#	help
+#	  This option enables support for the CPCI405 board.
+
+#config EP405
+#	bool "EP405/EP405PC"
+#	depends on 40x
+#	default n
+#	select 405GP
+#	help
+#	  This option enables support for the EP405/EP405PC boards.
+
+#config EP405PC
+#	bool "EP405PC Support"
+#	depends on EP405
+#	default y
+#	help
+#	  This option enables support for the extra features of the EP405PC board.
+
+#config REDWOOD_5
+#	bool "Redwood-5"
+#	depends on 40x
+#	default n
+#	select STB03xxx
+#	help
+#	  This option enables support for the IBM STB04 evaluation board.
+
+#config REDWOOD_6
+#	bool "Redwood-6"
+#	depends on 40x
+#	default n
+#	select STB03xxx
+#	help
+#	  This option enables support for the IBM STBx25xx evaluation board.
+
+#config SYCAMORE
+#	bool "Sycamore"
+#	depends on 40x
+#	default n
+#	select 405GPR
+#	help
+#	  This option enables support for the IBM PPC405GPr evaluation board.
+
+#config WALNUT
+#	bool "Walnut"
+#	depends on 40x
+#	default y
+#	select 405GP
+#	help
+#	  This option enables support for the IBM PPC405GP evaluation board.
+
+#config XILINX_ML300
+#	bool "Xilinx-ML300"
+#	depends on 40x
+#	default y
+#	select VIRTEX_II_PRO
+#	help
+#	  This option enables support for the Xilinx ML300 evaluation board.
 
+endmenu
 
-# It's often necessary to know the specific 4xx processor type.
-# Fortunately, it is impled (so far) from the board type, so we
-# don't need to ask more redundant questions.
+# 40x specific CPU modules, selected based on the board above.
 config NP405H
 	bool
-	depends on ASH
+	#depends on ASH
 	default y
 
-config 440EP
+# OAK doesn't exist but wanted to keep this around for any future 403GCX boards
+config 403GCX
 	bool
-	depends on BAMBOO
-	select PPC_FPU
-	default y
+	#depends on OAK
+	select IBM405_ERR51
 
-config 440GP
+config 405GP
 	bool
-	depends on EBONY
-	default y
+	select IBM405_ERR77
+	select IBM405_ERR51
 
-config 440GX
+config 405EP
 	bool
-	depends on OCOTEA
-	default y
 
-config 440SP
+config 405GPR
 	bool
-	depends on LUAN
-	default y
 
-config 440
+config VIRTEX_II_PRO
 	bool
-	depends on 440GP || 440SP || 440EP
-	default y
+	select IBM405_ERR77
+	select IBM405_ERR51
 
-config 440A
+config STB03xxx
 	bool
-	depends on 440GX
-	default y
+	select IBM405_ERR77
+	select IBM405_ERR51
 
-config IBM440EP_ERR42
-	bool
-	depends on 440EP
-	default y
+# 40x errata/workaround config symbols, selected by the CPU models above
 
 # All 405-based cores up until the 405GPR and 405EP have this errata.
 config IBM405_ERR77
 	bool
-	depends on 40x && !403GCX && !405GPR && !405EP
-	default y
 
 # All 40x-based cores, up until the 405GPR and 405EP have this errata.
 config IBM405_ERR51
 	bool
-	depends on 40x && !405GPR && !405EP
-	default y
 
-config BOOKE
-	bool
+menu "AMCC 44x options"
 	depends on 44x
-	default y
-
-config IBM_OCP
-	bool
-	depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
-	default y
 
-config XILINX_OCP
-	bool
-	depends on XILINX_ML300
-	default y
-
-config IBM_EMAC4
-	bool
-	depends on 440GX || 440SP
-	default y
-
-config BIOS_FIXUP
-	bool
-	depends on BUBINGA || EP405 || SYCAMORE || WALNUT
-	default y
-
-# OAK doesn't exist but wanted to keep this around for any future 403GCX boards
-config 403GCX
-	bool
-	depends on OAK
-	default y
-
-config 405EP
-	bool
-	depends on BUBINGA
-	default y
+#config BAMBOO
+#	bool "Bamboo"
+#	depends on 44x
+#	default n
+#	select 440EP
+#	help
+#	  This option enables support for the IBM PPC440EP evaluation board.
 
-config 405GP
-	bool
-	depends on CPCI405 || EP405 || WALNUT
-	default y
-
-config 405GPR
-	bool
-	depends on SYCAMORE
-	default y
-
-config VIRTEX_II_PRO
-	bool
-	depends on XILINX_ML300
-	default y
-
-config STB03xxx
-	bool
-	depends on REDWOOD_5 || REDWOOD_6
-	default y
-
-config EMBEDDEDBOOT
-	bool
-	depends on EP405 || XILINX_ML300
+config EBONY
+	bool "Ebony"
+	depends on 44x
 	default y
+	select 440GP
+	help
+	  This option enables support for the IBM PPC440GP evaluation board.
 
-config IBM_OPENBIOS
-	bool
-	depends on ASH || BUBINGA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
-	default y
+#config LUAN
+#	bool "Luan"
+#	depends on 44x
+#	default n
+#	select 440SP
+#	help
+#	  This option enables support for the IBM PPC440SP evaluation board.
+
+#config OCOTEA
+#	bool "Ocotea"
+#	depends on 44x
+#	default n
+#	select 440GX
+#	help
+#	  This option enables support for the IBM PPC440GX evaluation board.
 
-config PPC4xx_DMA
-	bool "PPC4xx DMA controller support"
-	depends on 4xx
+endmenu
 
-config PPC4xx_EDMA
+# 44x specific CPU modules, selected based on the board above.
+config 440EP
 	bool
-	depends on !STB03xxx && PPC4xx_DMA
-	default y
+	select PPC_FPU
+	select IBM440EP_ERR42
 
-config PPC_GEN550
+config 440GP
 	bool
-	depends on 4xx
-	default y
-
-choice
-	prompt "TTYS0 device and default console"
-	depends on 40x
-	default UART0_TTYS0
-
-config UART0_TTYS0
-	bool "UART0"
-
-config UART0_TTYS1
-	bool "UART1"
+	select IBM_NEW_EMAC_ZMII
 
-endchoice
-
-config SERIAL_SICC
-	bool "SICC Serial port support"
-	depends on STB03xxx
-
-config UART1_DFLT_CONSOLE
+config 440GX
 	bool
-	depends on SERIAL_SICC && UART0_TTYS1
-	default y
 
-config SERIAL_SICC_CONSOLE
+config 440SP
 	bool
-	depends on SERIAL_SICC && UART0_TTYS1
-	default y
-endmenu
-
 
-menu "IBM 40x options"
-	depends on 40x
-
-config SERIAL_SICC
-	bool "SICC Serial port"
-	depends on STB03xxx
-
-config UART1_DFLT_CONSOLE
+config 440A
 	bool
-	depends on SERIAL_SICC && UART0_TTYS1
+	depends on 440GX
 	default y
 
-config SERIAL_SICC_CONSOLE
+# 44x errata/workaround config symbols, selected by the CPU models above
+config IBM440EP_ERR42
 	bool
-	depends on SERIAL_SICC && UART0_TTYS1
-	default y
 
-endmenu
+#config XILINX_OCP
+#	bool
+#	depends on XILINX_ML300
+#	default y
+
+#config BIOS_FIXUP
+#	bool
+#	depends on BUBINGA || EP405 || SYCAMORE || WALNUT
+#	default y
+
+#config PPC4xx_DMA
+#	bool "PPC4xx DMA controller support"
+#	depends on 4xx
+
+#config PPC4xx_EDMA
+#	bool
+#	depends on !STB03xxx && PPC4xx_DMA
+#	default y

  parent reply	other threads:[~2007-02-20  2:12 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20  2:08 [0/14] Ebony support, 2nd spin David Gibson
2007-02-20  2:12 ` [PATCH 3/14] Define FIXED_PORT flag for serial_core David Gibson
2007-02-20  2:12 ` [PATCH 2/14] Automatically lmb_reserve() initrd David Gibson
2007-02-20  2:12 ` [PATCH 4/14] Use resource_size_t for serial port IO addresses David Gibson
2007-02-20 14:44   ` Sergei Shtylyov
2007-02-21  0:19     ` David Gibson
2007-02-20  2:12 ` [PATCH 1/14] powerpc: Allow duplicate lmb_reserve() calls David Gibson
2007-02-20  2:12 ` [PATCH 5/14] zImage: Add more flexible gunzip convenience functions David Gibson
2007-02-21  0:56   ` Geoff Levand
2007-02-20  2:12 ` [PATCH 11/14] Add arch/powerpc driver for UIC, PPC4xx interrupt controller David Gibson
2007-02-20  2:12 ` [PATCH 7/14] zImage: Cleanup and improve zImage entry point David Gibson
2007-02-21  0:57   ` Geoff Levand
2007-02-20  2:12 ` [PATCH 8/14] zImage wrapper for Ebony David Gibson
2007-02-20  2:12 ` [PATCH 9/14] Port 44x MMU definitions to ARCH=powerpc David Gibson
2007-02-20  2:12 ` [PATCH 6/14] zImage: Cleanup and improve prep_kernel() David Gibson
2007-02-21  0:56   ` Geoff Levand
2007-02-20  2:12 ` [PATCH 12/14] Add device tree for Ebony David Gibson
2007-02-20 15:09   ` Josh Boyer
2007-02-21  0:24     ` David Gibson
2007-02-21 12:25       ` Segher Boessenkool
2007-02-20 19:22   ` Yoder Stuart-B08248
2007-02-20 19:56     ` Segher Boessenkool
2007-02-21  4:57       ` David Gibson
2007-02-22  6:49       ` Segher Boessenkool
2007-02-20  2:12 ` [PATCH 10/14] Early serial debug support for PPC44x David Gibson
2007-02-20 13:26   ` Segher Boessenkool
2007-02-21  0:20     ` David Gibson
2007-02-20  2:12 ` David Gibson [this message]
2007-02-20 13:51   ` [PATCH 13/14] Re-organize Kconfig code for 4xx in arch/powerpc Josh Boyer
2007-02-21  0:26     ` David Gibson
2007-02-20  2:12 ` [PATCH 14/14] Support for Ebony " David Gibson
2007-02-20 14:05 ` [0/14] Ebony support, 2nd spin Josh Boyer
2007-02-20 14:14   ` Josh Boyer
2007-02-20 14:16   ` Arnd Bergmann
2007-02-20 14:46     ` Josh Boyer
2007-02-20 15:03       ` Josh Boyer
2007-02-20 15:07         ` [0/14] Ebony support, 2nd spi Arnd Bergmann
2007-02-20 15:17           ` Josh Boyer
2007-02-20 15:25           ` Segher Boessenkool
2007-02-20 18:02             ` Arnd Bergmann
2007-02-20 19:51               ` Segher Boessenkool
2007-02-20 20:29                 ` Josh Boyer
2007-02-21  0:38                   ` David Gibson
2007-02-21  1:30                     ` Josh Boyer
2007-02-21  0:44           ` David Gibson
2007-02-20 15:11         ` [0/14] Ebony support, 2nd spin Segher Boessenkool
2007-02-21  0:33         ` David Gibson
2007-02-21  0:35     ` David Gibson
2007-02-21  9:06       ` Arnd Bergmann
2007-02-25 23:57         ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070220021236.3609EDDD0A@ozlabs.org \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.