From patchwork Tue Mar 13 12:57:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 885104 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 400w0Q0jFYz9sB8 for ; Tue, 13 Mar 2018 23:59:01 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3DF87C21D4A; Tue, 13 Mar 2018 12:57:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D0A9DC21DB3; Tue, 13 Mar 2018 12:57:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5D5EAC21C8B; Tue, 13 Mar 2018 12:57:20 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 1E15FC21C27 for ; Tue, 13 Mar 2018 12:57:20 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w2DCrnqB012480; Tue, 13 Mar 2018 13:57:18 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2gpc6w8xsy-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 13 Mar 2018 13:57:18 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 19FF034; Tue, 13 Mar 2018 12:57:17 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E908A1553; Tue, 13 Mar 2018 12:57:16 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 13 Mar 2018 13:57:16 +0100 Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 13 Mar 2018 13:57:16 +0100 From: Patrick Delaunay To: Date: Tue, 13 Mar 2018 13:57:01 +0100 Message-ID: <1520945824-10620-3-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520945824-10620-1-git-send-email-patrick.delaunay@st.com> References: <1520945824-10620-1-git-send-email-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-13_06:, , signatures=0 Cc: benjamin.gaignard@st.com, Stefan Roese Subject: [U-Boot] [PATCH v2 2/5] common: move board_init.c prototypes in init.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move function prototypes for common/init/board_init.c from common.h to init.h Signed-off-by: Patrick Delaunay --- Changes in v2: None include/common.h | 38 +------------------------------------- include/init.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/include/common.h b/include/common.h index 6176195..62630db 100644 --- a/include/common.h +++ b/include/common.h @@ -64,6 +64,7 @@ typedef void (interrupt_handler_t)(void *); /* startup functions, used in: * common/board_f.c + * common/init/board_init.c */ #include @@ -97,48 +98,11 @@ int run_command_list(const char *cmd, int len, int flag); /* arch/$(ARCH)/lib/board.c */ void board_init_r(gd_t *, ulong) __attribute__ ((noreturn)); -/** - * ulong board_init_f_alloc_reserve - allocate reserved area - * - * This function is called by each architecture very early in the start-up - * code to allow the C runtime to reserve space on the stack for writable - * 'globals' such as GD and the malloc arena. - * - * @top: top of the reserve area, growing down. - * @return: bottom of reserved area - */ -ulong board_init_f_alloc_reserve(ulong top); - -/** - * board_init_f_init_reserve - initialize the reserved area(s) - * - * This function is called once the C runtime has allocated the reserved - * area on the stack. It must initialize the GD at the base of that area. - * - * @base: top from which reservation was done - */ -void board_init_f_init_reserve(ulong base); - -/** - * arch_setup_gd() - Set up the global_data pointer - * - * This pointer is special in some architectures and cannot easily be assigned - * to. For example on x86 it is implemented by adding a specific record to its - * Global Descriptor Table! So we we provide a function to carry out this task. - * For most architectures this can simply be: - * - * gd = gd_ptr; - * - * @gd_ptr: Pointer to global data - */ -void arch_setup_gd(gd_t *gd_ptr); - int checkboard(void); int show_board_info(void); int checkflash(void); int checkdram(void); int last_stage_init(void); -extern ulong monitor_flash_len; int mac_read_from_eeprom(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ diff --git a/include/init.h b/include/init.h index f57a438..f952602 100644 --- a/include/init.h +++ b/include/init.h @@ -109,6 +109,45 @@ int misc_init_f(void); int embedded_dtb_select(void); #endif +/* common/init/board_init.c */ +extern ulong monitor_flash_len; + +/** + * ulong board_init_f_alloc_reserve - allocate reserved area + * + * This function is called by each architecture very early in the start-up + * code to allow the C runtime to reserve space on the stack for writable + * 'globals' such as GD and the malloc arena. + * + * @top: top of the reserve area, growing down. + * @return: bottom of reserved area + */ +ulong board_init_f_alloc_reserve(ulong top); + +/** + * board_init_f_init_reserve - initialize the reserved area(s) + * + * This function is called once the C runtime has allocated the reserved + * area on the stack. It must initialize the GD at the base of that area. + * + * @base: top from which reservation was done + */ +void board_init_f_init_reserve(ulong base); + +/** + * arch_setup_gd() - Set up the global_data pointer + * + * This pointer is special in some architectures and cannot easily be assigned + * to. For example on x86 it is implemented by adding a specific record to its + * Global Descriptor Table! So we we provide a function to carry out this task. + * For most architectures this can simply be: + * + * gd = gd_ptr; + * + * @gd_ptr: Pointer to global data + */ +void arch_setup_gd(gd_t *gd_ptr); + /* common/board_r.c */ #endif /* __ASSEMBLY__ */