[PATCH] MIPS: OCTEON: use bootloader provided value for max memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sivasubramanian Palanisamy <sivasubramanian.palanisamy@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux