linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
       [not found] <20070616000511.712667424@arndb.de>
@ 2007-06-16  0:05 ` arnd
  2007-06-17 14:42   ` Kumar Gala
  2007-07-11 15:35   ` Mark A. Greer
  2007-06-16  0:05 ` [patch 2/9] autoselect optimal -mcpu= flag by platform arnd
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

The cores used in the MPC82xx/83xx/86xx embedded controllers are very similar
to those in the 32 bit general-purpose processors, so it makes sense to
treat them as the same CPU family.

Choosing between the embedded platforms and the multiplatform code is
now done in the platform menu, but functionally everything stays the
same.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-2.6/arch/powerpc/platforms/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig
+++ linux-2.6/arch/powerpc/platforms/Kconfig
@@ -2,7 +2,7 @@ menu "Platform support"
 
 choice
 	prompt "Machine type"
-	depends on PPC64 || CLASSIC32
+	depends on PPC64 || 6xx
 	default PPC_MULTIPLATFORM
 
 config PPC_MULTIPLATFORM
@@ -16,8 +16,31 @@ config EMBEDDED6xx
 	bool "Embedded 6xx/7xx/7xxx-based board"
 	depends on PPC32 && (BROKEN||BROKEN_ON_SMP)
 
+config PPC_82xx
+	bool "Freescale 82xx"
+	depends on 6xx
+
+config PPC_83xx
+	bool "Freescale 83xx"
+	depends on 6xx
+	select FSL_SOC
+	select 83xx
+	select WANT_DEVICE_TREE
+
+config PPC_86xx
+	bool "Freescale 86xx"
+	depends on 6xx
+	select FSL_SOC
+	select FSL_PCIE
+	select ALTIVEC
+	help
+	  The Freescale E600 SoCs have 74xx cores.
 endchoice
 
+config CLASSIC32
+	def_bool y
+	depends on 6xx && PPC_MULTIPLATFORM
+
 source "arch/powerpc/platforms/pseries/Kconfig"
 source "arch/powerpc/platforms/iseries/Kconfig"
 source "arch/powerpc/platforms/chrp/Kconfig"
Index: linux-2.6/arch/powerpc/platforms/Kconfig.cputype
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig.cputype
+++ linux-2.6/arch/powerpc/platforms/Kconfig.cputype
@@ -10,41 +10,20 @@ choice
 	prompt "Processor Type"
 	depends on PPC32
 	default 6xx
-
-config CLASSIC32
-	bool "52xx/6xx/7xx/74xx"
-	select PPC_FPU
-	select 6xx
 	help
-	  There are four families of PowerPC chips supported.  The more common
-	  types (601, 603, 604, 740, 750, 7400), the Motorola embedded
-	  versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the AMCC
-	  embedded versions (403 and 405) and the high end 64 bit Power
-	  processors (POWER 3, POWER4, and IBM PPC970 also known as G5).
-
-	  This option is the catch-all for 6xx types, including some of the
-	  embedded versions.  Unless there is see an option for the specific
-	  chip family you are using, you want this option.
-
-	  You do not want this if you are building a kernel for a 64 bit
-	  IBM RS/6000 or an Apple G5, choose 6xx.
-
-	  If unsure, select this option
-
-	  Note that the kernel runs in 32-bit mode even on 64-bit chips.
-
-config PPC_82xx
-	bool "Freescale 82xx"
-	select 6xx
-	select PPC_FPU
+	  There are five families of 32 bit PowerPC chips supported.
+	  The most common ones are the desktop and server CPUs (601, 603,
+	  604, 740, 750, 74xx) CPUs from Freescale and IBM, with their
+	  embedded 52xx/82xx/83xx/86xx counterparts.
+	  The other embeeded parts, namely 4xx, 8xx, e200 (55xx) and e500
+	  (85xx) each form a family of their own that is not compatible
+	  with the others.
 
-config PPC_83xx
-	bool "Freescale 83xx"
-	select 6xx
-	select FSL_SOC
-	select 83xx
+	  If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
+
+config 6xx
+	bool "52xx/6xx/7xx/74xx/82xx/83xx/86xx"
 	select PPC_FPU
-	select WANT_DEVICE_TREE
 
 config PPC_85xx
 	bool "Freescale 85xx"
@@ -53,16 +32,6 @@ config PPC_85xx
 	select 85xx
 	select WANT_DEVICE_TREE
 
-config PPC_86xx
-	bool "Freescale 86xx"
-	select 6xx
-	select FSL_SOC
-	select FSL_PCIE
-	select PPC_FPU
-	select ALTIVEC
-	help
-	  The Freescale E600 SoCs have 74xx cores.
-
 config PPC_8xx
 	bool "Freescale 8xx"
 	select FSL_SOC
Index: linux-2.6/arch/powerpc/platforms/82xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/82xx/Kconfig
@@ -1,5 +1,5 @@
 choice
-	prompt "Machine Type"
+	prompt "82xx Board Type"
 	depends on PPC_82xx
 	default MPC82xx_ADS
 
Index: linux-2.6/arch/powerpc/platforms/83xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/83xx/Kconfig
@@ -1,5 +1,5 @@
 choice
-	prompt "Machine Type"
+	prompt "83xx Board Type"
 	depends on PPC_83xx
 	default MPC834x_MDS
 
Index: linux-2.6/arch/powerpc/platforms/86xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/86xx/Kconfig
@@ -1,5 +1,5 @@
 choice
-	prompt "Machine Type"
+	prompt "86xx Board Type"
 	depends on PPC_86xx
 	default MPC8641_HPCN
 

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 2/9] autoselect optimal -mcpu= flag by platform
       [not found] <20070616000511.712667424@arndb.de>
  2007-06-16  0:05 ` [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-17 14:29   ` Kumar Gala
  2007-06-29  5:58   ` Paul Mackerras
  2007-06-16  0:05 ` [patch 3/9] rename add_bridge to avoid namespace clashes arnd
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

We can choose the -mcpu= gcc flags for compiling the kernel
based on the platform that we build for. In case of multiplatform
kernels, this chooses a setting for a common subset.

When using a platform type that can use different CPUs, a
new option CONFIG_PPC_CPU_SELECTION can be enabled to select
more specifically which CPUs the kernel will be able to
run on.

This replaces the CONFIG_POWER4_ONLY option with an much more
generic approach.

Also, when CONFIG_PPC_CPU_SELECTION is set, it is now possible
to select a CPU to tune for by means of the -mtune= option.

I tried to be very careful when coding the specific rules into
the Kconfig language, but it would be good to have a few
people sanity-checking them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-2.6/arch/powerpc/platforms/4xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/4xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/4xx/Kconfig
@@ -87,6 +87,7 @@ endmenu
 # 40x specific CPU modules, selected based on the board above.
 config NP405H
 	bool
+	select CPU_405
 	#depends on ASH
 
 # OAK doesn't exist but wanted to keep this around for any future 403GCX boards
@@ -94,6 +95,7 @@ config 403GCX
 	bool
 	#depends on OAK
 	select IBM405_ERR51
+	select CPU_403
 
 config 405GP
 	bool
@@ -102,19 +104,23 @@ config 405GP
 
 config 405EP
 	bool
+	select CPU_405
 
 config 405GPR
 	bool
+	select CPU_405
 
 config VIRTEX_II_PRO
 	bool
 	select IBM405_ERR77
 	select IBM405_ERR51
+	select CPU_405
 
 config STB03xxx
 	bool
 	select IBM405_ERR77
 	select IBM405_ERR51
+	select CPU_405
 
 # 40x errata/workaround config symbols, selected by the CPU models above
 
@@ -168,20 +174,25 @@ config 440EP
 	bool
 	select PPC_FPU
 	select IBM440EP_ERR42
+	select CPU_440
 
 config 440GP
 	bool
 	select IBM_NEW_EMAC_ZMII
+	select CPU_440
 
 config 440GX
 	bool
+	select CPU_440
 
 config 440SP
 	bool
+	select CPU_440
 
 config 440A
 	bool
 	depends on 440GX
+	select CPU_440
 	default y
 
 # 44x errata/workaround config symbols, selected by the CPU models above
Index: linux-2.6/arch/powerpc/platforms/52xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/52xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/52xx/Kconfig
@@ -25,12 +25,14 @@ config PPC_EFIKA
 	select RTAS_PROC
 	select PPC_MPC52xx
 	select PPC_NATIVE
+	select CPU_603e
 	default n
 
 config PPC_LITE5200
 	bool "Freescale Lite5200 Eval Board"
 	depends on PPC_MULTIPLATFORM && PPC32
 	select PPC_MPC5200
+	select CPU_603e
 	default n
 
 
Index: linux-2.6/arch/powerpc/platforms/82xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/82xx/Kconfig
@@ -10,6 +10,7 @@ config MPC82xx_ADS
 	select 8272
 	select 8260
 	select FSL_SOC
+	select CPU_603e
 	help
 	This option enables support for the MPC8272 ADS board
 
Index: linux-2.6/arch/powerpc/platforms/83xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/83xx/Kconfig
@@ -6,6 +6,7 @@ choice
 config MPC8313_RDB
 	bool "Freescale MPC8313 RDB"
 	select DEFAULT_UIMAGE
+	select CPU_603e
 	help
 	  This option enables support for the MPC8313 RDB board.
 
@@ -13,6 +14,7 @@ config MPC832x_MDS
 	bool "Freescale MPC832x MDS"
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
+	select CPU_603e
 	help
 	  This option enables support for the MPC832x MDS evaluation board.
 
@@ -20,12 +22,14 @@ config MPC832x_RDB
 	bool "Freescale MPC832x RDB"
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
+	select CPU_603e
 	help
 	  This option enables support for the MPC8323 RDB board.
 
 config MPC834x_MDS
 	bool "Freescale MPC834x MDS"
 	select DEFAULT_UIMAGE
+	select CPU_603e
 	help
 	  This option enables support for the MPC 834x MDS evaluation board.
 
@@ -37,6 +41,7 @@ config MPC834x_MDS
 config MPC834x_ITX
 	bool "Freescale MPC834x ITX"
 	select DEFAULT_UIMAGE
+	select CPU_603e
 	help
 	  This option enables support for the MPC 834x ITX evaluation board.
 
