Move the CPU type config options from include/configs/M5235EVB.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf523x/config.mk.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Alison Wang <alison.wang@freescale.com>
Cc: Angelo Dureghello <angelo@sysam.it>
 config MCF52x2
        bool
 
+config MCF523x
+       bool
+
 config MCF530x
        bool
 
        bool
        select MCF520x
 
+config M5235
+       bool
+       select MCF523x
+
 config M5249
        bool
        select MCF52x2
 
 config TARGET_M5235EVB
        bool "Support M5235EVB"
+       select M5235
 
 config TARGET_COBRA5272
        bool "Support cobra5272"
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC
+cpuflags-$(CONFIG_M5235) := -mcpu=5235 -fPIC
+
+PLATFORM_CPPFLAGS += $(cpuflags-y)
 
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF523x         /* define processor family */
-#define CONFIG_M5235           /* define processor type */
 
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT           (0)