From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/11] snowball: Add support for ux500 based snowball board
Date: Fri, 3 Aug 2012 12:45:11 -0700 [thread overview]
Message-ID: <501C2A47.9070905@ti.com> (raw)
In-Reply-To: <501C274A.7040804@linaro.org>
On 08/03/2012 12:32 PM, Mathieu Poirier wrote:
> Thanks for the review - see my comments below.
>
> Mathieu.
>
> On 12-08-03 08:46 AM, Tom Rini wrote:
>> On Tue, Jul 31, 2012 at 12:59:23PM -0600, mathieu.poirier at linaro.org wrote:
>>
>>> From: "Mathieu J. Poirier" <mathieu.poirier@linaro.org>
>>>
>>> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>>> Signed-off-by: John Rigby <john.rigby@linaro.org>
>> [snip]
>>> +++ b/board/st-ericsson/snowball/Makefile
>> [snip]
>>> +#prcmu.o
>>
>> Drop please.
>>
>> [snip]
>>> +++ b/board/st-ericsson/snowball/snowball.c
>>> +int dram_init(void)
>>> +{
>>> + uint32_t unused_cols_rows;
>>> + unsigned int nrows;
>>> + unsigned int ncols;
>>> +
>>> + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
>>> + gd->ram_size = PHYS_SDRAM_SIZE_1;
>>> +
>>> + /*
>>> + * Assumption: 2 CS active, both CS have same layout.
>>> + * 15 rows max, 11 cols max (controller spec).
>>> + * memory chip has 8 banks, I/O width 32 bit.
>>> + * The correct way would be to read MR#8: I/O width and density,
>>> + * but this requires locking against the PRCMU firmware.
>>> + * Simplified approach:
>>> + * Read number of unused rows and columns from mem controller.
>>> + * size = nCS x 2^(rows+cols) x nbanks x buswidth_bytes
>>> + */
>>> + unused_cols_rows = readl(DMC_CTL_97);
>>> + nrows = 15 - (unused_cols_rows & 0x07);
>>> + ncols = 11 - ((unused_cols_rows & 0x0700) >> 8);
>>> + gd->ram_size = gd->bd->bi_dram[0].size =
>>> + 2 * (1 << (nrows + ncols)) * 8 * 4;
>>
>> Please use get_mem_size(CONFIG_SYS_SDRAM_BASE, possible-max-size) (and
>> defining CONFIG_SYS_MAX_RAM_SIZE is common convention) instead of all
>> the above.
>>
>
> Is 'get_mem_size' supposed to be an existing API ? I grep'ed for it in
> the code to no avail.
Arg, sorry, mental error. get_ram_size is the right one.
--
Tom
next prev parent reply other threads:[~2012-08-03 19:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 18:59 [U-Boot] [PATCH 00/11] Support for ST-Ericsson snowball board mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 01/11] snowball: Add support for ux500 based " mathieu.poirier at linaro.org
2012-08-03 14:46 ` Tom Rini
2012-08-03 19:32 ` Mathieu Poirier
2012-08-03 19:45 ` Tom Rini [this message]
2012-08-03 15:32 ` Tom Rini
2012-07-31 18:59 ` [U-Boot] [PATCH 02/11] u8500: Moving prcmu to cpu directory mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 03/11] snowball: Adding architecture dependent initialisation mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 04/11] snowball: Adding CPU clock initialisation mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 05/11] snowball: Moving to ux500.v2 addess scheme for PRCMU access mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 06/11] snowball: applying power to LAN and GBF controllers mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 07/11] u8500: Moving processor-specific functions to cpu area mathieu.poirier at linaro.org
2012-08-10 16:08 ` Tom Rini
2012-07-31 18:59 ` [U-Boot] [PATCH 08/11] u8500: Enabling power to MMC device on AB8500 V2 mathieu.poirier at linaro.org
2012-08-10 16:08 ` Tom Rini
2012-07-31 18:59 ` [U-Boot] [PATCH 09/11] u8500: Separating mmc config parameters from driver mathieu.poirier at linaro.org
2012-08-10 16:08 ` Tom Rini
2012-07-31 18:59 ` [U-Boot] [PATCH 10/11] armv7: Adding cpu specific cache managmenent mathieu.poirier at linaro.org
2012-07-31 18:59 ` [U-Boot] [PATCH 11/11] snowball: Adding board specific cache cleanup routine mathieu.poirier at linaro.org
2012-08-10 16:08 ` [U-Boot] [PATCH 00/11] Support for ST-Ericsson snowball board Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2012-06-18 16:35 [U-Boot] [PATCH 00/11] support " mathieu.poirier at linaro.org
2012-06-18 16:35 ` [U-Boot] [PATCH 01/11] snowball: Add support for ux500 based " mathieu.poirier at linaro.org
2012-06-18 17:59 ` Tom Rini
2012-06-18 22:16 ` Mathieu Poirier
2012-06-18 16:25 [U-Boot] [PATCH 00/11] support for ST-Ericsson " mathieu.poirier at linaro.org
2012-06-18 16:25 ` [U-Boot] [PATCH 01/11] snowball: Add support for ux500 based " mathieu.poirier at linaro.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501C2A47.9070905@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.