[U-Boot] [PATCH 1/2] spi: omap3: pre-initialize bus-speed with max. slave-speed

Hannes Schmelzer oe5hpm at oevsv.at
Sat Jun 2 06:06:47 UTC 2018


Otherwise the frequency is zero and the clock divider cannot be setup by
'omap3_spi_set_speed' function.

Signed-off-by: Hannes Schmelzer <oe5hpm at oevsv.at>
---

 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 4169abd..a149abe 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.7.4



More information about the U-Boot mailing list