From patchwork Tue May 27 06:27:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 352716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3C8CF140084 for ; Tue, 27 May 2014 16:29:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB5B6A7409; Tue, 27 May 2014 08:29:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HD0DwlVtZr7N; Tue, 27 May 2014 08:29:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03277A740B; Tue, 27 May 2014 08:28:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6AD07A73FE for ; Tue, 27 May 2014 08:28:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id REhoVSRXT8oD for ; Tue, 27 May 2014 08:28:23 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id B3AAE4B7CC for ; Tue, 27 May 2014 08:28:05 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s4R6RlhT026778; Tue, 27 May 2014 15:27:47 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili11) with ESMTP id s4R6RlR07273; Tue, 27 May 2014 15:27:47 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s4R6RlwT025586; Tue, 27 May 2014 15:27:47 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s4R6RlSE025545; Tue, 27 May 2014 15:27:47 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 15A1B2740043; Tue, 27 May 2014 15:27:47 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 27 May 2014 15:27:41 +0900 Message-Id: <1401172063-17281-13-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401172063-17281-1-git-send-email-yamada.m@jp.panasonic.com> References: <1401172063-17281-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [RFCv2b PATCH 12/14] split CONFIG_SPL_TEXT_BASE and CONFIG_TPL_TEXT_BASE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de We are about to move CONFIG_SPL_TEXT_BASE from header files to defconfig. But we cannot move them as they are. The problem is that #ifdef statements are used in board headers with TPL support. Like this: #ifdef CONFIG_TPL_BUILD #define CONFIG_SPL_TEXT_BASE 0xD0001000 #elif defined(CONFIG_SPL_BUILD) #define CONFIG_SPL_TEXT_BASE 0xff800000 #endif We cannot describe conditinal statments in defconfig. One possible solution is to add CONFIG_TPL_TEXT_BASE. This commit modifies the code as follow: #ifdef CONFIG_TPL_BUILD #define CONFIG_TPL_TEXT_BASE 0xD0001000 #elif defined(CONFIG_SPL_BUILD) #define CONFIG_SPL_TEXT_BASE 0xff800000 #endif (include/config_fallbakcs.h should also be tweaked because some other parts still reference to CONFIG_SPL_TEXT_BASE) In the next commit, it will be converted into defconfig like this: CONFIG_SPL_TEXT_BASE=0xff800000 CONFIG_TPL_TEXT_BASE=0xd0001000 Signed-off-by: Masahiro Yamada --- include/config_fallbacks.h | 5 +++++ include/configs/C29XPCIE.h | 2 +- include/configs/P1010RDB.h | 2 +- include/configs/P1022DS.h | 2 +- include/configs/P1_P2_RDB.h | 2 +- include/configs/p1_p2_rdb_pc.h | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index b304a41..11f375c 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -83,4 +83,9 @@ #define CONFIG_SYS_HZ 1000 #endif +#ifdef CONFIG_TPL_BUILD +# undef CONFIG_SPL_TEXT_BASE +# define CONFIG_SPL_TEXT_BASE CONFIG_TPL_TEXT_BASE +#endif + #endif /* __CONFIG_FALLBACKS_H */ diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h index 8ae33a5..51e7fcb 100644 --- a/include/configs/C29XPCIE.h +++ b/include/configs/C29XPCIE.h @@ -38,7 +38,7 @@ #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_COMMON_INIT_DDR #define CONFIG_SPL_MAX_SIZE (128 << 10) -#define CONFIG_SPL_TEXT_BASE 0xf8f81000 +#define CONFIG_TPL_TEXT_BASE 0xf8f81000 #define CONFIG_SYS_MPC85XX_NO_RESETVEC #define CONFIG_SYS_NAND_U_BOOT_SIZE (832 << 10) #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000) diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index c491b50..afd8945 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -119,7 +119,7 @@ #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_COMMON_INIT_DDR #define CONFIG_SPL_MAX_SIZE (128 << 10) -#define CONFIG_SPL_TEXT_BASE 0xD0001000 +#define CONFIG_TPL_TEXT_BASE 0xD0001000 #define CONFIG_SYS_MPC85XX_NO_RESETVEC #define CONFIG_SYS_NAND_U_BOOT_SIZE (576 << 10) #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000) diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 54e2569..4683900 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -90,7 +90,7 @@ #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_COMMON_INIT_DDR #define CONFIG_SPL_MAX_SIZE (128 << 10) -#define CONFIG_SPL_TEXT_BASE 0xf8f81000 +#define CONFIG_TPL_TEXT_BASE 0xf8f81000 #define CONFIG_SYS_MPC85XX_NO_RESETVEC #define CONFIG_SYS_NAND_U_BOOT_SIZE (832 << 10) #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000) diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h index c75638a..2867fb5 100644 --- a/include/configs/P1_P2_RDB.h +++ b/include/configs/P1_P2_RDB.h @@ -104,7 +104,7 @@ #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_COMMON_INIT_DDR #define CONFIG_SPL_MAX_SIZE (128 << 10) -#define CONFIG_SPL_TEXT_BASE 0xf8f81000 +#define CONFIG_TPL_TEXT_BASE 0xf8f81000 #define CONFIG_SYS_MPC85XX_NO_RESETVEC #define CONFIG_SYS_NAND_U_BOOT_SIZE (832 << 10) #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000) diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 9b58950..0d70ec1 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -218,7 +218,7 @@ #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT #define CONFIG_SPL_COMMON_INIT_DDR #define CONFIG_SPL_MAX_SIZE (128 << 10) -#define CONFIG_SPL_TEXT_BASE 0xf8f81000 +#define CONFIG_TPL_TEXT_BASE 0xf8f81000 #define CONFIG_SYS_MPC85XX_NO_RESETVEC #define CONFIG_SYS_NAND_U_BOOT_SIZE (832 << 10) #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000)