Blackfin: move CONFIG_BFIN_CPU back to board config.h
authorMike Frysinger <vapier@gentoo.org>
Thu, 23 Dec 2010 19:58:37 +0000 (14:58 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 8 Apr 2011 04:44:26 +0000 (00:44 -0400)
This is a revert of 821ad16fa9900c as Wolfgang doesn't like the new code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
59 files changed:
arch/blackfin/config.mk
arch/blackfin/include/asm/config.h
arch/blackfin/lib/board.c
board/bct-brettl2/config.mk
board/bf518f-ezbrd/config.mk
board/bf526-ezbrd/config.mk
board/bf527-ad7160-eval/config.mk
board/bf527-ezkit/config.mk
board/bf527-sdp/config.mk
board/bf533-ezkit/config.mk
board/bf533-stamp/config.mk
board/bf537-minotaur/config.mk
board/bf537-pnav/config.mk
board/bf537-srv1/config.mk
board/bf537-stamp/config.mk
board/bf538f-ezkit/config.mk
board/bf548-ezkit/config.mk
board/bf561-acvilon/config.mk
board/bf561-ezkit/config.mk
board/blackstamp/config.mk
board/blackvme/config.mk
board/cm-bf527/config.mk
board/cm-bf533/config.mk
board/cm-bf537e/config.mk
board/cm-bf537u/config.mk
board/cm-bf548/config.mk
board/cm-bf561/config.mk
board/ibf-dsp561/config.mk
board/ip04/config.mk
board/tcm-bf518/config.mk
board/tcm-bf537/config.mk
include/configs/bct-brettl2.h
include/configs/bf518f-ezbrd.h
include/configs/bf526-ezbrd.h
include/configs/bf527-ad7160-eval.h
include/configs/bf527-ezkit.h
include/configs/bf527-sdp.h
include/configs/bf533-ezkit.h
include/configs/bf533-stamp.h
include/configs/bf537-minotaur.h
include/configs/bf537-pnav.h
include/configs/bf537-srv1.h
include/configs/bf537-stamp.h
include/configs/bf538f-ezkit.h
include/configs/bf548-ezkit.h
include/configs/bf561-acvilon.h
include/configs/bf561-ezkit.h
include/configs/blackstamp.h
include/configs/blackvme.h
include/configs/cm-bf527.h
include/configs/cm-bf533.h
include/configs/cm-bf537e.h
include/configs/cm-bf537u.h
include/configs/cm-bf548.h
include/configs/cm-bf561.h
include/configs/ibf-dsp561.h
include/configs/ip04.h
include/configs/tcm-bf518.h
include/configs/tcm-bf537.h

index 4102c6f..95cf7db 100644 (file)
@@ -25,6 +25,13 @@ CROSS_COMPILE ?= bfin-uclinux-
 
 STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin
 
+ifeq ($(CONFIG_BFIN_CPU),)
+CONFIG_BFIN_CPU := \
+       $(shell awk '$$2 == "CONFIG_BFIN_CPU" { print $$3 }' \
+               $(src)include/configs/$(BOARD).h)
+else
+CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
+endif
 CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
 
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
@@ -34,7 +41,6 @@ LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
-PLATFORM_CPPFLAGS += -DBFIN_CPU='"$(CONFIG_BFIN_CPU)"'
 PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU)
 
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
index 0437252..f0f3a39 100644 (file)
 /* Some of our defines use this (like CONFIG_SYS_GBL_DATA_ADDR) */
 #include <asm-offsets.h>
 
+/* Sanity check CONFIG_BFIN_CPU */
+#ifndef CONFIG_BFIN_CPU
+# error CONFIG_BFIN_CPU: your board config needs to define this
+#endif
+
 #ifndef CONFIG_BFIN_SCRATCH_REG
 # define CONFIG_BFIN_SCRATCH_REG retn
 #endif
index 59a0810..2b1f78c 100644 (file)
@@ -254,7 +254,7 @@ void board_init_f(ulong bootflag)
        memset((void *)bd, 0, sizeof(bd_t));
 
        bd->bi_r_version = version_string;
-       bd->bi_cpu = BFIN_CPU;
+       bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
        bd->bi_board_name = BFIN_BOARD_NAME;
        bd->bi_vco = get_vco();
        bd->bi_cclk = get_cclk();
