Commit bdde65951659fb78d3b4bbf99743a74522f03a05

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent d4a9b17df5

m68k: mcf530x: move CPU type to Kconfig and refactor config.mk

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>

Showing 3 changed files with 10 additions and 8 deletions Side-by-side Diff

... ... @@ -11,6 +11,9 @@
11 11 config MCF52x2
12 12 bool
13 13  
  14 +config MCF530x
  15 + bool
  16 +
14 17 # processor type
15 18 config M5208
16 19 bool
... ... @@ -40,6 +43,10 @@
40 43 bool
41 44 select MCF52x2
42 45  
  46 +config M5307
  47 + bool
  48 + select MCF530x
  49 +
43 50 choice
44 51 prompt "Target select"
45 52  
... ... @@ -114,6 +121,7 @@
114 121  
115 122 config TARGET_AMCORE
116 123 bool "Support AMCORE"
  124 + select M5307
117 125  
118 126 endchoice
119 127  
arch/m68k/cpu/mcf530x/config.mk
... ... @@ -4,10 +4,7 @@
4 4 # SPDX-License-Identifier: GPL-2.0+
5 5 #
6 6  
7   -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:"%"=%).h
8   -is5307:=$(shell grep CONFIG_M5307 $(cfg))
  7 +cpuflags-$(CONFIG_M5307) := -mcpu=5307
9 8  
10   -ifneq (,$(findstring CONFIG_M5307,$(is5307)))
11   -PLATFORM_CPPFLAGS += -mcpu=5307
12   -endif
  9 +PLATFORM_CPPFLAGS += $(cpuflags-y)
include/configs/amcore.h
... ... @@ -12,9 +12,6 @@
12 12 #define CONFIG_AMCORE
13 13 #define CONFIG_HOSTNAME AMCORE
14 14  
15   -#define CONFIG_MCF530x
16   -#define CONFIG_M5307
17   -
18 15 #define CONFIG_MCFTMR
19 16 #define CONFIG_MCFUART
20 17 #define CONFIG_SYS_UART_PORT 0