From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 04 Jun 2014 05:52:06 +0200 Subject: [U-Boot] [RFC 03/10] board_r: only assign gd when requested In-Reply-To: <1401828758.2465.64.camel@yellow> References: <1401568344-4441-1-git-send-email-jeroen@myspectrum.nl> <1401568344-4441-4-git-send-email-jeroen@myspectrum.nl> <1401828758.2465.64.camel@yellow> Message-ID: <538E97E6.1030809@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jeroen, (added York to cc as he introduced CONFIG_SYS_GENERIC_GLOBAL_DATA with patch 2a1680e3 [common/board_f: Initialized global data for generic board]) On 03.06.2014 22:52, Jeroen Hofstee wrote: > Hello Wolfgang / Stefan. > > On za, 2014-05-31 at 22:32 +0200, Jeroen Hofstee wrote: >> When CONFIG_SYS_GENERIC_GLOBAL_DATA is not set the arch handles >> the assignment of gd. At least in case of ARM/Aarch64 this means >> board_init_r is alteady called with the new gd. Therefore only >> assign gd if CONFIG_SYS_GENERIC_GLOBAL_DATA is defined. >> --- >> common/board_r.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/common/board_r.c b/common/board_r.c >> index 602a239..18bbe26 100644 >> --- a/common/board_r.c >> +++ b/common/board_r.c >> @@ -927,7 +927,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) >> int i; >> #endif >> >> -#ifndef CONFIG_X86 >> +#ifdef CONFIG_SYS_GENERIC_GLOBAL_DATA >> gd = new_gd; >> #endif >> > > Can any of you confirm this change is fine for powerpc as well? powerpc doesn't define CONFIG_SYS_GENERIC_GLOBAL_DATA right now. And I'm not sure which powerpc boards use the common board_f/_r functions right now. Perhaps York knows? Other than that I don't any problems, so: Acked-by: Stefan Roese Thanks, Stefan