index 6e7e543..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf536-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index d941092..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf518-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index 83fd42e..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf526-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index 05c7d3b..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf527-0.2
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index b10c3d2..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf527-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index 47c2989..ce8f75c 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf527-0.2
-
 CFLAGS_lib_generic += -O2
 CFLAGS_lzma += -O2
 
index c45a197..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf533-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index c45a197..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf533-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index f7aa8ef..4bb6506 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
index b48bb00..25f4c15 100644 (file)
@@ -23,4 +23,3 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
index f7aa8ef..4bb6506 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6
index 2bb6b79..7c023d1 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 9bae4d1..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf538-0.4
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 97b64b9..7f38b14 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf548-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 5633b3b..4c811ba 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf561-0.5
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 8b22d0d..4c811ba 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf561-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 5bf4189..25f4c15 100644 (file)
@@ -23,4 +23,3 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf532-0.5
index 620104a..dfcba5c 100644 (file)
@@ -22,5 +22,3 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-
-CONFIG_BFIN_CPU = bf561-0.5
index b10c3d2..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf527-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index c45a197..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf533-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index d5d6dd9..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index d5d6dd9..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index a28a426..5adb6fc 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf548-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 8b22d0d..4c811ba 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf561-0.3
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index 7d25d0b..afa7141 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf561-0.5
-
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
index 2e9ee28..7c023d1 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf532-0.5
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index d941092..799a682 100644 (file)
@@ -23,7 +23,5 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf518-0.0
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
index d5d6dd9..c0cb9ff 100644 (file)
@@ -23,8 +23,6 @@
 # MA 02111-1307 USA
 #
 
-CONFIG_BFIN_CPU = bf537-0.2
-
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
index fa72c7f..a55e178 100644 (file)
@@ -11,7 +11,8 @@
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_BOOT_MODE      BFIN_BOOT_BYPASS
+#define CONFIG_BFIN_CPU             bf536-0.3
+#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 /*
index 64ca9ed..6eec1c9 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf518-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 4c30c25..c28f867 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf526-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 14ade1b..889bfde 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf527-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
index fa9053b..22a5639 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf527-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 3582846..c0e8b5a 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf527-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index e1bb594..95d3afa 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index bf0f063..cb37ee7 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 0ba29bc..86aa1f6 100644 (file)
@@ -24,6 +24,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
index da4f2f2..0913ce4 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
index 559428f..7e9dd36 100644 (file)
@@ -24,6 +24,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
index 2d1930c..3da2375 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 2469c6a..717a35a 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf538-0.4
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 1c035cf..e862a8a 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf548-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 2b12c3f..1490b2f 100644 (file)
@@ -12,7 +12,8 @@
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_BOOT_MODE          BFIN_BOOT_BYPASS
+#define CONFIG_BFIN_CPU             bf561-0.5
+#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 /*
index 7b020e6..7081d5f 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf561-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 3f5c959..85f08ea 100644 (file)
@@ -24,6 +24,7 @@
 /* CPU Options
  * Be sure to set the Silicon Revision Correctly
  */
+#define CONFIG_BFIN_CPU                bf532-0.5
 #define CONFIG_BFIN_BOOT_MODE  BFIN_BOOT_SPI_MASTER
 
 /*
index e4688a2..9950e44 100644 (file)
@@ -23,7 +23,8 @@
 #define CONFIG_PANIC_HANG 0
 
 /* CPU Options */
-#define CONFIG_BFIN_BOOT_MODE  BFIN_BOOT_SPI_MASTER
+#define CONFIG_BFIN_CPU        bf561-0.5
+#define CONFIG_BFIN_BOOT_MODE  BFIN_BOOT_SPI_MASTER
 
 /*
  *             CLOCK SETTINGS CAVEAT
index 84c9309..e0c6d53 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf527-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index dbc4a5b..7515296 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index c3de96a..934b74b 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index e60ebf2..c274c20 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 27b1cc5..fa62a8e 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf548-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 8c350bc..c60401c 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf561-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index e2dbbb1..f3d6c8b 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf561-0.5
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
index 528363c..c024d78 100644 (file)
@@ -20,6 +20,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf532-0.5
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_NAND
 
 
index 042d789..52055e8 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf518-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
index 9036ce3..8ded175 100644 (file)
@@ -11,6 +11,7 @@
 /*
  * Processor Settings
  */
+#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS