STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin
 
-CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
 CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
 CONFIG_ENV_OFFSET := $(strip $(subst ",,$(CONFIG_ENV_OFFSET)))
 CONFIG_ENV_SIZE := $(strip $(subst ",,$(CONFIG_ENV_SIZE)))
 LDFLAGS += --gc-sections -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
-ifneq (,$(CONFIG_BFIN_CPU))
+PLATFORM_CPPFLAGS += -DBFIN_CPU='"$(CONFIG_BFIN_CPU)"'
 PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU)
-endif
 
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
 ALL += $(obj)u-boot.ldr
 
 #ifndef __ASM_BLACKFIN_CONFIG_POST_H__
 #define __ASM_BLACKFIN_CONFIG_POST_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
 
        memset((void *)bd, 0, sizeof(bd_t));
 
        bd->bi_r_version = version_string;
-       bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
+       bd->bi_cpu = BFIN_CPU;
        bd->bi_board_name = BFIN_BOARD_NAME;
        bd->bi_vco = get_vco();
        bd->bi_cclk = get_cclk();
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf518-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf526-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf527-0.2
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf527-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf533-0.3
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf533-0.3
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_UART       := --port g --gpio 6
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_UART       := --port g --gpio 6
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf538-0.4
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf548-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf561-0.5
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf561-0.3
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf532-0.5
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf527-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf533-0.3
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf548-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf561-0.3
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf561-0.5
+
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
 LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf532-0.5
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf518-0.0
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 # This is not actually used for Blackfin boards so do not change it
 #TEXT_BASE = do-not-use-me
 
+CONFIG_BFIN_CPU = bf537-0.2
+
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf518-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf526-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf527-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf527-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_SPI_MASTER
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf538-0.4
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf548-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU                                bf561-0.5
 #define CONFIG_BFIN_BOOT_MODE          BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf561-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /* 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
 
 /*
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf527-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf533-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf548-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf561-0.3
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf561-0.5
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf532-0.5
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_NAND
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf518-0.0
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA
 
 
 
 /*
  * Processor Settings
  */
-#define CONFIG_BFIN_CPU             bf537-0.2
 #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS