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
{
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);
{
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,
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;
}
else
priv->pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT;
priv->wordlen = SPI_DEFAULT_WORDLEN;
+
+ spi_reset(priv->regs);
+
return 0;
}