]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: imx: Implement set_speed
authorMarek Vasut <marex@denx.de>
Wed, 3 Feb 2021 16:53:57 +0000 (17:53 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 26 Feb 2021 07:55:21 +0000 (13:25 +0530)
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>
drivers/spi/mxc_spi.c

index bb68eb90e919d053c6c6dc163eb2282be9dabd45..f3dddbdbd73a12f32606babc2ce2bd8a91dcba3a 100644 (file)
@@ -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;
 }