@@ -47,6 +52,7 @@ config MPC836x_MDS
 	bool "Freescale MPC836x MDS"
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
+	select CPU_603e
 	help
 	  This option enables support for the MPC836x MDS Processor Board.
 
Index: linux-2.6/arch/powerpc/platforms/86xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/86xx/Kconfig
@@ -7,6 +7,7 @@ config MPC8641_HPCN
 	bool "Freescale MPC8641 HPCN"
 	select PPC_I8259
 	select DEFAULT_UIMAGE
+	select CPU_74xx
 	help
 	  This option enables support for the MPC8641 HPCN board.
 
Index: linux-2.6/arch/powerpc/platforms/Kconfig.cputype
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig.cputype
+++ linux-2.6/arch/powerpc/platforms/Kconfig.cputype
@@ -51,9 +51,232 @@ config E200
 
 endchoice
 
-config POWER4_ONLY
-	bool "Optimize for POWER4"
+config PPC_CPU_SELECTION
+	bool "Advanced CPU selection"
+
+config CPU_DEFAULT
+	bool "Don't specify -mcpu= to gcc" if PPC_CPU_SELECTION
+
+config CPU_RS64
+	bool "RS64" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES || PPC_ISERIES
+
+config CPU_POWER3
+	bool "IBM Power3" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES || PPC_ISERIES
+
+config CPU_POWER4
+	bool "IBM Power4" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES || PPC_ISERIES
+
+config CPU_POWER5
+	bool "IBM Power5" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES
+
+config CPU_POWER6
+	bool "IBM Power6" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES
+	select ALTIVEC
+
+config CPU_970
+	bool "IBM PowerPC 970 (G5)" if PPC_CPU_SELECTION
+	depends on PPC64
+	default y if PPC_PSERIES
+	select ALTIVEC
+
+config CPU_CELL
+	bool "Sony/Toshiba/IBM Cell Broadband Engine" if PPC_CPU_SELECTION
 	depends on PPC64
+	select ALTIVEC
+
+config CPU_PA6T
+	bool "PA Semi PA6T-1682M" if PPC_CPU_SELECTION
+	depends on PPC64
+	select ALTIVEC
+
+config CPU_601
+	bool "PowerPC 601 (G1)" if PPC_CPU_SELECTION
+	depends on 6xx
+	default y if PPC_CHRP || PPC_PREP
+
+config CPU_603e
+	bool "PowerPC 603e, 604, 604e, 52xx, 82xx, 83xx (G2)" if PPC_CPU_SELECTION
+	depends on 6xx
+	default y if PPC_CHRP || PPC_PREP || PPC_PMAC
+
+config CPU_7xx
+	bool "PowerPC 740/750 (G3)" if PPC_CPU_SELECTION
+	depends on 6xx
+	default y if PPC_PMAC
+
+config CPU_74xx
+	bool "PowerPC 74xx, 86xx (G4)" if PPC_CPU_SELECTION
+	depends on 6xx
+	default y if PPC_PMAC
+	select ALTIVEC
+
+config CPU_403
+	bool "AMCC 403" if PPC_CPU_SELECTION
+	depends on 40x
+
+config CPU_405
+	bool "AMCC 405" if PPC_CPU_SELECTION
+	depends on 40x
+
+config CPU_440
+	bool "AMCC 440" if PPC_CPU_SELECTION
+	depends on 44x
+
+choice
+	prompt "Tune for processor type" if PPC_CPU_SELECTION
+	default TUNE_POWER4 if PPC64
+	default TUNE_DEFAULT
+
+config TUNE_DEFAULT
+	bool "Don't specify -mtune= to gcc"
+
+config TUNE_RS64
+	bool "RS64"
+	depends on CPU_RS64
+
+config TUNE_POWER3
+	bool "IBM Power3"
+	depends on CPU_POWER3
+
+config TUNE_POWER4
+	bool "IBM Power4"
+	depends on CPU_POWER4
+
+config TUNE_POWER5
+	bool "IBM Power5"
+	depends on CPU_POWER5
+
+config TUNE_POWER6
+	bool "IBM Power6"
+	depends on CPU_POWER6
+
+config TUNE_970
+	bool "IBM PowerPC 970 (G5)"
+	depends on CPU_970
+
+config TUNE_CELL
+	bool "Sony/Toshiba/IBM Cell Broadband Engine"
+	depends on CPU_CELL
+
+config TUNE_PA6T
+	bool "PA Semi PA6T-1682M"
+	depends on CPU_PA6T
+
+config TUNE_601
+	bool "PowerPC 601 (G1)"
+	depends on CPU_601
+
+config TUNE_603e
+	bool "PowerPC 603e, 604, 604e, 52xx, 82xx, 83xx (G2)"
+	depends on CPU_603e
+
+config TUNE_7xx
+	bool "PowerPC 740/750 (G3)"
+	depends on CPU_7xx
+
+config TUNE_74xx
+	bool "PowerPC 74xx, 86xx (G4)"
+	depends on CPU_74xx
+
+config TUNE_821
+	bool "Freescale MPC821"
+	depends on 8xx
+
+config TUNE_823
+	bool "Freescale MPC823"
+	depends on 8xx
+
+config TUNE_860
+	bool "Freescale MPC860"
+	depends on 8xx
+
+config TUNE_403
+	bool "AMCC 403"
+	depends on CPU_403
+
+config TUNE_405
+	bool "AMCC 405"
+	depends on CPU_405
+
+config TUNE_440
+	bool "AMCC 440"
+	depends on CPU_440
+
+config TUNE_8540
+	bool "Freescale MPC8540"
+	depends on PPC_85xx
+
+config TUNE_E200
+	bool "Freescale e200"
+	depends on E200
+
+endchoice
+
+config PPC_MCPU
+	string
+	default "" if CPU_DEFAULT
+	default "-mcpu=powerpc64" if CPU_POWER3 || CPU_RS64
+	default "-mcpu=power4" if (CPU_POWER5 || CPU_POWER6) && (CPU_970 || CPU_CELL || CPU_PA6T)
+	default "-mcpu=power4" if CPU_POWER4
+	default "-mcpu=power5" if CPU_POWER5
+	default "-mcpu=power6" if CPU_POWER6
+	default "-mcpu=970" if CPU_970
+	default "-mcpu=cell" if CPU_CELL
+	default "-mcpu=pa6t" if CPU_PA6T
+	default "-mcpu=powerpc64" if PPC64
+	default "-mcpu=powerpc" if CPU_601 && (CPU_603e || CPU_7xx || CPU_74xx)
+	default "-mcpu=601" if CPU_601
+	default "-mcpu=603e" if CPU_603e
+	default "-mcpu=750" if CPU_7xx
+	default "-mcpu=7450" if CPU_74xx
+	default "-mcpu=powerpc" if (CPU_403 && CPU_405)
+	default "-mcpu=powerpc" if (CPU_403 || CPU_405) && CPU_440
+	default "-mcpu=403" if CPU_403
+	default "-mcpu=405" if CPU_405
+	default "-mcpu=440" if CPU_440
+	default "-mcpu=860" if PPC_8xx
+	default "-mcpu=8540" if PPC_85xx
+	default "-mcpu=e200" if E200
+	default "-mcpu=powerpc"
+
+config PPC_MTUNE
+	string
+	default "" if TUNE_DEFAULT
+	default "-mtune=power3" if TUNE_POWER3
+	default "-mtune=rs64a" if TUNE_RS64
+	default "-mtune=power4" if TUNE_POWER4
+	default "-mtune=power5" if TUNE_POWER5
+	default "-mtune=power6" if TUNE_POWER6
+	default "-mtune=970" if TUNE_970
+	default "-mtune=cell" if TUNE_CELL
+	default "-mtune=pa6t" if TUNE_PA6T
+	default "-mtune=601" if TUNE_601
+	default "-mtune=603e" if TUNE_603e
+	default "-mtune=750" if TUNE_7xx
+	default "-mtune=7450" if TUNE_74xx
+	default "-mtune=403" if TUNE_403
+	default "-mtune=405" if TUNE_405
+	default "-mtune=440" if TUNE_440
+	default "-mtune=821" if TUNE_821
+	default "-mtune=823" if TUNE_823
+	default "-mtune=860" if TUNE_860
+	default "-mtune=8540" if TUNE_8540
+	default "-mtune=e200" if TUNE_E200
+	default "-mtune=power4" if PPC64
+
+config POWER4_ONLY
+	def_bool y
+	depends on PPC64 && !CPU_POWER3 && !CPU_RS64
 	default n
 	---help---
 	  Cause the compiler to optimize for POWER4/POWER5/PPC970 processors.
Index: linux-2.6/arch/powerpc/platforms/cell/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/Kconfig
+++ linux-2.6/arch/powerpc/platforms/cell/Kconfig
@@ -20,6 +20,7 @@ config PPC_IBM_CELL_BLADE
 	select MMIO_NVRAM
 	select PPC_UDBG_16550
 	select UDBG_RTAS_CONSOLE
+	select CPU_CELL
 
 menu "Cell Broadband Engine options"
 	depends on PPC_CELL
Index: linux-2.6/arch/powerpc/platforms/celleb/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/celleb/Kconfig
+++ linux-2.6/arch/powerpc/platforms/celleb/Kconfig
@@ -2,6 +2,7 @@ config PPC_CELLEB
 	bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
 	depends on PPC_MULTIPLATFORM && PPC64
 	select PPC_CELL
+	select CPU_CELL
 	select PPC_OF_PLATFORM_PCI
 	select HAS_TXX9_SERIAL
 	select PPC_UDBG_BEAT
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -8,6 +8,7 @@ config LINKSTATION
 	select FSL_SOC
 	select PPC_UDBG_16550 if SERIAL_8250
 	select DEFAULT_UIMAGE
+	select CPU_603e
 	help
 	  Select LINKSTATION if configuring for one of PPC- (MPC8241)
 	  based NAS systems from Buffalo Technology. So far only
@@ -20,6 +21,7 @@ config MPC7448HPC2
 	select TSI108_BRIDGE
 	select DEFAULT_UIMAGE
 	select PPC_UDBG_16550
