From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] socfpga: stratix10: fix sdram_calculate_size
Date: Tue, 11 Sep 2018 06:28:55 -0700 [thread overview]
Message-ID: <3ee21decefc70d83889dec9c1beb1e76bba8a7c5.camel@linux.intel.com> (raw)
In-Reply-To: <4cf4e1c6-1ef2-3d74-330a-be5b23dcabae@denx.de>
On Tue, 2018-09-11 at 11:31 +0200, Marek Vasut wrote:
> On 09/10/2018 10:41 PM, Dalon Westergreen wrote:
> Incorrect type of size variable results in 0 beingreturned for sdram sizes
> greater than or equal to4GB.
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>---
> drivers/ddr/altera/sdram_s10.c | 2 +- 1 file changed, 1 insertion(+), 1
> deletion(-)
> diff --git a/drivers/ddr/altera/sdram_s10.c
> b/drivers/ddr/altera/sdram_s10.cindex 48f4f47b14..dad0147b64 100644---
> a/drivers/ddr/altera/sdram_s10.c+++ b/drivers/ddr/altera/sdram_s10.c@@ -375,7
> +375,7 @@ unsigned long sdram_calculate_size(void) { u32 dramaddrw =
> hmc_readl(DRAMADDRW); - u32 size = 1 <<
> (DRAMADDRW_CFG_CS_ADDR_WIDTH(dramaddrw) ++ unsigned long size = 1 <<
> (DRAMADDRW_CFG_CS_ADDR_WIDTH(dramaddrw) + DRAMADDRW_CFG_B
> ANK_GRP_ADDR_WIDTH(dramaddrw) + DRAMADDRW_CFG_BANK_ADDR
> _WIDTH(dramaddrw) + DRAMADDRW_CFG_ROW_ADDR_WIDTH(dramaddrw)
> +
>
> Change the function to report size in MiB, prescale it here and youwon't have
> problems for a while . How does that sound ?
Prefer not to as this will be used for comparisons later which would mean we
would need to scale #defines from linux/sizes.h.
--dalon
next prev parent reply other threads:[~2018-09-11 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 20:41 [U-Boot] [PATCH] socfpga: stratix10: fix sdram_calculate_size Dalon Westergreen
2018-09-11 9:31 ` Marek Vasut
2018-09-11 13:28 ` Dalon L Westergreen [this message]
2018-09-11 13:52 ` Marek Vasut
2018-09-11 15:13 ` Dalon L Westergreen
2018-09-11 15:35 ` Marek Vasut
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=3ee21decefc70d83889dec9c1beb1e76bba8a7c5.camel@linux.intel.com \
--to=dalon.westergreen@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox