From: Tom Rini Date: Wed, 22 Aug 2012 16:19:41 -0700 Subject: [U-Boot] [PATCH v3 15/19] spl: Make CONFIG_SPL_FRAMEWORK board_init_f __weak In-Reply-To: <1345677585-15696-1-git-send-email-trini@ti.com> References: <1345677585-15696-1-git-send-email-trini@ti.com> Message-ID: <1345677585-15696-16-git-send-email-trini@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Some platforms may need to do more than simply call relocate_code prior to board_init_r, or perhaps perform more work prior to calling relocate_code. Make our default weak to allow for this. Part of this requires us to add an extern for 'gdata' so that others can also call relocate_code. Signed-off-by: Tom Rini --- common/spl/spl.c | 4 ++-- include/spl.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index b314ed7..d8ade27 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -40,7 +40,7 @@ u32 *boot_params_ptr = NULL; struct spl_image_info spl_image; /* Define global data structure pointer to it*/ -static gd_t gdata __attribute__ ((section(".data"))); +gd_t gdata __attribute__ ((section(".data"))); static bd_t bdata __attribute__ ((section(".data"))); inline void hang(void) @@ -50,7 +50,7 @@ inline void hang(void) ; } -void board_init_f(ulong dummy) +void __weak board_init_f(ulong dummy) { /* * We call relocate_code() with relocation target same as the diff --git a/include/spl.h b/include/spl.h index af9ef71..83e9f21 100644 --- a/include/spl.h +++ b/include/spl.h @@ -41,6 +41,7 @@ struct spl_image_info { extern struct spl_image_info spl_image; extern u32 *boot_params_ptr; +extern gd_t gdata; /* SPL common functions */ void preloader_console_init(void); -- 1.7.9.5