+	select CPU_74xx
 	help
 	  Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
 	  platform
@@ -28,6 +30,7 @@ config PPC_HOLLY
 	bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)"
 	select TSI108_BRIDGE
 	select PPC_UDBG_16550
+	select CPU_7xx
 	help
 	  Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
 	  Board with TSI108/9 bridge (Hickory/Holly)
@@ -37,6 +40,7 @@ config PPC_PRPMC2800
 	select MV64X60
 	select NOT_COHERENT_CACHE
 	select WANT_DEVICE_TREE
+	select CPU_74xx
 	help
 	  This option enables support for the Motorola PrPMC2800 board
 endchoice
Index: linux-2.6/arch/powerpc/platforms/maple/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/maple/Kconfig
+++ linux-2.6/arch/powerpc/platforms/maple/Kconfig
@@ -11,6 +11,7 @@ config PPC_MAPLE
 	select PPC_RTAS
 	select MMIO_NVRAM
 	select ATA_NONSTANDARD if ATA
+	select CPU_970
 	default n
 	help
           This option enables support for the Maple 970FX Evaluation Board.
Index: linux-2.6/arch/powerpc/platforms/pasemi/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pasemi/Kconfig
+++ linux-2.6/arch/powerpc/platforms/pasemi/Kconfig
@@ -5,6 +5,7 @@ config PPC_PASEMI
 	select MPIC
 	select PPC_UDBG_16550
 	select PPC_NATIVE
+	select CPU_PA6T
 	help
 	  This option enables support for PA Semi's PWRficient line
 	  of SoC processors, including PA6T-1682M
Index: linux-2.6/arch/powerpc/platforms/powermac/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/Kconfig
+++ linux-2.6/arch/powerpc/platforms/powermac/Kconfig
@@ -15,6 +15,7 @@ config PPC_PMAC64
 	select MPIC_U3_HT_IRQS
 	select GENERIC_TBSYNC
 	select PPC_970_NAP
+	select CPU_970
 	default y
 
 
Index: linux-2.6/arch/powerpc/platforms/ps3/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/ps3/Kconfig
+++ linux-2.6/arch/powerpc/platforms/ps3/Kconfig
@@ -2,6 +2,7 @@ config PPC_PS3
 	bool "Sony PS3 (incomplete)"
 	depends on PPC_MULTIPLATFORM && PPC64
 	select PPC_CELL
+	select CPU_CELL
 	select USB_ARCH_HAS_OHCI
 	select USB_OHCI_LITTLE_ENDIAN
 	select USB_OHCI_BIG_ENDIAN_MMIO
Index: linux-2.6/arch/powerpc/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/Makefile
+++ linux-2.6/arch/powerpc/Makefile
@@ -78,24 +78,23 @@ LINUXINCLUDE    += $(LINUXINCLUDE-y)
 
 CHECKFLAGS	+= -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
 
+OPTFLAGS := $(call cc-option,$(CONFIG_PPC_MCPU)) $(call cc-option,$(CONFIG_PPC_MTUNE))
+
+# compilers older than 4.0.0 can only set -maltivec in 64 bit mode
+# when compiling for 970
 ifeq ($(CONFIG_PPC64),y)
 GCC_BROKEN_VEC	:= $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
-
 ifeq ($(CONFIG_POWER4_ONLY),y)
 ifeq ($(CONFIG_ALTIVEC),y)
 ifeq ($(GCC_BROKEN_VEC),y)
-	CFLAGS += $(call cc-option,-mcpu=970)
-else
-	CFLAGS += $(call cc-option,-mcpu=power4)
+	OPTFLAGS := $(call cc-option,-mcpu=970) $(call cc-option,$(CONFIG_PPC_MTUNE))
 endif
-else
-	CFLAGS += $(call cc-option,-mcpu=power4)
 endif
-else
-	CFLAGS += $(call cc-option,-mtune=power4)
 endif
 endif
 
+CFLAGS += $(OPTFLAGS)
+
 # No AltiVec instruction when building kernel
 CFLAGS += $(call cc-option,-mno-altivec)
 
