From: Marek Vasut <marex@denx.de>
Date: Wed, 3 Feb 2021 16:53:57 +0000 (+0100)
Subject: spi: imx: Implement set_speed
X-Git-Tag: v2025.01-rc5-pxa1908~1987^2~9
X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=c1d264e84e92a637b73a0db7be7e973fee816ccd;p=u-boot.git

spi: imx: Implement set_speed

The set_speed() callback should configure the bus speed, make it so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index bb68eb90e9..f3dddbdbd7 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_plat(bus);
+
+	mxcs->max_hz = speed;
+
 	return 0;
 }