Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: pci config cleanup

Choosing PCI or not at config time is allowed on some
platforms via an if expression in arch/powerpc/Kconfig.
To add a new platform with PCI support selectable at
config time, you must change the if expression. This
patch makes this easier by changing:
bool "PCI support" if <long expression>
to
bool "PCI support" if PPC_PCI_CHOICE
and adding select PPC_PCI_CHOICE to all the config nodes that
were previously in the PCI if expression.

Platforms with unconditional PCI support continue to
just select PCI in their config nodes.

Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

John Rigby and committed by
Kumar Gala
b500563b 36aa7965

+19 -5
+8 -4
arch/powerpc/Kconfig
··· 568 568 config MCA 569 569 bool 570 570 571 + # Platforms that what PCI turned unconditionally just do select PCI 572 + # in their config node. Platforms that want to choose at config 573 + # time should select PPC_PCI_CHOICE 574 + config PPC_PCI_CHOICE 575 + bool 576 + 571 577 config PCI 572 - bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 573 - || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ 574 - || PPC_PS3 || 44x 575 - default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \ 578 + bool "PCI support" if PPC_PCI_CHOICE 579 + default y if !40x && !CPM2 && !8xx && !PPC_83xx \ 576 580 && !PPC_85xx && !PPC_86xx 577 581 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx 578 582 default PCI_QSPAN if !4xx && !CPM2 && 8xx
+1
arch/powerpc/platforms/52xx/Kconfig
··· 3 3 depends on PPC_MULTIPLATFORM && PPC32 4 4 select FSL_SOC 5 5 select PPC_CLOCK 6 + select PPC_PCI_CHOICE 6 7 7 8 config PPC_MPC5200_SIMPLE 8 9 bool "Generic support for simple MPC5200 based boards"
+1
arch/powerpc/platforms/83xx/Kconfig
··· 2 2 bool "83xx-based boards" 3 3 depends on 6xx && PPC_MULTIPLATFORM 4 4 select PPC_UDBG_16550 5 + select PPC_PCI_CHOICE 5 6 select PPC_INDIRECT_PCI 6 7 select FSL_SOC 7 8 select IPIC
+1 -1
arch/powerpc/platforms/85xx/Kconfig
··· 2 2 bool "Machine Type" 3 3 depends on PPC_85xx 4 4 select PPC_UDBG_16550 5 - select PPC_INDIRECT_PCI if PCI 6 5 select MPIC 6 + select PPC_PCI_CHOICE 7 7 select FSL_PCI if PCI 8 8 select SERIAL_8250_SHARE_IRQ if SERIAL_8250 9 9 default y
+2
arch/powerpc/platforms/86xx/Kconfig
··· 34 34 35 35 config MPC8641 36 36 bool 37 + select PPC_PCI_CHOICE 37 38 select FSL_PCI if PCI 38 39 select PPC_UDBG_16550 39 40 select MPIC ··· 42 41 43 42 config MPC8610 44 43 bool 44 + select PPC_PCI_CHOICE 45 45 select FSL_PCI if PCI 46 46 select PPC_UDBG_16550 47 47 select MPIC
+1
arch/powerpc/platforms/Kconfig
··· 253 253 depends on MPC85xx || 8260 254 254 select CPM 255 255 select PPC_LIB_RHEAP 256 + select PPC_PCI_CHOICE 256 257 help 257 258 The CPM2 (Communications Processor Module) is a coprocessor on 258 259 embedded CPUs made by Freescale. Selecting this option means that
+2
arch/powerpc/platforms/Kconfig.cputype
··· 42 42 select PPC_DCR_NATIVE 43 43 select PPC_UDBG_16550 44 44 select 4xx_SOC 45 + select PPC_PCI_CHOICE 45 46 46 47 config 44x 47 48 bool "AMCC 44x" 48 49 select PPC_DCR_NATIVE 49 50 select PPC_UDBG_16550 50 51 select 4xx_SOC 52 + select PPC_PCI_CHOICE 51 53 52 54 config E200 53 55 bool "Freescale e200"
+1
arch/powerpc/platforms/iseries/Kconfig
··· 2 2 bool "IBM Legacy iSeries" 3 3 depends on PPC_MULTIPLATFORM && PPC64 4 4 select PPC_INDIRECT_IO 5 + select PPC_PCI_CHOICE if EMBEDDED 5 6 6 7 menu "iSeries device drivers" 7 8 depends on PPC_ISERIES
+1
arch/powerpc/platforms/ps3/Kconfig
··· 8 8 select USB_ARCH_HAS_EHCI 9 9 select USB_EHCI_BIG_ENDIAN_MMIO 10 10 select MEMORY_HOTPLUG 11 + select PPC_PCI_CHOICE 11 12 help 12 13 This option enables support for the Sony PS3 game console 13 14 and other platforms using the PS3 hypervisor. Enabling this
+1
arch/powerpc/platforms/pseries/Kconfig
··· 7 7 select RTAS_ERROR_LOGGING 8 8 select PPC_UDBG_16550 9 9 select PPC_NATIVE 10 + select PPC_PCI_CHOICE if EMBEDDED 10 11 default y 11 12 12 13 config PPC_SPLPAR