summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Schmelzer <oe5hpm@oevsv.at>2018-06-02 08:06:47 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-06-25 15:35:01 +0530
commitb1d2b529b4137740f7f1575ba3d6561297a6a848 (patch)
tree892d26a9ffe6fef173d8939e713972aa55b662b1
parent34ad74914140dc6060b56a27641c686e86d7a9a4 (diff)
downloadu-boot-b1d2b529b4137740f7f1575ba3d6561297a6a848.tar.gz
u-boot-b1d2b529b4137740f7f1575ba3d6561297a6a848.tar.bz2
u-boot-b1d2b529b4137740f7f1575ba3d6561297a6a848.zip
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 <oe5hpm@oevsv.at> Reviewed-by: Jagan Teki <jagan@openedev.com>
-rw-r--r--drivers/spi/omap3_spi.c2
1 files changed, 2 insertions, 0 deletions
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;