linux-mips
[Top] [All Lists]

[PATCH 7/7] MIPS: ralink: make use of the new memory detection code

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 7/7] MIPS: ralink: make use of the new memory detection code
From: John Crispin <blogic@openwrt.org>
Date: Mon, 15 Apr 2013 12:41:34 +0200
Cc: linux-mips@linux-mips.org, John Crispin <blogic@openwrt.org>
In-reply-to: <1366022494-8355-1-git-send-email-blogic@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1366022494-8355-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Call detect_memory_region() from plat_mem_setup() unless the size was already
read from the system controller.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 arch/mips/ralink/of.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
index 4165e70..d285ea8 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -85,6 +85,13 @@ void __init plat_mem_setup(void)
         * parsed resulting in our memory appearing
         */
        __dt_setup_arch(&__dtb_start);
+
+       if (soc_info.mem_size)
+               add_memory_region(soc_info.mem_base, soc_info.mem_size,
+                                 BOOT_MEM_RAM);
+       else
+               detect_memory_region(soc_info.mem_base, soc_info.mem_size_min,
+                                    soc_info.mem_size_max);
 }
 
 static int __init plat_of_setup(void)
-- 
1.7.10.4


<Prev in Thread] Current Thread [Next in Thread>