From: Ley Foon Tan <ley.foon.tan@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 05/10] board: altera: Stratix10: Add board_get_usable_ram_top()
Date: Tue, 12 Mar 2019 16:31:09 +0800 [thread overview]
Message-ID: <1552379474-12867-6-git-send-email-ley.foon.tan@intel.com> (raw)
In-Reply-To: <1552379474-12867-1-git-send-email-ley.foon.tan@intel.com>
Add board_get_usable_ram_top() function. Limit maximum usable
ram top to 2GB.
Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
---
board/altera/stratix10-socdk/socfpga.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/board/altera/stratix10-socdk/socfpga.c b/board/altera/stratix10-socdk/socfpga.c
index 043fc543f1..99c10d313c 100644
--- a/board/altera/stratix10-socdk/socfpga.c
+++ b/board/altera/stratix10-socdk/socfpga.c
@@ -5,3 +5,15 @@
*/
#include <common.h>
+#include <asm/arch/sdram.h>
+#include <linux/sizes.h>
+
+#ifdef CONFIG_ALTERA_SDRAM
+ulong board_get_usable_ram_top(ulong total_size)
+{
+ if (sdram_calculate_size() > SZ_2G)
+ return SZ_2G;
+ else
+ return sdram_calculate_size();
+}
+#endif
--
2.19.0
next prev parent reply other threads:[~2019-03-12 8:31 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 8:31 [U-Boot] [PATCH 00/10] Update Stratix 10 SDRAM driver Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 01/10] ddr: altera: stratix10: Move SDRAM size check to " Ley Foon Tan
2019-03-12 10:41 ` Marek Vasut
2019-03-19 3:26 ` Ley Foon Tan
2019-03-19 8:55 ` Marek Vasut
2019-03-19 9:46 ` Ley Foon Tan
2019-03-19 9:47 ` Marek Vasut
2019-03-20 1:30 ` Ley Foon Tan
2019-03-20 9:41 ` Marek Vasut
2019-03-21 5:59 ` Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 02/10] arm: socfpga: Add sdram_s10.h to sdram.h Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 03/10] ddr: altera: s10: Add multiple memory banks support Ley Foon Tan
2019-03-12 10:44 ` Marek Vasut
2019-03-12 14:05 ` Westergreen, Dalon
2019-03-13 7:28 ` Ley Foon Tan
2019-03-13 9:14 ` Marek Vasut
2019-03-12 8:31 ` [U-Boot] [PATCH 04/10] arm: socfpga: Update dram_init_banksize() for Stratix10 Ley Foon Tan
2019-03-12 10:45 ` Marek Vasut
2019-03-12 14:25 ` Westergreen, Dalon
2019-03-12 8:31 ` Ley Foon Tan [this message]
2019-03-12 10:46 ` [U-Boot] [PATCH 05/10] board: altera: Stratix10: Add board_get_usable_ram_top() Marek Vasut
2019-03-12 14:33 ` Westergreen, Dalon
2019-03-12 14:40 ` Marek Vasut
2019-03-19 3:27 ` Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 06/10] board: altera: Stratix10: Add ft_board_setup() Ley Foon Tan
2019-03-12 10:47 ` Marek Vasut
2019-03-19 3:28 ` Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 07/10] arm: socfpga: Enable OF_BOARD_SETUP for Stratix 10 Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 08/10] configs: stratix10: Change CONFIG_NR_DRAM_BANKS to 2 Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 09/10] arm: socfpga: stratix10: Add cpu_has_been_warmreset() Ley Foon Tan
2019-03-12 8:31 ` [U-Boot] [PATCH 10/10] ddr: altera: Stratix10: Add ECC memory scrubbing Ley Foon Tan
2019-03-12 10:49 ` Marek Vasut
2019-03-19 3:14 ` Ley Foon Tan
2019-03-19 8:57 ` Marek Vasut
2019-03-19 9:49 ` Ley Foon Tan
2019-03-19 12:20 ` Marek Vasut
2019-03-12 11:08 ` [U-Boot] [PATCH 00/10] Update Stratix 10 SDRAM driver Simon Goldschmidt
2019-03-13 18:17 ` Ley Foon Tan
2019-03-14 8:23 ` Simon Goldschmidt
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=1552379474-12867-6-git-send-email-ley.foon.tan@intel.com \
--to=ley.foon.tan@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