
Hi Troy,
On 03/09/2013 05:49 PM, Troy Kisky wrote:
On 3/9/2013 5:04 PM, Eric Nelson wrote:
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c new file mode 100644 index 0000000..147bd91 --- /dev/null +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -0,0 +1,895 @@ +int dram_init(void) +{
- gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
This will hang a solo if
PHYS_SDRAM_SIZE is bigger than actual memory size
which makes calling get_ram_size pretty useless.
Since the DDR size must be known in the memory configuration file, this is equivalent to saying:
get_ram_size() will hang if we run the **wrong** U-Boot binary on the device
I think this is true for other reasons as well (SATA?).
The DDR size in this translated from the boards.cfg file, which defines CONFIG_DDR_MB for each configuration and nitrogen6x.h, which uses it to define PHYS_SDRAM_SIZE
+#define PHYS_SDRAM_SIZE (CONFIG_DDR_MB * 1024 * 1024)
But your point about calling get_ram_size() being useless is probably true.
Testing for RAM that we need to configure doesn't add anything.
Regards,
Eric