m68k/Kconfig: Separate classic m68k and coldfire early

While you can build multiplatform kernels for machines with classic
m68k processors, you cannot mix support for classic m68k and coldfire
processors. To avoid such hybrid kernels, introduce CONFIG_M68KCLASSIC
as an antipole for CONFIG_COLDFIRE, and make all specific processor
support depend on one of them.
All classic m68k machine support also needs to depend on this.

The defaults (CONFIG_M68KCLASSIC if MMU, CONFIG_COLDFIRE if !MMU) are
chosen such to make most of the existing configs build and work.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
This commit is contained in:
Geert Uytterhoeven 2011-12-26 20:32:02 +01:00 committed by Greg Ungerer
parent fbe3364ac4
commit ad8f955daf
2 changed files with 42 additions and 28 deletions

View file

@ -1,5 +1,37 @@
comment "Processor Type" comment "Processor Type"
choice
prompt "CPU family support"
default M68KCLASSIC if MMU
default COLDFIRE if !MMU
help
The Freescale (was Motorola) M68K family of processors implements
the full 68000 processor instruction set.
The Freescale ColdFire family of processors is a modern derivitive
of the 68000 processor family. They are mainly targeted at embedded
applications, and are all System-On-Chip (SOC) devices, as opposed
to stand alone CPUs. They implement a subset of the original 68000
processor instruction set.
If you anticipate running this kernel on a computer with a classic
MC68xxx processor, select M68KCLASSIC.
If you anticipate running this kernel on a computer with a ColdFire
processor, select COLDFIRE.
config M68KCLASSIC
bool "Classic M68K CPU family support"
config COLDFIRE
bool "Coldfire CPU family support"
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select CPU_HAS_NO_BITFIELDS
select CPU_HAS_NO_MULDIV64
select GENERIC_CSUM
endchoice
if M68KCLASSIC
config M68000 config M68000
bool bool
select CPU_HAS_NO_BITFIELDS select CPU_HAS_NO_BITFIELDS
@ -20,20 +52,6 @@ config MCPU32
based on the 68020 processor. For the most part it is used in based on the 68020 processor. For the most part it is used in
System-On-Chip parts, and does not contain a paging MMU. System-On-Chip parts, and does not contain a paging MMU.
config COLDFIRE
bool
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select CPU_HAS_NO_BITFIELDS
select CPU_HAS_NO_MULDIV64
select GENERIC_CSUM
help
The Freescale ColdFire family of processors is a modern derivitive
of the 68000 processor family. They are mainly targeted at embedded
applications, and are all System-On-Chip (SOC) devices, as opposed
to stand alone CPUs. They implement a subset of the original 68000
processor instruction set.
config M68020 config M68020
bool "68020 support" bool "68020 support"
depends on MMU depends on MMU
@ -103,10 +121,13 @@ config M68360
help help
Motorola 68360 processor support. Motorola 68360 processor support.
endif # M68KCLASSIC
if COLDFIRE
config M5206 config M5206
bool "MCF5206" bool "MCF5206"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_MBAR select HAVE_MBAR
help help
@ -115,7 +136,6 @@ config M5206
config M5206e config M5206e
bool "MCF5206e" bool "MCF5206e"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_MBAR select HAVE_MBAR
help help
@ -124,7 +144,6 @@ config M5206e
config M520x config M520x
bool "MCF520x" bool "MCF520x"
depends on !MMU depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT select HAVE_CACHE_SPLIT
help help
@ -133,7 +152,6 @@ config M520x
config M523x config M523x
bool "MCF523x" bool "MCF523x"
depends on !MMU depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT select HAVE_CACHE_SPLIT
select HAVE_IPSBAR select HAVE_IPSBAR
@ -143,7 +161,6 @@ config M523x
config M5249 config M5249
bool "MCF5249" bool "MCF5249"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_MBAR select HAVE_MBAR
help help
@ -155,7 +172,6 @@ config M527x
config M5271 config M5271
bool "MCF5271" bool "MCF5271"
depends on !MMU depends on !MMU
select COLDFIRE
select M527x select M527x
select HAVE_CACHE_SPLIT select HAVE_CACHE_SPLIT
select HAVE_IPSBAR select HAVE_IPSBAR
@ -166,7 +182,6 @@ config M5271
config M5272 config M5272
bool "MCF5272" bool "MCF5272"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_MBAR select HAVE_MBAR
help help
@ -175,7 +190,6 @@ config M5272
config M5275 config M5275
bool "MCF5275" bool "MCF5275"
depends on !MMU depends on !MMU
select COLDFIRE
select M527x select M527x
select HAVE_CACHE_SPLIT select HAVE_CACHE_SPLIT
select HAVE_IPSBAR select HAVE_IPSBAR
@ -186,7 +200,6 @@ config M5275
config M528x config M528x
bool "MCF528x" bool "MCF528x"
depends on !MMU depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT select HAVE_CACHE_SPLIT
select HAVE_IPSBAR select HAVE_IPSBAR
@ -196,7 +209,6 @@ config M528x
config M5307 config M5307
bool "MCF5307" bool "MCF5307"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_CACHE_CB select HAVE_CACHE_CB
select HAVE_MBAR select HAVE_MBAR
@ -206,7 +218,6 @@ config M5307
config M532x config M532x
bool "MCF532x" bool "MCF532x"
depends on !MMU depends on !MMU
select COLDFIRE
select HAVE_CACHE_CB select HAVE_CACHE_CB
help help
Freescale (Motorola) ColdFire 532x processor support. Freescale (Motorola) ColdFire 532x processor support.
@ -214,7 +225,6 @@ config M532x
config M5407 config M5407
bool "MCF5407" bool "MCF5407"
depends on !MMU depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7 select COLDFIRE_SW_A7
select HAVE_CACHE_CB select HAVE_CACHE_CB
select HAVE_MBAR select HAVE_MBAR
@ -227,7 +237,6 @@ config M54xx
config M547x config M547x
bool "MCF547x" bool "MCF547x"
depends on !MMU depends on !MMU
select COLDFIRE
select M54xx select M54xx
select HAVE_CACHE_CB select HAVE_CACHE_CB
select HAVE_MBAR select HAVE_MBAR
@ -237,13 +246,14 @@ config M547x
config M548x config M548x
bool "MCF548x" bool "MCF548x"
depends on !MMU depends on !MMU
select COLDFIRE
select M54xx select M54xx
select HAVE_CACHE_CB select HAVE_CACHE_CB
select HAVE_MBAR select HAVE_MBAR
help help
Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support.
endif # COLDFIRE
comment "Processor Specific Options" comment "Processor Specific Options"

View file

@ -1,5 +1,7 @@
comment "Machine Types" comment "Machine Types"
if M68KCLASSIC
config AMIGA config AMIGA
bool "Amiga support" bool "Amiga support"
depends on MMU depends on MMU
@ -130,6 +132,8 @@ config SUN3
If you don't want to compile a kernel exclusively for a Sun 3, say N. If you don't want to compile a kernel exclusively for a Sun 3, say N.
endif # M68KCLASSIC
config PILOT config PILOT
bool bool