Merge branch 'master' of git://git.denx.de/u-boot-spi
This commit is contained in:
commit
fb77a9e353
@ -110,7 +110,7 @@ const struct spi_flash_info spi_flash_ids[] = {
|
||||
{"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) },
|
||||
|
@ -60,7 +60,7 @@ static inline struct mxc_spi_slave *to_mxc_spi_slave(struct spi_slave *slave)
|
||||
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_activate(struct mxc_spi_slave *mxcs)
|
||||
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 @@ static int mxc_spi_probe(struct udevice *bus)
|
||||
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;
|
||||
|
@ -590,6 +590,8 @@ static int omap3_spi_claim_bus(struct udevice *dev)
|
||||
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_xfer(struct udevice *dev, unsigned int bitlen,
|
||||
|
||||
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_speed(struct udevice *dev, unsigned int speed)
|
||||
|
||||
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->mode = mode;
|
||||
|
||||
priv->cs = slave_plat->cs;
|
||||
priv->mode = slave_plat->mode;
|
||||
_omap3_spi_set_mode(priv);
|
||||
|
||||
return 0;
|
||||
|
@ -486,7 +486,7 @@ static int zynq_qspi_transfer(struct zynq_qspi_priv *priv)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
static int zynq_qspi_claim_bus(struct udevice *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user