@@ -107,10 +106,6 @@ CFLAGS += $(call cc-option,-funit-at-a-t
 # often slow when they are implemented at all
 CFLAGS		+= -mno-string
 
-ifeq ($(CONFIG_6xx),y)
-CFLAGS		+= -mcpu=powerpc
-endif
-
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_6xx)		+= -Wa,-maltivec
 cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 3/9] rename add_bridge to avoid namespace clashes
       [not found] <20070616000511.712667424@arndb.de>
  2007-06-16  0:05 ` [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection arnd
  2007-06-16  0:05 ` [patch 2/9] autoselect optimal -mcpu= flag by platform arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-16  0:05 ` [patch 4/9] mpc82xx_ads build fix arnd
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

Many platforms currently define their own add_bridge function, some
of them globally. This breaks some multiplatform configurations.
Prefixing each of these functions with the platform name avoids
this problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -515,7 +515,7 @@ static int m82xx_pci_exclude_device(u_ch
 		return PCIBIOS_SUCCESSFUL;
 }
 
-void __init add_bridge(struct device_node *np)
+static void __init mpc82xx_add_bridge(struct device_node *np)
 {
 	int len;
 	struct pci_controller *hose;
@@ -584,7 +584,7 @@ static void __init mpc82xx_ads_setup_arc
 #ifdef CONFIG_PCI
 	ppc_md.pci_exclude_device = m82xx_pci_exclude_device;
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc82xx_add_bridge(np);
 
 	of_node_put(np);
 #endif
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc836x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -86,7 +86,7 @@ static void __init mpc836x_mds_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc83xx.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc83xx.h
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -27,7 +27,7 @@
  * mpc83xx_* files. Mostly for use by mpc83xx_setup
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc83xx_add_bridge(struct device_node *dev);
 extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
 extern void mpc83xx_restart(char *cmd);
 extern long mpc83xx_time_init(void);
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc8313_rdb.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -49,7 +49,7 @@ static void __init mpc8313_rdb_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc832x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -80,7 +80,7 @@ static void __init mpc832x_sys_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc832x_rdb.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -53,7 +53,7 @@ static void __init mpc832x_rdb_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc834x_itx.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -59,7 +59,7 @@ static void __init mpc834x_itx_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc834x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -129,7 +129,7 @@ static void __init mpc834x_mds_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc83xx_add_bridge(np);
 
 	ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
Index: linux-2.6/arch/powerpc/platforms/83xx/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/pci.c
+++ linux-2.6/arch/powerpc/platforms/83xx/pci.c
@@ -45,7 +45,7 @@ int mpc83xx_exclude_device(u_char bus, u
 	return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc83xx_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx.h
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -15,4 +15,4 @@
  */
 
 extern void mpc85xx_restart(char *);
-extern int add_bridge(struct device_node *dev);
+extern int mpc85xx_add_bridge(struct device_node *dev);
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -241,7 +241,7 @@ static void __init mpc85xx_ads_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc85xx_add_bridge(np);
 	ppc_md.pci_exclude_device = mpc85xx_exclude_device;
 #endif
 }
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -257,7 +257,7 @@ static void __init mpc85xx_cds_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc85xx_add_bridge(np);
 
 	ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
 	ppc_md.pci_exclude_device = mpc85xx_exclude_device;
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -100,7 +100,7 @@ static void __init mpc85xx_mds_setup_arc
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
-		add_bridge(np);
+		mpc85xx_add_bridge(np);
 	}
 	of_node_put(np);
 #endif
Index: linux-2.6/arch/powerpc/platforms/85xx/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/pci.c
+++ linux-2.6/arch/powerpc/platforms/85xx/pci.c
@@ -36,7 +36,7 @@
 int mpc85xx_pci2_busno = 0;
 
 #ifdef CONFIG_PCI
-int __init add_bridge(struct device_node *dev)
+int __init mpc85xx_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx.h
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx.h
@@ -15,7 +15,7 @@
  * mpc86xx_* files. Mostly for use by mpc86xx_setup().
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc86xx_add_bridge(struct device_node *dev);
 
 extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
 
Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -364,7 +364,7 @@ mpc86xx_hpcn_setup_arch(void)
 
 #ifdef CONFIG_PCI
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		mpc86xx_add_bridge(np);
 
 	ppc_md.pci_exclude_device = mpc86xx_exclude_device;
 #endif
Index: linux-2.6/arch/powerpc/platforms/86xx/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/pci.c
+++ linux-2.6/arch/powerpc/platforms/86xx/pci.c
@@ -148,7 +148,7 @@ int mpc86xx_exclude_device(u_char bus, u
 	return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc86xx_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/linkstation.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -54,7 +54,7 @@ static struct mtd_partition linkstation_
 	},
 };
 
-static int __init add_bridge(struct device_node *dev)
+static int __init linkstation_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
@@ -92,7 +92,7 @@ static void __init linkstation_setup_arc
 
 	/* Lookup PCI host bridges */
 	for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-		add_bridge(np);
+		linkstation_add_bridge(np);
 
 	printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
 	printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
Index: linux-2.6/arch/powerpc/platforms/maple/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/maple/pci.c
+++ linux-2.6/arch/powerpc/platforms/maple/pci.c
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pc
 	u3_ht = hose;
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init maple_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
@@ -541,7 +541,7 @@ void __init maple_pci_init(void)
 			continue;
 		if ((of_device_is_compatible(np, "u4-pcie") ||
 		     of_device_is_compatible(np, "u3-agp")) &&
-		    add_bridge(np) == 0)
+		    maple_add_bridge(np) == 0)
 			of_node_get(np);
 
 		if (of_device_is_compatible(np, "u3-ht")) {
@@ -553,7 +553,7 @@ void __init maple_pci_init(void)
 
 	/* Now setup the HyperTransport host if we found any
 	 */
-	if (ht && add_bridge(ht) != 0)
+	if (ht && maple_add_bridge(ht) != 0)
 		of_node_put(ht);
 
 	/* Setup the linkage between OF nodes and PHBs */ 
Index: linux-2.6/arch/powerpc/platforms/pasemi/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pasemi/pci.c
+++ linux-2.6/arch/powerpc/platforms/pasemi/pci.c
@@ -132,7 +132,7 @@ static void __init setup_pa_pxp(struct p
 	hose->cfg_data = ioremap(0xe0000000, 0x10000000);
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init pas_add_bridge(struct device_node *dev)
 {
 	struct pci_controller *hose;
 
@@ -167,7 +167,7 @@ void __init pas_pci_init(void)
 	}
 
 	for (np = NULL; (np = of_get_next_child(root, np)) != NULL;)
-		if (np->name && !strcmp(np->name, "pxp") && !add_bridge(np))
+		if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np))
 			of_node_get(np);
 
 	of_node_put(root);
Index: linux-2.6/arch/powerpc/platforms/powermac/pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/pci.c
+++ linux-2.6/arch/powerpc/platforms/powermac/pci.c
@@ -35,8 +35,6 @@
 #define DBG(x...)
 #endif
 
-static int add_bridge(struct device_node *dev);
-
 /* XXX Could be per-controller, but I don't think we risk anything by
  * assuming we won't have both UniNorth and Bandit */
 static int has_uninorth;
@@ -897,7 +895,7 @@ static void __init setup_u3_ht(struct pc
  * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
  * if we have one or more bandit or chaos bridges, we don't have a MPC106.
  */
-static int __init add_bridge(struct device_node *dev)
+static int __init pmac_add_bridge(struct device_node *dev)
 {
 	int len;
 	struct pci_controller *hose;
@@ -1023,7 +1021,7 @@ void __init pmac_pci_init(void)
 		if (strcmp(np->name, "bandit") == 0
 		    || strcmp(np->name, "chaos") == 0
 		    || strcmp(np->name, "pci") == 0) {
-			if (add_bridge(np) == 0)
+			if (pmac_add_bridge(np) == 0)
 				of_node_get(np);
 		}
 		if (strcmp(np->name, "ht") == 0) {
@@ -1037,7 +1035,7 @@ void __init pmac_pci_init(void)
 	/* Probe HT last as it relies on the agp resources to be already
 	 * setup
 	 */
-	if (ht && add_bridge(ht) != 0)
+	if (ht && pmac_add_bridge(ht) != 0)
 		of_node_put(ht);
 
 	/* Setup the linkage between OF nodes and PHBs */

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 4/9] mpc82xx_ads build fix
       [not found] <20070616000511.712667424@arndb.de>
                   ` (2 preceding siblings ...)
  2007-06-16  0:05 ` [patch 3/9] rename add_bridge to avoid namespace clashes arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-16  7:37   ` Stephen Rothwell
  2007-06-16  0:05 ` [patch 5/9] kill isa_{io,mem}_base definitions for !PCI arnd
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

needed for 6xx allyesconfig

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
--- linux-2.6.orig/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -49,7 +49,7 @@
 #include <linux/fs_enet_pd.h>
 
 #include <sysdev/fsl_soc.h>
-#include <../sysdev/cpm2_pic.h>
+#include <../../sysdev/cpm2_pic.h>
 
 #include "pq2ads.h"
 

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 5/9] kill isa_{io,mem}_base definitions for !PCI
       [not found] <20070616000511.712667424@arndb.de>
                   ` (3 preceding siblings ...)
  2007-06-16  0:05 ` [patch 4/9] mpc82xx_ads build fix arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-17 14:33   ` Kumar Gala
  2007-06-16  0:05 ` [patch 6/9] fix building without PCI arnd
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

When CONFIG_PCI is disabled, the definitions for isa_io_base,
isa_mem_base and pci_dram_offset are entirely unused, but they
can result in link failure because they are defined in multiple
places.

The easiest fix is to just remove all these definitions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Index: linux-2.6/arch/powerpc/platforms/83xx/mpc8313_rdb.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -28,11 +28,6 @@
 #define DBG(fmt...)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 /* ************************************************************************
  *
  * Setup the architecture
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc832x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -49,11 +49,6 @@
 #define DBG(fmt...)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 static u8 *bcsr_regs = NULL;
 
 /* ************************************************************************
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc832x_rdb.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -32,11 +32,6 @@
 #define DBG(fmt...)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 /* ************************************************************************
  *
  * Setup the architecture
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc834x_itx.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -38,11 +38,6 @@
 
 #include "mpc83xx.h"
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 /* ************************************************************************
  *
  * Setup the architecture
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc834x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -38,11 +38,6 @@
 
 #include "mpc83xx.h"
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 #define BCSR5_INT_USB		0x02
 /* Note: This is only for PB, not for PB+PIB
  * On PB only port0 is connected using ULPI */
Index: linux-2.6/arch/powerpc/platforms/83xx/mpc836x_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ linux-2.6/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -55,11 +55,6 @@
 #define DBG(fmt...)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 static u8 *bcsr_regs = NULL;
 
 /* ************************************************************************
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -38,11 +38,6 @@
 #include <asm/fs_pd.h>
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 #ifdef CONFIG_PCI
 static int mpc85xx_exclude_device(u_char bus, u_char devfn)
 {
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -47,11 +47,6 @@
 #include <sysdev/fsl_soc.h>
 #include "mpc85xx.h"
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 static int cds_pci_slot = 2;
 static volatile u8 *cadmus;
 
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_mds.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -59,11 +59,6 @@
 #define DBG(fmt...)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-#endif
-
 /* ************************************************************************
  *
  * Setup the architecture
Index: linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ linux-2.6/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -44,13 +44,6 @@
 #define DBG(fmt...) do { } while(0)
 #endif
 
-#ifndef CONFIG_PCI
-unsigned long isa_io_base = 0;
-unsigned long isa_mem_base = 0;
-unsigned long pci_dram_offset = 0;
-#endif
-
-
 #ifdef CONFIG_PCI
 static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
 {
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -54,12 +54,6 @@
 
 #define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
 
-#ifndef CONFIG_PCI
-isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
-isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
-pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
-#endif
-
 extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
 int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
Index: linux-2.6/include/asm-powerpc/mpc86xx.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/mpc86xx.h
+++ linux-2.6/include/asm-powerpc/mpc86xx.h
@@ -19,12 +19,6 @@
 
 #ifdef CONFIG_PPC_86xx
 
-#define _IO_BASE        isa_io_base
-#define _ISA_MEM_BASE   isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#endif
-
 #define CPU0_BOOT_RELEASE 0x01000000
 #define CPU1_BOOT_RELEASE 0x02000000
 #define CPU_ALL_RELEASED (CPU0_BOOT_RELEASE | CPU1_BOOT_RELEASE)

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 6/9] fix building without PCI
       [not found] <20070616000511.712667424@arndb.de>
                   ` (4 preceding siblings ...)
  2007-06-16  0:05 ` [patch 5/9] kill isa_{io,mem}_base definitions for !PCI arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-16  0:05 ` [patch 7/9] disallow building powermac and tsi108 " arnd
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

Some code looks can be configured to be built without
PCI support, but does not work properly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Index: linux-2.6/arch/powerpc/platforms/52xx/efika.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/52xx/efika.c
+++ linux-2.6/arch/powerpc/platforms/52xx/efika.c
@@ -252,6 +252,8 @@ define_machine(efika)
 	.progress		= rtas_progress,
 	.get_boot_time		= rtas_get_boot_time,
 	.calibrate_decr		= generic_calibrate_decr,
+#ifdef CONFIG_PCI
 	.phys_mem_access_prot	= pci_phys_mem_access_prot,
