From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Sun, 10 Mar 2013 07:15:03 -0700 Subject: [U-Boot] [PATCH V2] Add Boundary Devices Nitrogen6X boards In-Reply-To: <513BD8AA.4060000@boundarydevices.com> References: <1362873856-14785-1-git-send-email-eric.nelson@boundarydevices.com> <513BD8AA.4060000@boundarydevices.com> Message-ID: <513C9567.2050909@boundarydevices.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 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