diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 4748ec5..d7b349a 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -164,54 +164,69 @@ enum mac_oui {
 
 static void __init update_fec_mac_prop(enum mac_oui oui)
 {
-	struct device_node *np, *from = NULL;
-	struct property *newmac;
+	struct device_node *from = NULL;
 	const u32 *ocotp = mxs_get_ocotp();
 	u8 *macaddr;
+	const u8 *maddr = NULL;
+	int len = 0;
 	u32 val;
-	int i;
-
-	for (i = 0; i < 2; i++) {
-		np = of_find_compatible_node(from, NULL, "fsl,imx28-fec");
-		if (!np)
-			return;
-		from = np;
-
-		newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);
-		if (!newmac)
-			return;
-		newmac->value = newmac + 1;
-		newmac->length = 6;
-
-		newmac->name = kstrdup("local-mac-address", GFP_KERNEL);
-		if (!newmac->name) {
-			kfree(newmac);
+	int i = 0;
+	int tt = 0;
+
+	for_each_compatible_node(from, NULL, "fsl,imx28-fec") {
+		macaddr = kzalloc(6, GFP_KERNEL);
+		if (!macaddr) {
+			pr_err("%s: failed to allocate mem for macaddr\n",
+				__func__);
 			return;
 		}
 
+		/*retrieve MAC from DT*/
+		maddr = of_get_property(from, "local-mac-address", &len);
+		val = ocotp[i];
+		i++;
+
+		if (maddr && (len == 6)) {
+			/*6 bytes MAC defined*/
+			for (tt = 0; tt < 6; tt++)
+				macaddr[tt] = maddr[tt];
+
+			/*overwrite with DT MAC*/
+			val = (macaddr[3] << 16) | (macaddr[4] << 8) |
+			      (macaddr[5] << 0);
+
+			pr_debug("MACH-MXS: %i MAC taken from DT\n", i);
+		} else if (maddr && (len == 3)) {
+			/*only vendor OUI defined in DT*/
+			macaddr[0] = maddr[0];
+			macaddr[1] = maddr[1];
+			macaddr[2] = maddr[2];
+
+			pr_debug("MACH-MXS: %i MAC OUI taken from DT\n", i);
+		} else {
 		/*
 		 * OCOTP only stores the last 4 octets for each mac address,
 		 * so hard-code OUI here.
 		 */
-		macaddr = newmac->value;
-		switch (oui) {
-		case OUI_FSL:
-			macaddr[0] = 0x00;
-			macaddr[1] = 0x04;
-			macaddr[2] = 0x9f;
-			break;
-		case OUI_DENX:
-			macaddr[0] = 0xc0;
-			macaddr[1] = 0xe5;
-			macaddr[2] = 0x4e;
-			break;
+			switch (oui) {
+			case OUI_FSL:
+				macaddr[0] = 0x00;
+				macaddr[1] = 0x04;
+				macaddr[2] = 0x9f;
+				break;
+			case OUI_DENX:
+				macaddr[0] = 0xc0;
+				macaddr[1] = 0xe5;
+				macaddr[2] = 0x4e;
+				break;
+			}
+
+			pr_debug("MACH-MXS: %i hard-coded MAC taken\n", i);
 		}
-		val = ocotp[i];
+
 		macaddr[3] = (val >> 16) & 0xff;
 		macaddr[4] = (val >> 8) & 0xff;
 		macaddr[5] = (val >> 0) & 0xff;
-
-		prom_update_property(np, newmac);
 	}
 }
 
