Merge branch 'master' of http://git.denx.de/u-boot-sunxi
diff --git a/arch/arm/dts/dra72-evm.dts b/arch/arm/dts/dra72-evm.dts
index 4ca37fa..e7c5db2 100644
--- a/arch/arm/dts/dra72-evm.dts
+++ b/arch/arm/dts/dra72-evm.dts
@@ -591,7 +591,7 @@
 	mode-gpios = <&pcf_gpio_21 4 GPIO_ACTIVE_HIGH>;
 };
 
-&cpsw_emac1 {
+&cpsw_emac0 {
 	phy_id = <&davinci_mdio>, <3>;
 	phy-mode = "rgmii";
 };
diff --git a/cmd/nand.c b/cmd/nand.c
index 97f1619..c16ec77 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -191,7 +191,7 @@
 	struct mtd_info *mtd = nand_info[0];
 	char *cmd = argv[1];
 
-	if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd->name) {
+	if (CONFIG_SYS_MAX_NAND_DEVICE == 0 || !mtd) {
 		puts("no devices available\n");
 		return 1;
 	}
@@ -398,7 +398,7 @@
 
 		putc('\n');
 		for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) {
-			if (nand_info[i]->name)
+			if (nand_info[i])
 				nand_print_and_set_info(i);
 		}
 		return 0;
@@ -433,7 +433,7 @@
 	 * for another device is to be used.
 	 */
 	if (dev < 0 || dev >= CONFIG_SYS_MAX_NAND_DEVICE ||
-	    !nand_info[dev]->name) {
+	    !nand_info[dev]) {
 		puts("\nno devices available\n");
 		return 1;
 	}
@@ -991,7 +991,7 @@
 
 	idx = simple_strtoul(boot_device, NULL, 16);
 
-	if (idx < 0 || idx >= CONFIG_SYS_MAX_NAND_DEVICE || !nand_info[idx]->name) {
+	if (idx < 0 || idx >= CONFIG_SYS_MAX_NAND_DEVICE || !nand_info[idx]) {
 		printf("\n** Device %d not available\n", idx);
 		bootstage_error(BOOTSTAGE_ID_NAND_AVAILABLE);
 		return 1;
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
index 9fb874c..23f1571 100644
--- a/drivers/dfu/dfu_nand.c
+++ b/drivers/dfu/dfu_nand.c
@@ -39,7 +39,7 @@
 
 	if (nand_curr_device < 0 ||
 	    nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE ||
-	    !nand_info[nand_curr_device]->name) {
+	    !nand_info[nand_curr_device]) {
 		printf("%s: invalid nand device\n", __func__);
 		return -1;
 	}
@@ -148,7 +148,7 @@
 
 		if (nand_curr_device < 0 ||
 		    nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE ||
-		    !nand_info[nand_curr_device]->name) {
+		    !nand_info[nand_curr_device]) {
 			printf("%s: invalid nand device\n", __func__);
 			return -1;
 		}
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index 6e201d6..af618fc 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -899,7 +899,7 @@
 
 	if (nand_curr_device < 0 ||
 	    nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE ||
-	    !nand_info[nand_curr_device]->name) {
+	    !nand_info[nand_curr_device]) {
 		printf("nand: error: no NAND devices found\n");
 		return -ENODEV;
 	}
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index d3ac539..b1d58e0 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1496,6 +1496,7 @@
 		host->read_id_bytes = 4;
 		mtd->owner = THIS_MODULE;
 
+		nand_set_controller_data(chip, host);
 		chip->ecc.read_page	= pxa3xx_nand_read_page_hwecc;
 		chip->ecc.write_page	= pxa3xx_nand_write_page_hwecc;
 		chip->controller        = &info->controller;