summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/omap3_spi.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index a149abec77..766436ea5f 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -650,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;
@@ -663,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;