From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Wed, 18 May 2011 09:05:00 +0530 Subject: [U-Boot] [PATCH v2 06/22] Add generic spl infrastructure In-Reply-To: <20110517115035.37650035@schlenkerla.am.freescale.net> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1305472900-4004-7-git-send-email-aneesh@ti.com> <20110516133231.1cb2ccc8@schlenkerla.am.freescale.net> <4DD21BAA.6000601@ti.com> <20110517115035.37650035@schlenkerla.am.freescale.net> Message-ID: <4DD33E64.2020002@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 Hi Scott, On Tuesday 17 May 2011 10:20 PM, Scott Wood wrote: > On Tue, 17 May 2011 12:24:34 +0530 > Aneesh V wrote: > >> On Tuesday 17 May 2011 12:02 AM, Scott Wood wrote: >>> On Sun, 15 May 2011 20:51:24 +0530 >>> Aneesh V wrote: >>>> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h >>>> index 2a84d27..2ce020e 100644 >>>> --- a/arch/arm/include/asm/global_data.h >>>> +++ b/arch/arm/include/asm/global_data.h >>>> @@ -89,6 +89,11 @@ typedef struct global_data { >>>> #define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in& out) */ >>>> #define GD_FLG_ENV_READY 0x00080 /* Environment imported into hash table */ >>>> >>>> +#ifdef CONFIG_PRELOADER >>>> +/* SPL works from internal RAM. gd pointer can be in .data section */ >>>> +#define DECLARE_GLOBAL_DATA_PTR extern gd_t *gd >>>> +#else >>>> #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8") >>>> +#endif >>> >>> Is this appropriate for all ARM boards (e.g. those currently using >>> nand_spl)? >> >> None of the SPL's other than this one seems to be using global data >> today. If anybody wants to use it this seems to be the logical option >> for me because by definition SPL runs from some kind of RAM so global >> data can be placed in the .data section of SPL. > > There is nand_spl code, including ARM, that uses gd. E.g. putc() in > board/davinci/da8xxevm/hawkboard_nand_spl.c. > > This comment also applies to the other uses of CONFIG_PRELOADER -- are all > of those changes appropriate for the existing nand_spl users? I would probably revert the change as advised by Wolfgang. best regards, Aneesh