From: Dalon Westergreen <dwesterg@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] socfpga: stratix10: fix sdram_calculate_size
Date: Mon, 10 Sep 2018 13:41:11 -0700 [thread overview]
Message-ID: <20180910204111.6842-1-dwesterg@gmail.com> (raw)
Incorrect type of size variable results in 0 being
returned for sdram sizes greater than or equal to
4GB.
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.c
index 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_BANK_GRP_ADDR_WIDTH(dramaddrw) +
DRAMADDRW_CFG_BANK_ADDR_WIDTH(dramaddrw) +
DRAMADDRW_CFG_ROW_ADDR_WIDTH(dramaddrw) +
--
2.17.1
next reply other threads:[~2018-09-10 20:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 20:41 Dalon Westergreen [this message]
2018-09-11 9:31 ` [U-Boot] [PATCH] socfpga: stratix10: fix sdram_calculate_size Marek Vasut
2018-09-11 13:28 ` Dalon L Westergreen
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=20180910204111.6842-1-dwesterg@gmail.com \
--to=dwesterg@gmail.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.