Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: OCTEON: use bootloader provided value for max memory
@ 2016-05-23 15:11 Aaro Koskinen
  2016-05-23 17:15 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2016-05-23 15:11 UTC (permalink / raw)
  To: David Daney, Ralf Baechle, linux-mips
  Cc: Sivasubramanian Palanisamy, Aaro Koskinen

From: Sivasubramanian Palanisamy <sivasubramanian.palanisamy@nokia.com>

Currently the maximum memory on OCTEON boards is limited to 512 MB unless
user passes the mem= parameter. Use bootloader provided value for max
memory instead of the hardcoded default limit.

Signed-off-by: Sivasubramanian Palanisamy <sivasubramanian.palanisamy@nokia.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/mips/cavium-octeon/setup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index cd7101f..ef9705d 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -800,6 +800,8 @@ void __init prom_init(void)
 	/* Default to 64MB in the simulator to speed things up */
 	if (octeon_is_simulation())
 		MAX_MEMORY = 64ull << 20;
+	else if (octeon_bootinfo->dram_size)
+		MAX_MEMORY = octeon_bootinfo->dram_size * 1024ull * 1024ull;
 
 	arg = strstr(arcs_cmdline, "mem=");
 	if (arg) {
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-23 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 15:11 [PATCH] MIPS: OCTEON: use bootloader provided value for max memory Aaro Koskinen
2016-05-23 17:15 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox