All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 13/17] m68k: remove redundant CPU family definition
Date: Mon, 17 Mar 2014 17:53:08 +0900	[thread overview]
Message-ID: <1395046392-1212-14-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1395046392-1212-1-git-send-email-yamada.m@jp.panasonic.com>

 - CONFIG_MCF5227x
 - CONFIG_MCF523x
 - CONFIG_MCF52x2
 - CONFIG_MCF520x
 - CONFIG_MCF532x
 - CONFIG_MCF5301x
 - CONFIG_MCF5441x
 - CONFIG_MCF5445x
 - CONFIG_MCF547x_8x
are defined in Kconfig.

Remove the redundant definition in config headers.

Besides, refactor tricky grepping
in arch/m68k/cpu/{mcf532x,mcf5445x}/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 arch/m68k/cpu/mcf532x/config.mk  | 12 +++---------
 arch/m68k/cpu/mcf5445x/config.mk | 10 +++-------
 include/configs/M5208EVBE.h      |  1 -
 include/configs/M52277EVB.h      |  1 -
 include/configs/M5235EVB.h       |  1 -
 include/configs/M5249EVB.h       |  1 -
 include/configs/M5253DEMO.h      |  1 -
 include/configs/M5253EVBE.h      |  1 -
 include/configs/M5272C3.h        |  1 -
 include/configs/M5275EVB.h       |  1 -
 include/configs/M5282EVB.h       |  1 -
 include/configs/M53017EVB.h      |  1 -
 include/configs/M5329EVB.h       |  1 -
 include/configs/M5373EVB.h       |  1 -
 include/configs/M54418TWR.h      |  1 -
 include/configs/M54451EVB.h      |  1 -
 include/configs/M54455EVB.h      |  1 -
 include/configs/M5475EVB.h       |  1 -
 include/configs/M5485EVB.h       |  1 -
 include/configs/TASREG.h         |  1 -
 include/configs/astro_mcf5373l.h |  1 -
 include/configs/cobra5272.h      |  1 -
 include/configs/eb_cpu5282.h     |  1 -
 23 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk
index 2efb60f..92846c9 100644
--- a/arch/m68k/cpu/mcf532x/config.mk
+++ b/arch/m68k/cpu/mcf532x/config.mk
@@ -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)	:= $(call cc-option,-mcpu=53015)
+cpuflags-$(CONFIG_MCF532x)	:= $(call cc-option,-mcpu=5329)
 
-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) -fPIC
diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk
index 13f8a9f..726fcd3 100644
--- a/arch/m68k/cpu/mcf5445x/config.mk
+++ b/arch/m68k/cpu/mcf5445x/config.mk
@@ -9,14 +9,10 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-cfg=$(srctree)/include/configs/$(CONFIG_SYS_CONFIG_NAME:"%"=%).h
-is5441x:=$(shell grep CONFIG_MCF5441x $(cfg))
+cpuflags-$(CONFIG_MCF5441x)	:= $(call cc-option,-mcpu=54418)
+cpuflags-$(CONFIG_MCF5445x)	:= $(call cc-option,-mcpu=54455)
 
-ifneq (,$(findstring CONFIG_MCF5441x,$(is5441x)))
-PLATFORM_CPPFLAGS += -mcpu=54418 -fPIC
-else
-PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
-endif
+PLATFORM_CPPFLAGS += $(cpuflags-y) -fPIC
 
 ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
 ifneq (,$(findstring GOT,$(shell $(LD) --help)))
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index 0b22106..33fad48 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -14,7 +14,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF520x	1	/* define processor family */
 #define CONFIG_M5208		/* define processor type */
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index 2b58045..30b6577 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5227x	1	/* define processor family */
 #define CONFIG_M52277		/* define processor type */
 #define CONFIG_M52277EVB	/* M52277EVB board */
 
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index f2e5154..1fc4da6 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF523x	1	/* define processor family */
 #define CONFIG_M5235		/* define processor type */
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h
index 58cf6be..fec4752 100644
--- a/include/configs/M5249EVB.h
+++ b/include/configs/M5249EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF52x2	1		/* define processor family */
 #define CONFIG_M5249			/* define processor type */
 
 #define CONFIG_MCFTMR
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index 767065e..5bbd594 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -7,7 +7,6 @@
 #ifndef _M5253DEMO_H
 #define _M5253DEMO_H
 