+#endif
 };
 
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/linkstation.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -56,6 +56,7 @@ static struct mtd_partition linkstation_
 
 static int __init linkstation_add_bridge(struct device_node *dev)
 {
+#ifdef CONFIG_PCI
 	int len;
 	struct pci_controller *hose;
 	const int *bus_range;
@@ -78,7 +79,7 @@ static int __init linkstation_add_bridge
 	/* Interpret the "ranges" property */
 	/* This also maps the I/O region and sets isa_io/mem_base */
 	pci_process_bridge_OF_ranges(hose, dev, 1);
-
+#endif
 	return 0;
 }
 

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 7/9] disallow building powermac and tsi108 without PCI
       [not found] <20070616000511.712667424@arndb.de>
                   ` (5 preceding siblings ...)
  2007-06-16  0:05 ` [patch 6/9] fix building without PCI arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-17 14:35   ` Kumar Gala
  2007-06-16  0:05 ` [patch 8/9] fix conflicting mpc85xx board headers arnd
  2007-06-16  0:05 ` [patch 9/9] enable multiplatform support for embedded boards arnd
  8 siblings, 1 reply; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

The TSI108 code and the 32 bit powermac and chrp platforms
have dependency on PCI that is not easy or desirable to get rid
of.

The easiest fix is to always select CONFIG_PCI if one of those
platforms is enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -18,6 +18,7 @@ config LINKSTATION
 
 config MPC7448HPC2
 	bool "Freescale MPC7448HPC2(Taiga)"
+	select PCI
 	select TSI108_BRIDGE
 	select DEFAULT_UIMAGE
 	select PPC_UDBG_16550
@@ -31,6 +32,7 @@ config PPC_HOLLY
 	select TSI108_BRIDGE
 	select PPC_UDBG_16550
 	select CPU_7xx
+	select PCI
 	help
 	  Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
 	  Board with TSI108/9 bridge (Hickory/Holly)
Index: linux-2.6/arch/powerpc/platforms/powermac/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/powermac/Kconfig
+++ linux-2.6/arch/powerpc/platforms/powermac/Kconfig
@@ -2,6 +2,7 @@ config PPC_PMAC
 	bool "Apple PowerMac based machines"
 	depends on PPC_MULTIPLATFORM
 	select MPIC
+	select PCI
 	select PPC_INDIRECT_PCI if PPC32
 	select PPC_MPC106 if PPC32
 	select PPC_NATIVE
Index: linux-2.6/arch/powerpc/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/Kconfig
+++ linux-2.6/arch/powerpc/Kconfig
@@ -435,7 +435,7 @@ config MCA
 config PCI
 	bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
 		|| PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
-		|| MPC7448HPC2 || PPC_PS3 || PPC_HOLLY
+		|| PPC_PS3
 	default y if !40x && !CPM2 && !8xx && !PPC_83xx \
 		&& !PPC_85xx && !PPC_86xx
 	default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
Index: linux-2.6/arch/powerpc/platforms/chrp/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/chrp/Kconfig
+++ linux-2.6/arch/powerpc/platforms/chrp/Kconfig
@@ -8,4 +8,5 @@ config PPC_CHRP
 	select PPC_MPC106
 	select PPC_UDBG_16550
 	select PPC_NATIVE
+	select PCI
 	default y
Index: linux-2.6/arch/powerpc/platforms/chrp/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/chrp/Makefile
+++ linux-2.6/arch/powerpc/platforms/chrp/Makefile
@@ -1,4 +1,3 @@
-obj-y				+= setup.o time.o pegasos_eth.o
-obj-$(CONFIG_PCI)		+= pci.o
+obj-y				+= setup.o time.o pegasos_eth.o pci.o
 obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_NVRAM)		+= nvram.o

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 8/9] fix conflicting mpc85xx board headers
       [not found] <20070616000511.712667424@arndb.de>
                   ` (6 preceding siblings ...)
  2007-06-16  0:05 ` [patch 7/9] disallow building powermac and tsi108 " arnd
@ 2007-06-16  0:05 ` arnd
  2007-06-16  0:05 ` [patch 9/9] enable multiplatform support for embedded boards arnd
  8 siblings, 0 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

In order to allow multiplatform kernels, we can not have header
files that define the same symbols. Probably these board specific
headers should just go away entirely, but for the easiest fix
is to rename the conflicting symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_ads.h
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_ads.h
@@ -29,14 +29,14 @@
 #define MPC85xx_CPM_OFFSET	(0x80000)
 
 #define CPM_MAP_ADDR		(get_immrbase() + MPC85xx_CPM_OFFSET)
-#define CPM_IRQ_OFFSET		60
+#define MPC85xxADS_CPM_IRQ_OFFSET		60
 
-#define SIU_INT_SMC1		((uint)0x04+CPM_IRQ_OFFSET)
-#define SIU_INT_SMC2		((uint)0x05+CPM_IRQ_OFFSET)
-#define SIU_INT_SCC1		((uint)0x28+CPM_IRQ_OFFSET)
-#define SIU_INT_SCC2		((uint)0x29+CPM_IRQ_OFFSET)
-#define SIU_INT_SCC3		((uint)0x2a+CPM_IRQ_OFFSET)
-#define SIU_INT_SCC4		((uint)0x2b+CPM_IRQ_OFFSET)
+#define SIU_INT_SMC1		((uint)0x04+MPC85xxADS_CPM_IRQ_OFFSET)
+#define SIU_INT_SMC2		((uint)0x05+MPC85xxADS_CPM_IRQ_OFFSET)
+#define SIU_INT_SCC1		((uint)0x28+MPC85xxADS_CPM_IRQ_OFFSET)
+#define SIU_INT_SCC2		((uint)0x29+MPC85xxADS_CPM_IRQ_OFFSET)
+#define SIU_INT_SCC3		((uint)0x2a+MPC85xxADS_CPM_IRQ_OFFSET)
+#define SIU_INT_SCC4		((uint)0x2b+MPC85xxADS_CPM_IRQ_OFFSET)
 
 /* FCC1 Clock Source Configuration.  These can be
  * redefined in the board specific file.
Index: linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.h
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/mpc85xx_cds.h
+++ linux-2.6/arch/powerpc/platforms/85xx/mpc85xx_cds.h
@@ -36,7 +36,7 @@
 #define PIRQ1A			MPC85xx_IRQ_EXT11
 
 #define NR_8259_INTS		16
-#define CPM_IRQ_OFFSET		NR_8259_INTS
+#define MPC85xxCDS_CPM_IRQ_OFFSET		NR_8259_INTS
 
 #define MPC85xx_OPENPIC_IRQ_OFFSET	80
 

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [patch 9/9] enable multiplatform support for embedded boards
       [not found] <20070616000511.712667424@arndb.de>
                   ` (7 preceding siblings ...)
  2007-06-16  0:05 ` [patch 8/9] fix conflicting mpc85xx board headers arnd
@ 2007-06-16  0:05 ` arnd
  8 siblings, 0 replies; 25+ messages in thread
From: arnd @ 2007-06-16  0:05 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

This makes it possible to build kernels for any combination of
board types that can coexisting in the same binary. It is for
reference only right now, because there are still concerns
that it might make future optimizations harder to implement.

Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Index: linux-2.6/arch/powerpc/platforms/52xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/52xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/52xx/Kconfig
@@ -1,38 +1,35 @@
 config PPC_MPC52xx
-	bool
+	bool "Freescale 52xx"
 	select FSL_SOC
-	default n
-
-config PPC_MPC5200
-	bool
-	select PPC_MPC52xx
-	default n
-
-config PPC_MPC5200_BUGFIX
-	bool "MPC5200 (L25R) bugfix support"
-	depends on PPC_MPC5200
-	default n
-	help
-	  Enable workarounds for original MPC5200 errata.  This is not required
-	  for MPC5200B based boards.
-
-	  It is safe to say 'Y' here
+	depends on 6xx
 
 config PPC_EFIKA
 	bool "bPlan Efika 5k2. MPC5200B based computer"
-	depends on PPC_MULTIPLATFORM && PPC32
+	depends on PPC_MPC52xx
 	select PPC_RTAS
 	select RTAS_PROC
-	select PPC_MPC52xx
 	select PPC_NATIVE
 	select CPU_603e
 	default n
 
 config PPC_LITE5200
 	bool "Freescale Lite5200 Eval Board"
-	depends on PPC_MULTIPLATFORM && PPC32
+	depends on PPC_MPC52xx
 	select PPC_MPC5200
 	select CPU_603e
 	default n
 
+config PPC_MPC5200
+	bool
+	depends on PPC_MPC52xx
+	default n
+
+config PPC_MPC5200_BUGFIX
+	bool "MPC5200 (L25R) bugfix support"
+	depends on PPC_MPC5200
+	default n
+	help
+	  Enable workarounds for original MPC5200 errata.  This is not required
+	  for MPC5200B based boards.
 
+	  It is safe to say 'Y' here
Index: linux-2.6/arch/powerpc/platforms/82xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/82xx/Kconfig
@@ -1,21 +1,19 @@
-choice
-	prompt "82xx Board Type"
-	depends on PPC_82xx
-	default MPC82xx_ADS
+config PPC_82xx
+	bool "Freescale 82xx"
+	depends on PPC_MULTIPLATFORM && 6xx
+	select CPU_603e
 
 config MPC82xx_ADS
 	bool "Freescale MPC82xx ADS"
+	depends on PPC_82xx
 	select DEFAULT_UIMAGE
 	select PQ2ADS
 	select 8272
 	select 8260
 	select FSL_SOC
-	select CPU_603e
 	help
 	This option enables support for the MPC8272 ADS board
 
-endchoice
-
 config PQ2ADS
 	bool
 	default n
Index: linux-2.6/arch/powerpc/platforms/83xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/83xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/83xx/Kconfig
@@ -1,35 +1,38 @@
-choice
-	prompt "83xx Board Type"
-	depends on PPC_83xx
-	default MPC834x_MDS
+config PPC_83xx
+	bool "Freescale 83xx"
+	depends on PPC_MULTIPLATFORM && 6xx
+	select FSL_SOC
+	select 83xx
+	select WANT_DEVICE_TREE
+	select CPU_603e
 
 config MPC8313_RDB
 	bool "Freescale MPC8313 RDB"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
-	select CPU_603e
 	help
 	  This option enables support for the MPC8313 RDB board.
 
 config MPC832x_MDS
 	bool "Freescale MPC832x MDS"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
-	select CPU_603e
 	help
 	  This option enables support for the MPC832x MDS evaluation board.
 
 config MPC832x_RDB
 	bool "Freescale MPC832x RDB"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
-	select CPU_603e
 	help
 	  This option enables support for the MPC8323 RDB board.
 
 config MPC834x_MDS
 	bool "Freescale MPC834x MDS"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
-	select CPU_603e
 	help
 	  This option enables support for the MPC 834x MDS evaluation board.
 
@@ -40,8 +43,8 @@ config MPC834x_MDS
 
 config MPC834x_ITX
 	bool "Freescale MPC834x ITX"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
-	select CPU_603e
 	help
 	  This option enables support for the MPC 834x ITX evaluation board.
 
@@ -50,14 +53,12 @@ config MPC834x_ITX
 
 config MPC836x_MDS
 	bool "Freescale MPC836x MDS"
+	depends on PPC_83xx
 	select DEFAULT_UIMAGE
 	select QUICC_ENGINE
-	select CPU_603e
 	help
 	  This option enables support for the MPC836x MDS Processor Board.
 
-endchoice
-
 config PPC_MPC831x
 	bool
 	select PPC_UDBG_16550
Index: linux-2.6/arch/powerpc/platforms/85xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/85xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/85xx/Kconfig
@@ -1,28 +1,27 @@
-choice
-	prompt "Machine Type"
-	depends on PPC_85xx
-	default MPC8540_ADS
-
 config MPC8540_ADS
 	bool "Freescale MPC8540 ADS"
+	depends on PPC_85xx
 	select DEFAULT_UIMAGE
 	help
 	  This option enables support for the MPC 8540 ADS board
 
 config MPC8560_ADS
 	bool "Freescale MPC8560 ADS"
+	depends on PPC_85xx
 	select DEFAULT_UIMAGE
 	help
 	  This option enables support for the MPC 8560 ADS board
 
 config MPC85xx_CDS
 	bool "Freescale MPC85xx CDS"
+	depends on PPC_85xx
 	select DEFAULT_UIMAGE
 	help
 	  This option enables support for the MPC85xx CDS board
 
 config MPC85xx_MDS
 	bool "Freescale MPC85xx MDS"
+	depends on PPC_85xx
 	select DEFAULT_UIMAGE
 #	select QUICC_ENGINE
 	help
@@ -30,12 +29,11 @@ config MPC85xx_MDS
 
 config MPC8544_DS
 	bool "Freescale MPC8544 DS"
+	depends on PPC_85xx
 	select DEFAULT_UIMAGE
 	help
 	  This option enables support for the MPC8544 DS board
 
-endchoice
-
 config MPC8540
 	bool
 	select PPC_UDBG_16550
