Message ID | 1291333539-11884-9-git-send-email-beckyb@kernel.crashing.org |
---|---|
State | Superseded |
Delegated to: | Kumar Gala |
Headers | show |
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?
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
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
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 */
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(-)