-#define CONFIG_MCF52x2	1	/* define processor family */
 #define CONFIG_M5253		/* define processor type */
 #define CONFIG_M5253DEMO	/* define board type */
 
diff --git a/include/configs/M5253EVBE.h b/include/configs/M5253EVBE.h
index 0db23b4..c0342f6 100644
--- a/include/configs/M5253EVBE.h
+++ b/include/configs/M5253EVBE.h
@@ -8,7 +8,6 @@
 #ifndef _M5253EVBE_H
 #define _M5253EVBE_H
 
-#define CONFIG_MCF52x2	1	/* define processor family */
 #define CONFIG_M5253		/* define processor type */
 #define CONFIG_M5253EVBE	/* define board type */
 
diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h
index 1c2981d..b039523 100644
--- a/include/configs/M5272C3.h
+++ b/include/configs/M5272C3.h
@@ -17,7 +17,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF52x2	1	/* define processor family */
 #define CONFIG_M5272		/* define processor type */
 
 #define CONFIG_MCFTMR
diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h
index 596c38f..e1df79b 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -21,7 +21,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF52x2	1		/* define processor family */
 #define CONFIG_M5275			/* define processor type */
 #define CONFIG_M5275EVB			/* define board type */
 
diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h
index f27d1e7..4c9a4fe 100644
--- a/include/configs/M5282EVB.h
+++ b/include/configs/M5282EVB.h
@@ -17,7 +17,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define	CONFIG_MCF52x2	1	/* define processor family */
 #define CONFIG_M5282		/* define processor type */
 
 #define CONFIG_MCFTMR
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index 7baae44..29e6112 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5301x	1	/* define processor family */
 #define CONFIG_M53015		/* define processor type */
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index d09c132..6c69cc9 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF532x	1	/* define processor family */
 #define CONFIG_M5329		/* define processor type */
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index d1c5c5a..14eaa59 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF532x	1	/* define processor family */
 #define CONFIG_M5373		/* define processor type */
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index d3155e4..aa7e312 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5441x	1	/* define processor family */
 #define CONFIG_M54418		/* define processor type */
 #define CONFIG_M54418TWR	/* M54418TWR board */
 
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index a52a827..ac240ca 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5445x	1	/* define processor family */
 #define CONFIG_M54451		/* define processor type */
 #define CONFIG_M54451EVB	/* M54451EVB board */
 
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 880684c..1d854ac 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF5445x	1	/* define processor family */
 #define CONFIG_M54455		/* define processor type */
 #define CONFIG_M54455EVB	/* M54455EVB board */
 
diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h
index 4443ff0..1118f25 100644
--- a/include/configs/M5475EVB.h
+++ b/include/configs/M5475EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF547x_8x 1	/* define processor family */
 #define CONFIG_M547x		/* define processor type */
 #define CONFIG_M5475		/* define processor type */
 
diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h
index 35065a0..8c7f257 100644
--- a/include/configs/M5485EVB.h
+++ b/include/configs/M5485EVB.h
@@ -18,7 +18,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF547x_8x 1	/* define processor family */
 #define CONFIG_M548x		/* define processor type */
 #define CONFIG_M5485		/* define processor type */
 
diff --git a/include/configs/TASREG.h b/include/configs/TASREG.h
index e2353f8..322220d 100644
--- a/include/configs/TASREG.h
+++ b/include/configs/TASREG.h
@@ -22,7 +22,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_MCF52x2	1		/* define processor family */
 #define CONFIG_M5249			/* define processor type */
 
 #define CONFIG_MISC_INIT_R      1       /* call misc_init_r()           */
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 5803cbc..3c6878f 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -47,7 +47,6 @@
 
 /* it seems not clear yet which processor defines we should use */
 #define CONFIG_MCF537x			/* define processor family */
