Cisco RV0XX u-boot sets MEM=2048 as boot param. We assume that at least 4MB (mem_alloc_size) of ram is needed to run linux on cavium boards, so if mem < 4M - ignore it and set default value

Signed-off-by: Michał Osowiecki <michal.osowie...@gmail.com>

--- a/arch/mips/cavium-octeon/setup.c   2016-06-06 18:15:32.000000000 +0200
+++ b/arch/mips/cavium-octeon/setup.c   2016-06-08 15:28:56.642919151 +0200
@@ -941,6 +941,11 @@
         * to consistently work.
         */
        mem_alloc_size = 4 << 20;
+
+       /* Ignore bootarg MEM <= 4MB */
+       if (MAX_MEMORY <= mem_alloc_size)
+               MAX_MEMORY = 512ull << 20;
+
        if (mem_alloc_size > MAX_MEMORY)
                mem_alloc_size = MAX_MEMORY;


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to