From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Wed, 29 Oct 2014 18:02:03 +0200 Subject: [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo In-Reply-To: <1414598184-1963-3-git-send-email-nikita@compulab.co.il> References: <1414598184-1963-1-git-send-email-nikita@compulab.co.il> <1414598184-1963-3-git-send-email-nikita@compulab.co.il> Message-ID: <54510F7B.9050604@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Forgot the changelog: On 29/10/14 17:56, Nikita Kiryanov wrote: > The 1GB DRAM configuration on mx6 solo uses 2 chip selects, but > the code tests 1GB DRAM configuration as if it is all present on one > chip select, and thus cannot see the full range of available memory. > > Refactor the check to detect 1GB DRAM correctly. > > Signed-off-by: Nikita Kiryanov > Cc: Igor Grinberg > Cc: Stefano Babic > --- Changes in V2: - No changes. > board/compulab/cm_fx6/spl.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c > index 3948ba2..6fe937b 100644 > --- a/board/compulab/cm_fx6/spl.c > +++ b/board/compulab/cm_fx6/spl.c > @@ -235,10 +235,11 @@ static int cm_fx6_spl_dram_init(void) > > spl_mx6s_dram_init(DDR_32BIT_1GB, false); > bank1_size = get_ram_size((long int *)PHYS_SDRAM_1, 0x80000000); > - if (bank1_size == 0x40000000) > - return 0; > - > + bank2_size = get_ram_size((long int *)PHYS_SDRAM_2, 0x80000000); > if (bank1_size == 0x20000000) { > + if (bank2_size == 0x20000000) > + return 0; > + > spl_mx6s_dram_init(DDR_32BIT_512MB, true); > return 0; > } > -- Regards, Nikita Kiryanov