Commit c155ab74f78794979944e5a49d87776cc460c6c9

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent bdde659516

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

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>

Showing 6 changed files with 29 additions and 25 deletions Side-by-side Diff

... ... @@ -14,6 +14,15 @@
14 14 config MCF530x
15 15 bool
16 16  
  17 +config MCF5301x
  18 + bool
  19 +
  20 +config MCF532x
  21 + bool
  22 +
  23 +config MCF537x
  24 + bool
  25 +
17 26 # processor type
18 27 config M5208
19 28 bool
... ... @@ -47,6 +56,19 @@
47 56 bool
48 57 select MCF530x
49 58  
  59 +config M53015
  60 + bool
  61 + select MCF5301x
  62 +
  63 +config M5329
  64 + bool
  65 + select MCF532x
  66 +
  67 +config M5373
  68 + bool
  69 + select MCF532x
  70 + select MCF537x
  71 +
50 72 choice
51 73 prompt "Target select"
52 74  
53 75  
54 76  
55 77  
... ... @@ -94,15 +116,19 @@
94 116  
95 117 config TARGET_ASTRO_MCF5373L
96 118 bool "Support astro_mcf5373l"
  119 + select M5373
97 120  
98 121 config TARGET_M53017EVB
99 122 bool "Support M53017EVB"
  123 + select M53015
100 124  
101 125 config TARGET_M5329EVB
102 126 bool "Support M5329EVB"
  127 + select M5329
103 128  
104 129 config TARGET_M5373EVB
105 130 bool "Support M5373EVB"
  131 + select M5373
106 132  
107 133 config TARGET_M54418TWR
108 134 bool "Support M54418TWR"
arch/m68k/cpu/mcf532x/config.mk
... ... @@ -7,14 +7,8 @@
7 7 # SPDX-License-Identifier: GPL-2.0+
8 8 #
9 9  
10   -cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:"%"=%).h
11   -is5301x:=$(shell grep CONFIG_MCF5301x $(cfg))
12   -is532x:=$(shell grep CONFIG_MCF532x $(cfg))
  10 +cpuflags-$(CONFIG_MCF5301x) := -mcpu=53015 -fPIC
  11 +cpuflags-$(CONFIG_MCF532x) := -mcpu=5329 -fPIC
13 12  
14   -ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x)))
15   -PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC
16   -endif
17   -ifneq (,$(findstring CONFIG_MCF532x,$(is532x)))
18   -PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
19   -endif
  13 +PLATFORM_CPPFLAGS += $(cpuflags-y)
include/configs/M53017EVB.h
... ... @@ -18,8 +18,6 @@
18 18 * High Level Configuration Options
19 19 * (easy to change)
20 20 */
21   -#define CONFIG_MCF5301x /* define processor family */
22   -#define CONFIG_M53015 /* define processor type */
23 21  
24 22 #define CONFIG_MCFUART
25 23 #define CONFIG_SYS_UART_PORT (0)
include/configs/M5329EVB.h
... ... @@ -18,8 +18,6 @@
18 18 * High Level Configuration Options
19 19 * (easy to change)
20 20 */
21   -#define CONFIG_MCF532x /* define processor family */
22   -#define CONFIG_M5329 /* define processor type */
23 21  
24 22 #define CONFIG_MCFUART
25 23 #define CONFIG_SYS_UART_PORT (0)
include/configs/M5373EVB.h
... ... @@ -18,8 +18,6 @@
18 18 * High Level Configuration Options
19 19 * (easy to change)
20 20 */
21   -#define CONFIG_MCF532x /* define processor family */
22   -#define CONFIG_M5373 /* define processor type */
23 21  
24 22 #define CONFIG_MCFUART
25 23 #define CONFIG_SYS_UART_PORT (0)
include/configs/astro_mcf5373l.h
... ... @@ -39,16 +39,6 @@
39 39 #error No card type defined!
40 40 #endif
41 41  
42   -/*
43   - * Define processor
44   - * possible values for Urmel board: only Coldfire M5373 processor supported
45   - * (please do not change)
46   - */
47   -
48   -/* it seems not clear yet which processor defines we should use */
49   -#define CONFIG_MCF537x /* define processor family */
50   -#define CONFIG_MCF532x /* define processor family */
51   -#define CONFIG_M5373 /* define processor type */
52 42 #define CONFIG_ASTRO5373L /* define board type */
53 43  
54 44 /* Command line configuration */