From b1d2b529b4137740f7f1575ba3d6561297a6a848 Mon Sep 17 00:00:00 2001 From: Hannes Schmelzer Date: Sat, 2 Jun 2018 08:06:47 +0200 Subject: [PATCH] spi: omap3: pre-initialize bus-speed with max. slave-speed Otherwise the frequency is zero and the clock divider cannot be setup by 'omap3_spi_set_speed' function. Signed-off-by: Hannes Schmelzer Reviewed-by: Jagan Teki --- drivers/spi/omap3_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 4169abdef6..a149abec77 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -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; -- 2.39.5