diff options
-rw-r--r-- | drivers/mtd/spi/spi_flash_ids.c | 4 | ||||
-rw-r--r-- | drivers/spi/omap3_spi.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers/mtd/spi/spi_flash_ids.c index 54d491c873..9212373dae 100644 --- a/drivers/mtd/spi/spi_flash_ids.c +++ b/drivers/mtd/spi/spi_flash_ids.c @@ -134,8 +134,8 @@ const struct spi_flash_info spi_flash_ids[] = { {"n25q64a", INFO(0x20bb17, 0x0, 64 * 1024, 128, RD_FULL | WR_QPP | SECT_4K) }, {"n25q128", INFO(0x20ba18, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP) }, {"n25q128a", INFO(0x20bb18, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP) }, - {"n25q256", INFO(0x20ba19, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) }, - {"n25q256a", INFO(0x20bb19, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) }, + {"n25q256", INFO(0x20ba19, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | E_FSR | SECT_4K) }, + {"n25q256a", INFO(0x20bb19, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | E_FSR | SECT_4K) }, {"n25q512", INFO(0x20ba20, 0x0, 64 * 1024, 1024, RD_FULL | WR_QPP | E_FSR | SECT_4K) }, {"n25q512a", INFO(0x20bb20, 0x0, 64 * 1024, 1024, RD_FULL | WR_QPP | E_FSR | SECT_4K) }, {"n25q1024", INFO(0x20ba21, 0x0, 64 * 1024, 2048, RD_FULL | WR_QPP | E_FSR | SECT_4K) }, diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 766436ea5f..ecf54bb714 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -443,9 +443,6 @@ static void spi_reset(struct mcspi *regs) static void _omap3_spi_claim_bus(struct omap3_spi_priv *priv) { unsigned int conf; - - spi_reset(priv->regs); - /* * setup when switching from (reset default) slave mode * to single-channel master mode @@ -480,6 +477,8 @@ int spi_claim_bus(struct spi_slave *slave) { struct omap3_spi_priv *priv = to_omap3_spi(slave); + spi_reset(priv->regs); + _omap3_spi_claim_bus(priv); _omap3_spi_set_wordlen(priv); _omap3_spi_set_mode(priv); @@ -492,8 +491,7 @@ void spi_release_bus(struct spi_slave *slave) { struct omap3_spi_priv *priv = to_omap3_spi(slave); - /* Reset the SPI hardware */ - spi_reset(priv->regs); + writel(OMAP3_MCSPI_MODULCTRL_MS, &priv->regs->modulctrl); } struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, @@ -602,8 +600,7 @@ static int omap3_spi_release_bus(struct udevice *dev) struct udevice *bus = dev->parent; struct omap3_spi_priv *priv = dev_get_priv(bus); - /* Reset the SPI hardware */ - spi_reset(priv->regs); + writel(OMAP3_MCSPI_MODULCTRL_MS, &priv->regs->modulctrl); return 0; } @@ -636,6 +633,9 @@ static int omap3_spi_probe(struct udevice *dev) else priv->pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT; priv->wordlen = SPI_DEFAULT_WORDLEN; + + spi_reset(priv->regs); + return 0; } |