Patchwork [U-Boot,08/13] SBC8560: #define CONFIG_SYS_LBC_NO_SDRAM_INIT

login
register
mail settings
Submitter Becky Bruce
Date Dec. 2, 2010, 11:45 p.m.
Message ID <1291333539-11884-9-git-send-email-beckyb@kernel.crashing.org>
Download mbox | patch
Permalink /patch/74051/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Becky Bruce - Dec. 2, 2010, 11:45 p.m.
This is for boards that use the SDRAM mode on the LBC but don't
require any additional setup.

I'm merging all the initdram() calls into a single function for 85xx,
and have to be able to distinguish between boards that require an
sdram_init() function, and those that do not.  We could have defined
an empty sdram_init() but I hate doing that.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
 include/configs/sbc8560.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Timur Tabi - Dec. 3, 2010, 2:26 a.m.
On Thu, Dec 2, 2010 at 5:45 PM, Becky Bruce <beckyb@kernel.crashing.org> wrote:
> This is for boards that use the SDRAM mode on the LBC but don't
> require any additional setup.
>
> I'm merging all the initdram() calls into a single function for 85xx,
> and have to be able to distinguish between boards that require an
> sdram_init() function, and those that do not.  We could have defined
> an empty sdram_init() but I hate doing that.

Would a weak function be a better way to do this?
Becky Bruce - Dec. 3, 2010, 8:44 p.m.
On Dec 2, 2010, at 8:26 PM, Timur Tabi wrote:

> On Thu, Dec 2, 2010 at 5:45 PM, Becky Bruce <beckyb@kernel.crashing.org> wrote:
>> This is for boards that use the SDRAM mode on the LBC but don't
>> require any additional setup.
>> 
>> I'm merging all the initdram() calls into a single function for 85xx,
>> and have to be able to distinguish between boards that require an
>> sdram_init() function, and those that do not.  We could have defined
>> an empty sdram_init() but I hate doing that.
> 
> Would a weak function be a better way to do this?

Eeney meeney meiney mo.....  If the peanut gallery prefers, I can go that way.  I don't actually like either solution very much.

-B
Kumar Gala - Dec. 3, 2010, 9:48 p.m.
On Dec 3, 2010, at 2:44 PM, Becky Bruce wrote:

> 
> On Dec 2, 2010, at 8:26 PM, Timur Tabi wrote:
> 
>> On Thu, Dec 2, 2010 at 5:45 PM, Becky Bruce <beckyb@kernel.crashing.org> wrote:
>>> This is for boards that use the SDRAM mode on the LBC but don't
>>> require any additional setup.
>>> 
>>> I'm merging all the initdram() calls into a single function for 85xx,
>>> and have to be able to distinguish between boards that require an
>>> sdram_init() function, and those that do not.  We could have defined
>>> an empty sdram_init() but I hate doing that.
>> 
>> Would a weak function be a better way to do this?
> 
> Eeney meeney meiney mo.....  If the peanut gallery prefers, I can go that way.  I don't actually like either solution very much.

I'd prefer reduce the number of #defines

- k

Patch

diff --git a/include/configs/sbc8560.h b/include/configs/sbc8560.h
index 101c5d9..65d8eba 100644
--- a/include/configs/sbc8560.h
+++ b/include/configs/sbc8560.h
@@ -136,6 +136,9 @@ 
 
 #undef CONFIG_CLOCKS_IN_MHZ
 
+/* No sdram_init() required - some boards require additional setup */
+#define CONFIG_SYS_LBC_NO_SDRAM_INIT
+
 #if defined(CONFIG_RAM_AS_FLASH)
   #define CONFIG_SYS_LBC_SDRAM_BASE	0xfc000000	/* Localbus SDRAM */
   #define CONFIG_SYS_FLASH_BASE	0xf8000000      /* start of FLASH 8M  */