]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
m68k: mcf530x: move CPU type to Kconfig and refactor config.mk
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 27 Mar 2015 08:01:07 +0000 (17:01 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:34:20 +0000 (14:34 +0200)
This commit intends to stop grepping CPU type in
arch/m68k/cpu/mcf530x/config.mk.

Move the CPU type config options from include/configs/amcore.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf530x/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/mcf530x/config.mk
include/configs/amcore.h

index 0bd780ae2f800fde670a76351e69ef1a9628711c..8f9b4a71673725c66e5e2bf5d2c78c67cfbca5ae 100644 (file)
@@ -11,6 +11,9 @@ config MCF520x
 config MCF52x2
        bool
 
+config MCF530x
+       bool
+
 # processor type
 config M5208
        bool
@@ -40,6 +43,10 @@ config M5282
        bool
        select MCF52x2
 
+config M5307
+       bool
+       select MCF530x
+
 choice
        prompt "Target select"
 
@@ -114,6 +121,7 @@ config TARGET_M5485EVB
 
 config TARGET_AMCORE
        bool "Support AMCORE"
+       select M5307
 
 endchoice
 
index aef72d70c50d474db7f390d26eb81f2a7835ac0c..25845aa32313e75707cb3292798ae8b57e432698 100644 (file)
@@ -4,9 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:"%"=%).h
-is5307:=$(shell grep CONFIG_M5307 $(cfg))
+cpuflags-$(CONFIG_M5307) := -mcpu=5307
 
-ifneq (,$(findstring CONFIG_M5307,$(is5307)))
-PLATFORM_CPPFLAGS += -mcpu=5307
-endif
+PLATFORM_CPPFLAGS += $(cpuflags-y)
index 37aa1249fcedbfd2ca8c1de8fbe091d551f9ed86..229fa5a6c2d5a2f573615e57be31140bc80eb5e0 100644 (file)
@@ -12,9 +12,6 @@
 #define CONFIG_AMCORE
 #define CONFIG_HOSTNAME                        AMCORE
 
-#define CONFIG_MCF530x
-#define CONFIG_M5307
-
 #define CONFIG_MCFTMR
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT           0