]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
m68k: mcf532x: move CPU type to Kconfig and refactor config.mk
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 27 Mar 2015 08:01:08 +0000 (17:01 +0900)
committerTom Rini <trini@konsulko.com>
Sat, 28 Mar 2015 13:03:09 +0000 (09:03 -0400)
This commit intends to stop grepping CPU type in
arch/m68k/cpu/mcf532x/config.mk.

Move the CPU type config options from include/configs/*.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf532x/config.mk.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Alison Wang <alison.wang@freescale.com>
Cc: Angelo Dureghello <angelo@sysam.it>
arch/m68k/Kconfig
arch/m68k/cpu/mcf532x/config.mk
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/astro_mcf5373l.h

index 8f9b4a71673725c66e5e2bf5d2c78c67cfbca5ae..67308eb0034d769518e1519378053fcd0bd4ada0 100644 (file)
@@ -14,6 +14,15 @@ config MCF52x2
 config MCF530x
        bool
 
+config MCF5301x
+       bool
+
+config MCF532x
+       bool
+
+config MCF537x
+       bool
+
 # processor type
 config M5208
        bool
@@ -47,6 +56,19 @@ config M5307
        bool
        select MCF530x
 
+config M53015
+       bool
+       select MCF5301x
+
+config M5329
+       bool
+       select MCF532x
+
+config M5373
+       bool
+       select MCF532x
+       select MCF537x
+
 choice
        prompt "Target select"
 
@@ -94,15 +116,19 @@ config TARGET_M5282EVB
 
 config TARGET_ASTRO_MCF5373L
        bool "Support astro_mcf5373l"
+       select M5373
 
 config TARGET_M53017EVB
        bool "Support M53017EVB"
+       select M53015
 
 config TARGET_M5329EVB
        bool "Support M5329EVB"
+       select M5329
 
 config TARGET_M5373EVB
        bool "Support M5373EVB"
+       select M5373
 
 config TARGET_M54418TWR
        bool "Support M54418TWR"
index 2efb60f04ad0c351f686daf26422e9fda2730173..470d22f165f8d0a1bf9d86223bb28f5646dbc16f 100644 (file)
@@ -7,13 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:"%"=%).h
-is5301x:=$(shell grep CONFIG_MCF5301x $(cfg))
-is532x:=$(shell grep CONFIG_MCF532x $(cfg))
+cpuflags-$(CONFIG_MCF5301x) := -mcpu=53015 -fPIC
+cpuflags-$(CONFIG_MCF532x)  := -mcpu=5329 -fPIC
 
-ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x)))
-PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC
-endif
-ifneq (,$(findstring CONFIG_MCF532x,$(is532x)))
-PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
-endif
+PLATFORM_CPPFLAGS += $(cpuflags-y)
index a100d9f31628980b439fea1068f3395ccf285d84..83ac70fe317f0614402ea595df78b09a92200731 100644 (file)
@@ -18,8 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5301x                /* define processor family */
-#define CONFIG_M53015          /* define processor type */
 
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT           (0)
index 78ea384375577174abbe0d8a6fa94ec94b1df958..795f3592b6dd4dd8f4440d669692844d36db717a 100644 (file)
@@ -18,8 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF532x         /* define processor family */
-#define CONFIG_M5329           /* define processor type */
 
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT           (0)
index 849c26562a40924d5b503cfd4b60b8e805a50db8..d75b43cdd3343186fafc025c9de79e038335f1b0 100644 (file)
@@ -18,8 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF532x         /* define processor family */
-#define CONFIG_M5373           /* define processor type */
 
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT           (0)
index fa64a688a44af63ee7e20e6c8f29d8be090fa478..de837cfe08b9ba7e65783d854497f631d74fb9c8 100644 (file)
 #error No card type defined!
 #endif
 
-/*
- * Define processor
- * possible values for Urmel board: only Coldfire M5373 processor supported
- * (please do not change)
- */
-
-/* it seems not clear yet which processor defines we should use */
-#define CONFIG_MCF537x                 /* define processor family */
-#define CONFIG_MCF532x                 /* define processor family */
-#define CONFIG_M5373                   /* define processor type */
 #define CONFIG_ASTRO5373L              /* define board type */
 
 /* Command line configuration */