Merge branch 'master' of git://git.denx.de/u-boot-spi
diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers/mtd/spi/spi_flash_ids.c
index c45d2e8..54d491c 100644
--- a/drivers/mtd/spi/spi_flash_ids.c
+++ b/drivers/mtd/spi/spi_flash_ids.c
@@ -110,7 +110,7 @@
 	{"s25fl256s_256k", INFO(0x010219, 0x4d00, 256 * 1024,   128, RD_FULL | WR_QPP) },
 	{"s25fs256s_64k",  INFO6(0x010219, 0x4d0181, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) },
 	{"s25fl256s_64k",  INFO(0x010219, 0x4d01,  64 * 1024,   512, RD_FULL | WR_QPP) },
-	{"s25fs512s",      INFO6(0x010220, 0x4d0081, 128 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) },
+	{"s25fs512s",      INFO6(0x010220, 0x4d0081, 256 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
 	{"s25fl512s_256k", INFO(0x010220, 0x4d00, 256 * 1024,   256, RD_FULL | WR_QPP) },
 	{"s25fl512s_64k",  INFO(0x010220, 0x4d01,  64 * 1024,  1024, RD_FULL | WR_QPP) },
 	{"s25fl512s_512k", INFO(0x010220, 0x4f00, 256 * 1024,   256, RD_FULL | WR_QPP) },
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index b77129c..0dccc38 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -60,7 +60,7 @@
 static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs)
 {
 	if (CONFIG_IS_ENABLED(DM_SPI)) {
-		dm_gpio_set_value(&mxcs->ss, mxcs->ss_pol);
+		dm_gpio_set_value(&mxcs->ss, 1);
 	} else {
 		if (mxcs->gpio > 0)
 			gpio_set_value(mxcs->gpio, mxcs->ss_pol);
@@ -70,7 +70,7 @@
 static void mxc_spi_cs_deactivate(struct mxc_spi_slave *mxcs)
 {
 	if (CONFIG_IS_ENABLED(DM_SPI)) {
-		dm_gpio_set_value(&mxcs->ss, !(mxcs->ss_pol));
+		dm_gpio_set_value(&mxcs->ss, 0);
 	} else {
 		if (mxcs->gpio > 0)
 			gpio_set_value(mxcs->gpio, !(mxcs->ss_pol));
@@ -504,11 +504,11 @@
 		return -EINVAL;
 	}
 
-	plat->base = dev_get_addr(bus);
+	plat->base = devfdt_get_addr(bus);
 	if (plat->base == FDT_ADDR_T_NONE)
 		return -ENODEV;
 
-	ret = dm_gpio_set_value(&plat->ss, !(mxcs->ss_pol));
+	ret = dm_gpio_set_value(&plat->ss, 0);
 	if (ret) {
 		dev_err(bus, "Setting cs error\n");
 		return ret;
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 4169abd..766436e 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -590,6 +590,8 @@
 	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
 
 	priv->cs = slave_plat->cs;
+	priv->freq = slave_plat->max_hz;
+
 	_omap3_spi_claim_bus(priv);
 
 	return 0;
@@ -648,12 +650,10 @@
 
 static int omap3_spi_set_speed(struct udevice *dev, unsigned int speed)
 {
-	struct udevice *bus = dev->parent;
-	struct omap3_spi_priv *priv = dev_get_priv(bus);
-	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
 
-	priv->cs = slave_plat->cs;
-	priv->freq = slave_plat->max_hz;
+	struct omap3_spi_priv *priv = dev_get_priv(dev);
+
+	priv->freq = speed;
 	_omap3_spi_set_speed(priv);
 
 	return 0;
@@ -661,12 +661,10 @@
 
 static int omap3_spi_set_mode(struct udevice *dev, uint mode)
 {
-	struct udevice *bus = dev->parent;
-	struct omap3_spi_priv *priv = dev_get_priv(bus);
-	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+	struct omap3_spi_priv *priv = dev_get_priv(dev);
 
-	priv->cs = slave_plat->cs;
-	priv->mode = slave_plat->mode;
+	priv->mode = mode;
+
 	_omap3_spi_set_mode(priv);
 
 	return 0;
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index ee8796d..9ad1927 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -486,7 +486,7 @@
 		break;
 	}
 
-	return 0;
+	return status;
 }
 
 static int zynq_qspi_claim_bus(struct udevice *dev)