spi: omap3: pre-initialize bus-speed with max. slave-speed
authorHannes Schmelzer <oe5hpm@oevsv.at>
Sat, 2 Jun 2018 06:06:47 +0000 (08:06 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 25 Jun 2018 10:05:01 +0000 (15:35 +0530)
Otherwise the frequency is zero and the clock divider cannot be setup by
'omap3_spi_set_speed' function.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/omap3_spi.c

index 4169abdef673131ca31f9973253a76bf25c01b91..a149abec775998145d5e72bd0fdd5b45cf0a1b85 100644 (file)
@@ -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;