[PATCH] spi: imx: Implement set_speed
Marek Vasut
marex at denx.de
Thu Feb 25 21:51:50 CET 2021
The set_speed() callback should configure the bus speed, make it so.
Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Jagan Teki <jagan at amarulasolutions.com>
Cc: Stefano Babic <sbabic at denx.de>
---
drivers/spi/mxc_spi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index bb68eb90e91..bce5356b294 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -662,7 +662,10 @@ static int mxc_spi_release_bus(struct udevice *dev)
static int mxc_spi_set_speed(struct udevice *bus, uint speed)
{
- /* Nothing to do */
+ struct mxc_spi_slave *mxcs = dev_get_platdata(bus);
+
+ mxcs->max_hz = speed;
+
return 0;
}
--
2.30.0
More information about the U-Boot
mailing list