Index: linux-2.6/arch/powerpc/platforms/86xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/86xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/86xx/Kconfig
@@ -1,18 +1,21 @@
-choice
-	prompt "86xx Board Type"
-	depends on PPC_86xx
-	default MPC8641_HPCN
+config PPC_86xx
+	bool "Freescale 86xx"
+	depends on PPC_MULTIPLATFORM && 6xx
+	select FSL_SOC
+	select FSL_PCIE
+	select ALTIVEC
+	select CPU_74xx
+	help
+	  The Freescale E600 SoCs have 74xx cores.
 
 config MPC8641_HPCN
 	bool "Freescale MPC8641 HPCN"
+	depends on PPC_86xx
 	select PPC_I8259
 	select DEFAULT_UIMAGE
-	select CPU_74xx
 	help
 	  This option enables support for the MPC8641 HPCN board.
 
-endchoice
-
 config MPC8641
 	bool
 	select PPC_INDIRECT_PCI
Index: linux-2.6/arch/powerpc/platforms/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/Kconfig
+++ linux-2.6/arch/powerpc/platforms/Kconfig
@@ -1,50 +1,16 @@
 menu "Platform support"
 
-choice
-	prompt "Machine type"
-	depends on PPC64 || 6xx
-	default PPC_MULTIPLATFORM
-
 config PPC_MULTIPLATFORM
-	bool "Generic desktop/server/laptop"
-	help
-	  Select this option if configuring for an IBM pSeries or
-	  RS/6000 machine, an Apple machine, or a PReP, CHRP,
-	  Maple or Cell-based machine.
-
-config EMBEDDED6xx
-	bool "Embedded 6xx/7xx/7xxx-based board"
-	depends on PPC32 && (BROKEN||BROKEN_ON_SMP)
-
-config PPC_82xx
-	bool "Freescale 82xx"
-	depends on 6xx
-
-config PPC_83xx
-	bool "Freescale 83xx"
-	depends on 6xx
-	select FSL_SOC
-	select 83xx
-	select WANT_DEVICE_TREE
-
-config PPC_86xx
-	bool "Freescale 86xx"
-	depends on 6xx
-	select FSL_SOC
-	select FSL_PCIE
-	select ALTIVEC
-	help
-	  The Freescale E600 SoCs have 74xx cores.
-endchoice
+	def_bool y
+	depends on 6xx || PPC64
 
 config CLASSIC32
 	def_bool y
-	depends on 6xx && PPC_MULTIPLATFORM
+	depends on 6xx
 
 source "arch/powerpc/platforms/pseries/Kconfig"
 source "arch/powerpc/platforms/iseries/Kconfig"
 source "arch/powerpc/platforms/chrp/Kconfig"
-source "arch/powerpc/platforms/52xx/Kconfig"
 source "arch/powerpc/platforms/powermac/Kconfig"
 source "arch/powerpc/platforms/prep/Kconfig"
 source "arch/powerpc/platforms/maple/Kconfig"
@@ -53,6 +19,7 @@ source "arch/powerpc/platforms/celleb/Kc
 source "arch/powerpc/platforms/ps3/Kconfig"
 source "arch/powerpc/platforms/cell/Kconfig"
 source "arch/powerpc/platforms/8xx/Kconfig"
+source "arch/powerpc/platforms/52xx/Kconfig"
 source "arch/powerpc/platforms/82xx/Kconfig"
 source "arch/powerpc/platforms/83xx/Kconfig"
 source "arch/powerpc/platforms/85xx/Kconfig"
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -1,9 +1,11 @@
-choice
-	prompt "Machine Type"
-	depends on EMBEDDED6xx
+config EMBEDDED6xx
+	bool "Embedded 6xx"
+	depends on 6xx
 
 config LINKSTATION
 	bool "Linkstation / Kurobox(HG) from Buffalo"
+	depends on EMBEDDED6xx
+	depends on (BROKEN || BROKEN_ON_SMP)
 	select MPIC
 	select FSL_SOC
 	select PPC_UDBG_16550 if SERIAL_8250
@@ -18,6 +20,8 @@ config LINKSTATION
 
 config MPC7448HPC2
 	bool "Freescale MPC7448HPC2(Taiga)"
+	depends on EMBEDDED6xx
+	depends on (BROKEN || BROKEN_ON_SMP)
 	select PCI
 	select TSI108_BRIDGE
 	select DEFAULT_UIMAGE
@@ -29,6 +33,7 @@ config MPC7448HPC2
 
 config PPC_HOLLY
 	bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)"
+	depends on EMBEDDED6xx
 	select TSI108_BRIDGE
 	select PPC_UDBG_16550
 	select CPU_7xx
@@ -39,13 +44,13 @@ config PPC_HOLLY
 
 config PPC_PRPMC2800
 	bool "Motorola-PrPMC2800"
+	depends on EMBEDDED6xx
 	select MV64X60
 	select NOT_COHERENT_CACHE
 	select WANT_DEVICE_TREE
 	select CPU_74xx
 	help
 	  This option enables support for the Motorola PrPMC2800 board
-endchoice
 
 config TSI108_BRIDGE
 	bool

--

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 4/9] mpc82xx_ads build fix
  2007-06-16  0:05 ` [patch 4/9] mpc82xx_ads build fix arnd
@ 2007-06-16  7:37   ` Stephen Rothwell
  2007-06-16  9:33     ` [updated PATCH] " Arnd Bergmann
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Rothwell @ 2007-06-16  7:37 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

On Sat, 16 Jun 2007 02:05:15 +0200 arnd@arndb.de wrote:
>
> needed for 6xx allyesconfig
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> --- linux-2.6.orig/arch/powerpc/platforms/82xx/mpc82xx_ads.c
> +++ linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
> @@ -49,7 +49,7 @@
>  #include <linux/fs_enet_pd.h>
>  
>  #include <sysdev/fsl_soc.h>
> -#include <../sysdev/cpm2_pic.h>
> +#include <../../sysdev/cpm2_pic.h>

Does the include of <sysdev/fsl_soc.h> work?  If so, then you should use
<sysdev/cpm2_pic.h>. If not, then you have worse problems :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [updated PATCH] mpc82xx_ads build fix
  2007-06-16  7:37   ` Stephen Rothwell
@ 2007-06-16  9:33     ` Arnd Bergmann
  0 siblings, 0 replies; 25+ messages in thread
From: Arnd Bergmann @ 2007-06-16  9:33 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, paulus

This seems to be a small artifact of the conversion from arch/ppc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
Index: linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ linux-2.6/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -49,7 +49,7 @@
 #include <linux/fs_enet_pd.h>
 
 #include <sysdev/fsl_soc.h>
-#include <../sysdev/cpm2_pic.h>
+#include <sysdev/cpm2_pic.h>
 
 #include "pq2ads.h"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 2/9] autoselect optimal -mcpu= flag by platform
  2007-06-16  0:05 ` [patch 2/9] autoselect optimal -mcpu= flag by platform arnd
@ 2007-06-17 14:29   ` Kumar Gala
  2007-06-17 16:11     ` Segher Boessenkool
  2007-06-17 17:20     ` Arnd Bergmann
  2007-06-29  5:58   ` Paul Mackerras
  1 sibling, 2 replies; 25+ messages in thread
From: Kumar Gala @ 2007-06-17 14:29 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus


On Jun 15, 2007, at 7:05 PM, arnd@arndb.de wrote:

> We can choose the -mcpu= gcc flags for compiling the kernel
> based on the platform that we build for. In case of multiplatform
> kernels, this chooses a setting for a common subset.
>
> When using a platform type that can use different CPUs, a
> new option CONFIG_PPC_CPU_SELECTION can be enabled to select
> more specifically which CPUs the kernel will be able to
> run on.
>
> This replaces the CONFIG_POWER4_ONLY option with an much more
> generic approach.
>
> Also, when CONFIG_PPC_CPU_SELECTION is set, it is now possible
> to select a CPU to tune for by means of the -mtune= option.
>
> I tried to be very careful when coding the specific rules into
> the Kconfig language, but it would be good to have a few
> people sanity-checking them.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Is there a reason we don't distinguish between 7400/7410 and 74{4,5} 
x?  Is it because we dont have any discrete systems with just a 7400  
on it?

Also I'd suggest we have the config options be a 1:1 matching for the  
-mcpu/-mtune options in gcc for the following cases:

> +	default "-mcpu=750" if CPU_7xx
> +	default "-mcpu=7450" if CPU_74xx
> +	default "-mcpu=860" if PPC_8xx
> +	default "-mcpu=8540" if PPC_85xx

So if in the future we have code scheduling for 8599 or some other  
variant we don't have to go change the Kconfig just add to it.

- k

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 5/9] kill isa_{io,mem}_base definitions for !PCI
  2007-06-16  0:05 ` [patch 5/9] kill isa_{io,mem}_base definitions for !PCI arnd
@ 2007-06-17 14:33   ` Kumar Gala
  2007-06-17 15:32     ` Arnd Bergmann
  0 siblings, 1 reply; 25+ messages in thread
From: Kumar Gala @ 2007-06-17 14:33 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus


On Jun 15, 2007, at 7:05 PM, arnd@arndb.de wrote:

> When CONFIG_PCI is disabled, the definitions for isa_io_base,
> isa_mem_base and pci_dram_offset are entirely unused, but they
> can result in link failure because they are defined in multiple
> places.
>
> The easiest fix is to just remove all these definitions.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

[snip]


> Index: linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> +++ linux-2.6/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
> @@ -54,12 +54,6 @@
>
>  #define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
>
> -#ifndef CONFIG_PCI
> -isa_io_base = MPC7448_HPC2_ISA_IO_BASE;
> -isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
> -pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
> -#endif
> -
>  extern void _nmask_and_or_msr(unsigned long nmask, unsigned long  
> or_val);

can you remove the defines in mpc7448_hpc2.h since they are appear to  
only be used here.

[snip]

- k

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 7/9] disallow building powermac and tsi108 without PCI
  2007-06-16  0:05 ` [patch 7/9] disallow building powermac and tsi108 " arnd
@ 2007-06-17 14:35   ` Kumar Gala
  2007-06-17 15:32     ` Arnd Bergmann
  0 siblings, 1 reply; 25+ messages in thread
