[PATCH 08/15] MIPS: dtb: register only one memory bank

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

 



From: Peter Mamonov <pmamonov@xxxxxxxxx>

Signed-off-by: Peter Mamonov <pmamonov@xxxxxxxxx>
Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 arch/mips/boot/dtb.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c
index 23d8979..977c837 100644
--- a/arch/mips/boot/dtb.c
+++ b/arch/mips/boot/dtb.c
@@ -28,11 +28,13 @@ void of_add_memory_bank(struct device_node *node, bool dump, int r,
 {
 	static char str[12];
 
-	sprintf(str, "kseg0_ram%d", r);
-	barebox_add_memory_bank(str, KSEG0 | base, size);
-
-	sprintf(str, "kseg1_ram%d", r);
-	barebox_add_memory_bank(str, KSEG1 | base, size);
+	if (IS_ENABLED(CONFIG_MMU)) {
+		sprintf(str, "kseg0_ram%d", r);
+		barebox_add_memory_bank(str, KSEG0 | base, size);
+	} else {
+		sprintf(str, "kseg1_ram%d", r);
+		barebox_add_memory_bank(str, KSEG1 | base, size);
+	}
 
 	if (dump)
 		pr_info("%s: %s: 0x%llx@0x%llx\n", node->name, str, size, base);
-- 
2.7.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux