Merge branch 'master' of git://git.denx.de/u-boot-fdt
diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c
index e8a4de5..213e792 100644
--- a/drivers/spi/bfin_spi.c
+++ b/drivers/spi/bfin_spi.c
@@ -138,13 +138,29 @@
 #endif
 };
 
+void spi_set_speed(struct spi_slave *slave, uint hz)
+{
+	struct bfin_spi_slave *bss = to_bfin_spi_slave(slave);
+	ulong sclk;
+	u32 baud;
+
+	sclk = get_sclk();
+	baud = sclk / (2 * hz);
+	/* baud should be rounded up */
+	if (sclk % (2 * hz))
+		baud += 1;
+	if (baud < 2)
+		baud = 2;
+	else if (baud > (u16)-1)
+		baud = -1;
+	bss->baud = baud;
+}
+
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 		unsigned int max_hz, unsigned int mode)
 {
 	struct bfin_spi_slave *bss;
-	ulong sclk;
 	u32 mmr_base;
-	u32 baud;
 
 	if (!spi_cs_is_valid(bus, cs))
 		return NULL;
@@ -166,16 +182,6 @@
 		default: return NULL;
 	}
 
-	sclk = get_sclk();
-	baud = sclk / (2 * max_hz);
-	/* baud should be rounded up */
-	if (sclk % (2 * max_hz))
-		baud += 1;
-	if (baud < 2)
-		baud = 2;
-	else if (baud > (u16)-1)
-		baud = -1;
-
 	bss = malloc(sizeof(*bss));
 	if (!bss)
 		return NULL;
@@ -187,8 +193,8 @@
 	if (mode & SPI_CPHA) bss->ctl |= CPHA;
 	if (mode & SPI_CPOL) bss->ctl |= CPOL;
 	if (mode & SPI_LSB_FIRST) bss->ctl |= LSBF;
-	bss->baud = baud;
 	bss->flg = mode & SPI_CS_HIGH ? 1 : 0;
+	spi_set_speed(&bss->slave, max_hz);
 
 	debug("%s: bus:%i cs:%i mmr:%x ctl:%x baud:%i flg:%i\n", __func__,
 		bus, cs, mmr_base, bss->ctl, baud, bss->flg);
diff --git a/include/configs/bf506f-ezkit.h b/include/configs/bf506f-ezkit.h
index 3580ec6..77b6735 100644
--- a/include/configs/bf506f-ezkit.h
+++ b/include/configs/bf506f-ezkit.h
@@ -82,6 +82,8 @@
  */
 #define CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_SIZE 0x400
+#undef CONFIG_CMD_EXPORTENV
+#undef CONFIG_CMD_IMPORTENV
 
 
 /*
diff --git a/include/configs/bf527-ad7160-eval.h b/include/configs/bf527-ad7160-eval.h
index 889bfde..9c35f2d 100644
--- a/include/configs/bf527-ad7160-eval.h
+++ b/include/configs/bf527-ad7160-eval.h
@@ -128,9 +128,8 @@
  * SPI_MMC Settings
  */
 #define CONFIG_MMC
-#define CONFIG_CMD_EXT2
-#define CONFIG_SPI_MMC
-#define CONFIG_SPI_MMC_DEFAULT_CS (MAX_CTRL_CS + GPIO_PH3)
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC_SPI
 
 
 /*
diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h
index 3da2375..c31e914 100644
--- a/include/configs/bf537-stamp.h
+++ b/include/configs/bf537-stamp.h
@@ -137,7 +137,8 @@
  * SPI_MMC Settings
  */
 #define CONFIG_MMC
-#define CONFIG_SPI_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC_SPI
 
 
 /*
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index a9c66be..3312681 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -34,10 +34,14 @@
 #  define CONFIG_DOS_PARTITION
 # endif
 # ifdef CONFIG_MMC
+#  define CONFIG_CMD_EXT2
 #  define CONFIG_CMD_FAT
 #  define CONFIG_CMD_MMC
 #  define CONFIG_DOS_PARTITION
 # endif
+# ifdef CONFIG_MMC_SPI
+#  define CONFIG_CMD_MMC_SPI
+# endif
 # ifdef CONFIG_USB
 #  define CONFIG_CMD_EXT2
 #  define CONFIG_CMD_FAT
@@ -273,6 +277,7 @@
  */
 #ifdef CONFIG_SPI_FLASH_ALL
 # define CONFIG_SPI_FLASH_ATMEL
+# define CONFIG_SPI_FLASH_EON
 # define CONFIG_SPI_FLASH_MACRONIX
 # define CONFIG_SPI_FLASH_SPANSION
 # define CONFIG_SPI_FLASH_SST
diff --git a/include/spi.h b/include/spi.h
index 320e50e..7887d0f9 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -176,6 +176,14 @@
 void spi_cs_deactivate(struct spi_slave *slave);
 
 /*-----------------------------------------------------------------------
+ * Set transfer speed.
+ * This sets a new speed to be applied for next spi_xfer().
+ *   slave:	The SPI slave
+ *   hz:	The transfer speed
+ */
+void spi_set_speed(struct spi_slave *slave, uint hz);
+
+/*-----------------------------------------------------------------------
  * Write 8 bits, then read 8 bits.
  *   slave:	The SPI slave we're communicating with
  *   byte:	Byte to be written