From: Kumar Gala @ 2007-06-17 14:35 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus


On Jun 15, 2007, at 7:05 PM, arnd@arndb.de wrote:

> The TSI108 code and the 32 bit powermac and chrp platforms
> have dependency on PCI that is not easy or desirable to get rid
> of.
>
> The easiest fix is to always select CONFIG_PCI if one of those
> platforms is enabled.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Index: linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/Kconfig
> +++ linux-2.6/arch/powerpc/platforms/embedded6xx/Kconfig
> @@ -18,6 +18,7 @@ config LINKSTATION
>
>  config MPC7448HPC2
>  	bool "Freescale MPC7448HPC2(Taiga)"
> +	select PCI
>  	select TSI108_BRIDGE
>  	select DEFAULT_UIMAGE
>  	select PPC_UDBG_16550
> @@ -31,6 +32,7 @@ config PPC_HOLLY
>  	select TSI108_BRIDGE
>  	select PPC_UDBG_16550
>  	select CPU_7xx
> +	select PCI
>  	help
>  	  Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
>  	  Board with TSI108/9 bridge (Hickory/Holly)

Any reason we just don't add the select to the config TSI108_BRIDGE  
so any future TSI108 based systems get it as well?

- k

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
  2007-06-16  0:05 ` [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection arnd
@ 2007-06-17 14:42   ` Kumar Gala
  2007-07-11 15:35   ` Mark A. Greer
  1 sibling, 0 replies; 25+ messages in thread
From: Kumar Gala @ 2007-06-17 14:42 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus


On Jun 15, 2007, at 7:05 PM, arnd@arndb.de wrote:

> The cores used in the MPC82xx/83xx/86xx embedded controllers are  
> very similar
> to those in the 32 bit general-purpose processors, so it makes  
> sense to
> treat them as the same CPU family.
>
> Choosing between the embedded platforms and the multiplatform code is
> now done in the platform menu, but functionally everything stays the
> same.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Index: linux-2.6/arch/powerpc/platforms/Kconfig
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/Kconfig
> +++ linux-2.6/arch/powerpc/platforms/Kconfig
> @@ -2,7 +2,7 @@ menu "Platform support"
>
>  choice
>  	prompt "Machine type"
> -	depends on PPC64 || CLASSIC32
> +	depends on PPC64 || 6xx
>  	default PPC_MULTIPLATFORM
>
>  config PPC_MULTIPLATFORM
> @@ -16,8 +16,31 @@ config EMBEDDED6xx
>  	bool "Embedded 6xx/7xx/7xxx-based board"
>  	depends on PPC32 && (BROKEN||BROKEN_ON_SMP)
>
> +config PPC_82xx
> +	bool "Freescale 82xx"
> +	depends on 6xx
> +
> +config PPC_83xx
> +	bool "Freescale 83xx"
> +	depends on 6xx
> +	select FSL_SOC
> +	select 83xx
> +	select WANT_DEVICE_TREE
> +
> +config PPC_86xx
> +	bool "Freescale 86xx"
> +	depends on 6xx
> +	select FSL_SOC
> +	select FSL_PCIE
> +	select ALTIVEC
> +	help
> +	  The Freescale E600 SoCs have 74xx cores.
>  endchoice

is it feasible to have 83xx/86xx go 'multiplatform' but not 82xx?   
There are more annoyances about CPM2 support that are not clean such  
that you couldn't build support for different 82xx systems into the  
same kernel.  Today we only support one 82xx system in ARCH=powerpc,  
but I'd rather we not move it until we clean up those issues.  (the  
same is true of 85xx).

- k

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 7/9] disallow building powermac and tsi108 without PCI
  2007-06-17 14:35   ` Kumar Gala
@ 2007-06-17 15:32     ` Arnd Bergmann
  0 siblings, 0 replies; 25+ messages in thread
From: Arnd Bergmann @ 2007-06-17 15:32 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus

On Sunday 17 June 2007, Kumar Gala wrote:
> > @@ -31,6 +32,7 @@ config PPC_HOLLY
> > =A0=A0=A0=A0=A0=A0select TSI108_BRIDGE
> > =A0=A0=A0=A0=A0=A0select PPC_UDBG_16550
> > =A0=A0=A0=A0=A0=A0select CPU_7xx
> > +=A0=A0=A0=A0=A0select PCI
> > =A0=A0=A0=A0=A0=A0help
> > =A0=A0=A0=A0=A0=A0 =A0Select PPC_HOLLY if configuring for an IBM 750GX/=
CL Eval
> > =A0=A0=A0=A0=A0=A0 =A0Board with TSI108/9 bridge (Hickory/Holly)
>=20
> Any reason we just don't add the select to the config TSI108_BRIDGE =A0
> so any future TSI108 based systems get it as well?
>=20

Sounds good, I'll update the patch.

I also noticed that part of the TSI108 code appears to be written
so support !PCI configurations, so in theory it should be possible
fix up the problems with that. The reason I didn't was that it
ended up as quite a big number of changes that I couldn't properly
test.
The other question is of course whether it's useful to allow it.

	Arnd <><

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 5/9] kill isa_{io,mem}_base definitions for !PCI
  2007-06-17 14:33   ` Kumar Gala
@ 2007-06-17 15:32     ` Arnd Bergmann
  0 siblings, 0 replies; 25+ messages in thread
From: Arnd Bergmann @ 2007-06-17 15:32 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus

On Sunday 17 June 2007, Kumar Gala wrote:
> > -#ifndef CONFIG_PCI
> > -isa_io_base =3D MPC7448_HPC2_ISA_IO_BASE;
> > -isa_mem_base =3D MPC7448_HPC2_ISA_MEM_BASE;
> > -pci_dram_offset =3D MPC7448_HPC2_PCI_MEM_OFFSET;
> > -#endif
> > -
> > =A0extern void _nmask_and_or_msr(unsigned long nmask, unsigned long =A0
> > or_val);
>=20
> can you remove the defines in mpc7448_hpc2.h since they are appear to =A0
> only be used here.

Ok, good idea.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 2/9] autoselect optimal -mcpu= flag by platform
  2007-06-17 14:29   ` Kumar Gala
@ 2007-06-17 16:11     ` Segher Boessenkool
  2007-06-17 17:20     ` Arnd Bergmann
  1 sibling, 0 replies; 25+ messages in thread
From: Segher Boessenkool @ 2007-06-17 16:11 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus, arnd

> Is there a reason we don't distinguish between 7400/7410 and 74{4,5}
> x?  Is it because we dont have any discrete systems with just a 7400
> on it?

It's quite important for 74[01]0 systems to not run
code tuned for 7450.  Older Macs have such CPUs, the
user should have the option to tune for it.

> Also I'd suggest we have the config options be a 1:1 matching for the
> -mcpu/-mtune options in gcc for the following cases:
>
>> +	default "-mcpu=750" if CPU_7xx
>> +	default "-mcpu=7450" if CPU_74xx
>> +	default "-mcpu=860" if PPC_8xx
>> +	default "-mcpu=8540" if PPC_85xx

It would be good to do that for all cases, unfortunately
GCC doesn't recognise all CPU/core names as -mcpu options.


Segher

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 2/9] autoselect optimal -mcpu= flag by platform
  2007-06-17 14:29   ` Kumar Gala
  2007-06-17 16:11     ` Segher Boessenkool
@ 2007-06-17 17:20     ` Arnd Bergmann
  2007-06-17 17:46       ` Segher Boessenkool
  1 sibling, 1 reply; 25+ messages in thread
From: Arnd Bergmann @ 2007-06-17 17:20 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus

On Sunday 17 June 2007, you wrote:
> 
> On Jun 15, 2007, at 7:05 PM, arnd@arndb.de wrote:
> 
> > We can choose the -mcpu= gcc flags for compiling the kernel
> > based on the platform that we build for. In case of multiplatform
> > kernels, this chooses a setting for a common subset.
> >
> > When using a platform type that can use different CPUs, a
> > new option CONFIG_PPC_CPU_SELECTION can be enabled to select
> > more specifically which CPUs the kernel will be able to
> > run on.
> >
> > This replaces the CONFIG_POWER4_ONLY option with an much more
> > generic approach.
> >
> > Also, when CONFIG_PPC_CPU_SELECTION is set, it is now possible
> > to select a CPU to tune for by means of the -mtune= option.
> >
> > I tried to be very careful when coding the specific rules into
> > the Kconfig language, but it would be good to have a few
> > people sanity-checking them.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Is there a reason we don't distinguish between 7400/7410 and 74{4,5} 
> x?  Is it because we dont have any discrete systems with just a 7400  
> on it?

No, I just didn't know that there was a difference. I had looked at the
gcc source and found that gcc produces the same instruction for both,
but I didn't bother to look at the optimizations. From all I can
tell, -mcpu=7400 is identical to -mcpu=7450 -mtune=750.

Can you look through the patch again to see which of the platforms
that have a 7400 instead of 7450 type CPUs?

> Also I'd suggest we have the config options be a 1:1 matching for the  
> -mcpu/-mtune options in gcc for the following cases:
> 
> > +	default "-mcpu=750" if CPU_7xx
> > +	default "-mcpu=7450" if CPU_74xx
> > +	default "-mcpu=860" if PPC_8xx
> > +	default "-mcpu=8540" if PPC_85xx
> 
> So if in the future we have code scheduling for 8599 or some other  
> variant we don't have to go change the Kconfig just add to it.

I'm not sure I understand what you would like to see this, would you
like them to be simply renamed to CPU_750/CPU_7450/CPU_860/CPU_8540
or rather add more options for 740/801/821/823/8548, which are
treated as aliases of the others?

For 74xx, I guess you already convinced me and for 85xx, I'll trust
your word if you think that we will need future flags in the future.

I'm not so sure about 7xx and 8xx though. I could not find any
code in gcc that knows about the difference between the CPUs in
either family, and it doesn't seem like anyone is working on
changing that. Anything I missed there?

	Arnd <><

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 2/9] autoselect optimal -mcpu= flag by platform
  2007-06-17 17:20     ` Arnd Bergmann
@ 2007-06-17 17:46       ` Segher Boessenkool
  0 siblings, 0 replies; 25+ messages in thread