-#define CONFIG_MCF532x	1		/* define processor family */
 #define CONFIG_M5373			/* define processor type */
 #define CONFIG_ASTRO5373L		/* define board type */
 
diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h
index 3cfb54f..a86c716 100644
--- a/include/configs/cobra5272.h
+++ b/include/configs/cobra5272.h
@@ -31,7 +31,6 @@
  * ---
  */
 
-#define CONFIG_MCF52x2	1		/* define processor family */
 #define CONFIG_M5272			/* define processor type */
 
 /* ---
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index a986af2..9391712 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -15,7 +15,6 @@
  * High Level Configuration Options (easy to change)                    *
  *----------------------------------------------------------------------*/
 
-#define CONFIG_MCF52x2	1		/* define processor family */
 #define CONFIG_M5282			/* define processor type */
 
 #define CONFIG_MISC_INIT_R
-- 
1.8.3.2

  parent reply	other threads:[~2014-03-17  8:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  8:52 [U-Boot] [RFC PATCH 0/17] Version 0 of Kconfig for U-Boot Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 01/17] kconfig: import Kconfig files from Linux v3.13 tag Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 02/17] kconfig: add basic Kconfig files Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 03/17] Do not apply: tools: add gendefconfigs Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 04/17] kconfig: add defconfig files for all boards Masahiro Yamada
2014-03-18  3:08   ` Stephen Warren
2014-03-19  3:16     ` Masahiro Yamada
2014-03-19  3:39       ` Stephen Warren
2014-03-19  4:50         ` Masahiro Yamada
2014-03-19  9:56           ` Wolfgang Denk
2014-03-19 10:51             ` Masahiro Yamada
2014-03-19 12:37               ` Daniel Schwierzeck
2014-03-19 14:20                 ` Wolfgang Denk
2014-03-19 16:06                   ` Tom Rini
2014-03-19 23:48                     ` Masahiro Yamada
2014-03-21 13:41                       ` Tom Rini
2014-03-20  0:11                 ` Masahiro Yamada
2014-03-20 13:17                   ` Daniel Schwierzeck
2014-03-21 18:05                     ` Tom Rini
2014-03-22 17:14                       ` Daniel Schwierzeck
2014-03-24  6:35                         ` Masahiro Yamada
2014-03-24 20:35                           ` Daniel Schwierzeck
2014-03-28  2:25                             ` Masahiro Yamada
2014-03-28 20:35                               ` Daniel Schwierzeck
2014-03-31  8:56                                 ` Masahiro Yamada
2014-03-19 19:58           ` Stephen Warren
2014-03-19 12:54   ` Tom Rini
2014-03-19 22:58     ` Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 05/17] include: define CONFIG_SPL and CONFIG_TPL as 1 Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 06/17] m68k: define processor family CONFIGs " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 07/17] kconfig: switch over to Kconfig Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 08/17] MAKEALL: adjust for Kconfig Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 09/17] buildman: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 10/17] kconfig: delete redundant CONFIG_${ARCH} definition Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 11/17] sh: remove redundant CPU family definition Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 12/17] sparc: " Masahiro Yamada
2014-03-17  8:53 ` Masahiro Yamada [this message]
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 14/17] powerpc: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 15/17] kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 16/17] kconfig: remove old script Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 17/17] kconfig: add CONFIG_CROSS_COMPILE Masahiro Yamada
2014-03-21  2:15 ` [U-Boot] [RFC PATCH 0/17] Version 0 of Kconfig for U-Boot Simon Glass
2014-03-24  5:58   ` Masahiro Yamada
2014-03-24  7:30     ` Wolfgang Denk
2014-03-24  7:52       ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395046392-1212-14-git-send-email-yamada.m@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.