From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 01 Apr 2014 10:19:47 +0200 Subject: [U-Boot] [PATCH V3 2/4] arm: mx5: Avoid hardcoding memory sizes on MX53QSB In-Reply-To: <1395991861-6528-2-git-send-email-marex@denx.de> References: <1395991861-6528-1-git-send-email-marex@denx.de> <1395991861-6528-2-git-send-email-marex@denx.de> Message-ID: <533A76A3.1070200@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 28/03/2014 08:30, Marek Vasut wrote: > The DRAM size can be easily detected at runtime on i.MX53. Implement > such detection on MX53QSB and adjust the rest of the macros accordingly > to use the detected values. > > An important thing to note here is that we had to override the function > for trimming the effective DRAM address, get_effective_memsize(). That > is because the function uses CONFIG_MAX_MEM_MAPPED as the upper bound of > the available DRAM and we don't have gd->bd->bi_dram[0].size set up at > the time the function is called, thus we cannot put this into the macro > CONFIG_MAX_MEM_MAPPED . Instead, we use custom override where we use the > size of the first DRAM block which we just detected. > > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: Stefano Babic > Cc: Wolfgang Denk > --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================