Skip to content

Commit

Permalink
m68k/Kconfig: Separate classic m68k and coldfire early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Greg Ungerer committed Dec 30, 2011
1 parent fbe3364 commit ad8f955
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
66 changes: 38 additions & 28 deletions arch/m68k/Kconfig.cpu
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
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
bool
select CPU_HAS_NO_BITFIELDS
Expand All @@ -20,20 +52,6 @@ config MCPU32
based on the 68020 processor. For the most part it is used in
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
bool "68020 support"
depends on MMU
Expand Down Expand Up @@ -103,10 +121,13 @@ config M68360
help
Motorola 68360 processor support.

endif # M68KCLASSIC

if COLDFIRE

config M5206
bool "MCF5206"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_MBAR
help
Expand All @@ -115,7 +136,6 @@ config M5206
config M5206e
bool "MCF5206e"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_MBAR
help
Expand All @@ -124,7 +144,6 @@ config M5206e
config M520x
bool "MCF520x"
depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT
help
Expand All @@ -133,7 +152,6 @@ config M520x
config M523x
bool "MCF523x"
depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
Expand All @@ -143,7 +161,6 @@ config M523x
config M5249
bool "MCF5249"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_MBAR
help
Expand All @@ -155,7 +172,6 @@ config M527x
config M5271
bool "MCF5271"
depends on !MMU
select COLDFIRE
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
Expand All @@ -166,7 +182,6 @@ config M5271
config M5272
bool "MCF5272"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_MBAR
help
Expand All @@ -175,7 +190,6 @@ config M5272
config M5275
bool "MCF5275"
depends on !MMU
select COLDFIRE
select M527x
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
Expand All @@ -186,7 +200,6 @@ config M5275
config M528x
bool "MCF528x"
depends on !MMU
select COLDFIRE
select GENERIC_CLOCKEVENTS
select HAVE_CACHE_SPLIT
select HAVE_IPSBAR
Expand All @@ -196,7 +209,6 @@ config M528x
config M5307
bool "MCF5307"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_CACHE_CB
select HAVE_MBAR
Expand All @@ -206,15 +218,13 @@ config M5307
config M532x
bool "MCF532x"
depends on !MMU
select COLDFIRE
select HAVE_CACHE_CB
help
Freescale (Motorola) ColdFire 532x processor support.

config M5407
bool "MCF5407"
depends on !MMU
select COLDFIRE
select COLDFIRE_SW_A7
select HAVE_CACHE_CB
select HAVE_MBAR
Expand All @@ -227,7 +237,6 @@ config M54xx
config M547x
bool "MCF547x"
depends on !MMU
select COLDFIRE
select M54xx
select HAVE_CACHE_CB
select HAVE_MBAR
Expand All @@ -237,13 +246,14 @@ config M547x
config M548x
bool "MCF548x"
depends on !MMU
select COLDFIRE
select M54xx
select HAVE_CACHE_CB
select HAVE_MBAR
help
Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support.

endif # COLDFIRE


comment "Processor Specific Options"

Expand Down
4 changes: 4 additions & 0 deletions arch/m68k/Kconfig.machine
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
comment "Machine Types"

if M68KCLASSIC

config AMIGA
bool "Amiga support"
depends on MMU
Expand Down Expand Up @@ -130,6 +132,8 @@ config SUN3

If you don't want to compile a kernel exclusively for a Sun 3, say N.

endif # M68KCLASSIC

config PILOT
bool

Expand Down

0 comments on commit ad8f955

Please sign in to comment.