[U-Boot] [PATCH V2 3/3] Add support for the LaCie ED Mini V2 board

Albert ARIBAUD albert.aribaud at free.fr
Sun Nov 29 13:56:08 CET 2009


Wolfgang Denk a écrit :

>> +int dram_init(void)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
>> +		gd->bd->bi_dram[i].start = orion5x_sdram_bar(i);
>> +		gd->bd->bi_dram[i].size = orion5x_sdram_bs(i);
>> +	}
>> +	return 0;
>> +}
> 
> Cannot you use get_ram_size() for auto-sizing and checking?

The SoC allows for up to 4 banks of DRAM, not necessarily contiguous. 
Granted, this is not a frequent configuration, however I'd like to 
support it correctly, and the heuristics of get_ram_size() are based on 
the assumption that all DRAM is contiguous.

However I realize that this code is actually SoC-specific, not 
board-specific. It could be moved in cpu/arm926ejs/orion5x/dram.c, and 
then orion5x_sdram_{bar,bs} could be made static (or inlined).

What do you think?

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list