From: Segher Boessenkool @ 2007-06-17 17:46 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, paulus

>> Is there a reason we don't distinguish between 7400/7410 and 74{4,5}
>> x?  Is it because we dont have any discrete systems with just a 7400
>> on it?
>
> No, I just didn't know that there was a difference. I had looked at the
> gcc source and found that gcc produces the same instruction for both,
> but I didn't bother to look at the optimizations. From all I can
> tell, -mcpu=7400 is identical to -mcpu=7450 -mtune=750.

7400 is pretty much like a 750 + AltiVec and a few deeper
queues.  The "FP full" stall is also gone IIRC, or maybe
that was not before the 7450.  Nothing that GCC knows how
to model, anyway.

>> Also I'd suggest we have the config options be a 1:1 matching for the
>> -mcpu/-mtune options in gcc for the following cases:
>>
>>> +	default "-mcpu=750" if CPU_7xx
>>> +	default "-mcpu=7450" if CPU_74xx
>>> +	default "-mcpu=860" if PPC_8xx
>>> +	default "-mcpu=8540" if PPC_85xx
>>
>> So if in the future we have code scheduling for 8599 or some other
>> variant we don't have to go change the Kconfig just add to it.
>
> I'm not sure I understand what you would like to see this, would you
> like them to be simply renamed to CPU_750/CPU_7450/CPU_860/CPU_8540
> or rather add more options for 740/801/821/823/8548, which are
> treated as aliases of the others?

GCC treats many of those as aliases, too.


Segher

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 2/9] autoselect optimal -mcpu= flag by platform
  2007-06-16  0:05 ` [patch 2/9] autoselect optimal -mcpu= flag by platform arnd
  2007-06-17 14:29   ` Kumar Gala
@ 2007-06-29  5:58   ` Paul Mackerras
  1 sibling, 0 replies; 25+ messages in thread
From: Paul Mackerras @ 2007-06-29  5:58 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev

arnd@arndb.de writes:

> +config PPC_CPU_SELECTION
> +	bool "Advanced CPU selection"

Please provide some reasonable help for this option.  As it is at the
moment, I get asked whether I want "Advanced CPU selection" - whatever
that is - and as a user I have no clue whether I want it or not.  The
prompt is pretty uninformative.  Do I want to be able to select an
advanced CPU?  Well I suppose I do - who would want to select a
retarded CPU? - but that's presumably not what the question's about.

Paul.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
  2007-06-16  0:05 ` [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection arnd
  2007-06-17 14:42   ` Kumar Gala
@ 2007-07-11 15:35   ` Mark A. Greer
  2007-07-11 20:33     ` Arnd Bergmann
  1 sibling, 1 reply; 25+ messages in thread
From: Mark A. Greer @ 2007-07-11 15:35 UTC (permalink / raw)
  To: arnd; +Cc: linuxppc-dev, paulus

On Sat, Jun 16, 2007 at 02:05:12AM +0200, arnd@arndb.de wrote:
> The cores used in the MPC82xx/83xx/86xx embedded controllers are very similar
> to those in the 32 bit general-purpose processors, so it makes sense to
> treat them as the same CPU family.
> 
> Choosing between the embedded platforms and the multiplatform code is
> now done in the platform menu, but functionally everything stays the
> same.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Index: linux-2.6/arch/powerpc/platforms/Kconfig
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/Kconfig
> +++ linux-2.6/arch/powerpc/platforms/Kconfig

> @@ -16,8 +16,31 @@ config EMBEDDED6xx
>  	bool "Embedded 6xx/7xx/7xxx-based board"
>  	depends on PPC32 && (BROKEN||BROKEN_ON_SMP)

<snip>

> +config CLASSIC32
> +	def_bool y
> +	depends on 6xx && PPC_MULTIPLATFORM
		       ^^^^^^^^^^^^^^^^^^^^
Arnd, is this really what you wanted?  With it, none of the embedded
classics have CLASSIC32 defined which means they don't get TAU or
ALTIVEC defined which isn't good.

Mark

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
  2007-07-11 15:35   ` Mark A. Greer
@ 2007-07-11 20:33     ` Arnd Bergmann
  2007-07-11 21:19       ` Segher Boessenkool
  2007-07-11 23:47       ` Mark A. Greer
  0 siblings, 2 replies; 25+ messages in thread
From: Arnd Bergmann @ 2007-07-11 20:33 UTC (permalink / raw)
  To: Mark A. Greer; +Cc: linuxppc-dev, paulus

On Wednesday 11 July 2007, Mark A. Greer wrote:

> > +config CLASSIC32
> > +	def_bool y
> > +	depends on 6xx && PPC_MULTIPLATFORM
> 		       ^^^^^^^^^^^^^^^^^^^^
> Arnd, is this really what you wanted?  With it, none of the embedded
> classics have CLASSIC32 defined which means they don't get TAU or
> ALTIVEC defined which isn't good.

Sorry, this was the result of a wrong patch reordering. In my initial
patch set I ended up with 6xx == CLASSIC32 and PPC_MULTIPLATFORM=y,
but then I backed out a few patches in the middle.

I guess the best is to do another patch that moves PPC_EMBEDDED6xx into
PPC_MULTIPLATFORM again and leaves this one as it is.
Alternatively, we could kill CONFIG_CLASSIC32 entirely as it is used
only in a few places. Especially after I resubmit my CPU type selection
patch again, which allows you do it in a more fine grained way.

Which systems in particular should allow CONFIG_TAU? Is there a more
specific dependency than (6xx && !(82xx || 83xx || 86xx || 52xx))?

	Arnd <><

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
  2007-07-11 20:33     ` Arnd Bergmann
@ 2007-07-11 21:19       ` Segher Boessenkool
  2007-07-11 23:47       ` Mark A. Greer
  1 sibling, 0 replies; 25+ messages in thread
From: Segher Boessenkool @ 2007-07-11 21:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, paulus

> Which systems in particular should allow CONFIG_TAU? Is there a more
> specific dependency than (6xx && !(82xx || 83xx || 86xx || 52xx))?

7xx and 7xxx CPUs (G3 and G4).  Nothing earlier (according to
the IEEE article introducing the TAU), maybe some later units
have it though (but I think they have incompatible things with
a similar function).

TAU is broken on many CPU models btw (it works, just gives
back nonsense results).


Segher

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection
  2007-07-11 20:33     ` Arnd Bergmann
  2007-07-11 21:19       ` Segher Boessenkool
@ 2007-07-11 23:47       ` Mark A. Greer
  1 sibling, 0 replies; 25+ messages in thread
From: Mark A. Greer @ 2007-07-11 23:47 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linuxppc-dev, paulus

On Wed, Jul 11, 2007 at 10:33:51PM +0200, Arnd Bergmann wrote:
> On Wednesday 11 July 2007, Mark A. Greer wrote:
> 
> > > +config CLASSIC32
> > > +	def_bool y
> > > +	depends on 6xx && PPC_MULTIPLATFORM
> > 		       ^^^^^^^^^^^^^^^^^^^^
> > Arnd, is this really what you wanted?  With it, none of the embedded
> > classics have CLASSIC32 defined which means they don't get TAU or
> > ALTIVEC defined which isn't good.
> 
> Sorry, this was the result of a wrong patch reordering. In my initial
> patch set I ended up with 6xx == CLASSIC32 and PPC_MULTIPLATFORM=y,
> but then I backed out a few patches in the middle.

Ah, okay.

> I guess the best is to do another patch that moves PPC_EMBEDDED6xx into
> PPC_MULTIPLATFORM again and leaves this one as it is.
> Alternatively, we could kill CONFIG_CLASSIC32 entirely as it is used
> only in a few places. Especially after I resubmit my CPU type selection
> patch again, which allows you do it in a more fine grained way.

Yes, it seems like getting rid of CLASSIC32 would be okay since it is
hardly used.

> Which systems in particular should allow CONFIG_TAU? Is there a more
> specific dependency than (6xx && !(82xx || 83xx || 86xx || 52xx))?

I think Segher pretty much answered this.  We definitely need to get
ALTIVEC back soon for 74xx--currently SIGILL's my init when booting.
Since it sounds like you're still tweaking things in Kconfig files,
I'll leave it to you to take care of it.  If not, just let me know.

Mark

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-07-11 23:44 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070616000511.712667424@arndb.de>
2007-06-16  0:05 ` [patch 1/9] move 82xx/83xx/86xx Kconfig options to platform selection arnd
2007-06-17 14:42   ` Kumar Gala
2007-07-11 15:35   ` Mark A. Greer
2007-07-11 20:33     ` Arnd Bergmann
2007-07-11 21:19       ` Segher Boessenkool
2007-07-11 23:47       ` Mark A. Greer
2007-06-16  0:05 ` [patch 2/9] autoselect optimal -mcpu= flag by platform arnd
2007-06-17 14:29   ` Kumar Gala
2007-06-17 16:11     ` Segher Boessenkool
2007-06-17 17:20     ` Arnd Bergmann
2007-06-17 17:46       ` Segher Boessenkool
2007-06-29  5:58   ` Paul Mackerras
2007-06-16  0:05 ` [patch 3/9] rename add_bridge to avoid namespace clashes arnd
2007-06-16  0:05 ` [patch 4/9] mpc82xx_ads build fix arnd
2007-06-16  7:37   ` Stephen Rothwell
2007-06-16  9:33     ` [updated PATCH] " Arnd Bergmann
2007-06-16  0:05 ` [patch 5/9] kill isa_{io,mem}_base definitions for !PCI arnd
2007-06-17 14:33   ` Kumar Gala
2007-06-17 15:32     ` Arnd Bergmann
2007-06-16  0:05 ` [patch 6/9] fix building without PCI arnd
2007-06-16  0:05 ` [patch 7/9] disallow building powermac and tsi108 " arnd
2007-06-17 14:35   ` Kumar Gala
2007-06-17 15:32     ` Arnd Bergmann
2007-06-16  0:05 ` [patch 8/9] fix conflicting mpc85xx board headers arnd
2007-06-16  0:05 ` [patch 9/9] enable multiplatform support for embedded boards arnd

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).