diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index bf5e0f6..74196ce 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -15,6 +15,7 @@
 #include <serial.h>
 #include <asm/sections.h>
 #include <linux/ctype.h>
+#include <linux/ioport.h>
 #include <linux/lzo.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -1181,41 +1182,34 @@
 
 #if defined(CONFIG_NR_DRAM_BANKS)
 
-static int get_next_memory_node(const void *blob, int mem)
+static ofnode get_next_memory_node(ofnode mem)
 {
 	do {
-		mem = fdt_node_offset_by_prop_value(gd->fdt_blob, mem,
-						    "device_type", "memory", 7);
-	} while (!fdtdec_get_is_enabled(blob, mem));
+		mem = ofnode_by_prop_value(mem, "device_type", "memory", 7);
+	} while (ofnode_valid(mem) && !ofnode_is_available(mem));
 
 	return mem;
 }
 
 int fdtdec_setup_memory_banksize(void)
 {
-	int bank, ret, mem, reg = 0;
-	struct fdt_resource res;
+	int bank, reg = 0;
+	struct resource res;
+	ofnode mem;
 
-	mem = get_next_memory_node(gd->fdt_blob, -1);
-	if (mem < 0) {
-		debug("%s: Missing /memory node\n", __func__);
-		return -EINVAL;
-	}
+	mem = get_next_memory_node(ofnode_null());
+	if (!ofnode_valid(mem))
+		goto missing_node;
 
 	for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
-		ret = fdt_get_resource(gd->fdt_blob, mem, "reg", reg++, &res);
-		if (ret == -FDT_ERR_NOTFOUND) {
+		while (ofnode_read_resource(mem, reg++, &res)) {
 			reg = 0;
-			mem = get_next_memory_node(gd->fdt_blob, mem);
-			if (mem == -FDT_ERR_NOTFOUND)
-				break;
-
-			ret = fdt_get_resource(gd->fdt_blob, mem, "reg", reg++, &res);
-			if (ret == -FDT_ERR_NOTFOUND)
-				break;
-		}
-		if (ret != 0) {
-			return -EINVAL;
+			mem = get_next_memory_node(mem);
+			if (!ofnode_valid(mem)) {
+				if (bank)
+					return 0;
+				goto missing_node;
+			}
 		}
 
 		gd->bd->bi_dram[bank].start = (phys_addr_t)res.start;
@@ -1229,6 +1223,10 @@
 	}
 
 	return 0;
+
+missing_node:
+	debug("%s: Missing /memory node\n", __func__);
+	return -EINVAL;
 }
 #endif
 
