Merge tag 'xilinx-for-v2023.01-rc3' of https://source.denx.de/u-boot/custodians/u...
[platform/kernel/u-boot.git] / drivers / spi / soft_spi.c
index afc98bf..f3602a2 100644 (file)
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
@@ -228,7 +229,7 @@ static const struct dm_spi_ops soft_spi_ops = {
 
 static int soft_spi_of_to_plat(struct udevice *dev)
 {
-       struct soft_spi_plat *plat = dev->plat;
+       struct soft_spi_plat *plat = dev_get_plat(dev);
        const void *blob = gd->fdt_blob;
        int node = dev_of_offset(dev);
 
@@ -240,7 +241,7 @@ static int soft_spi_of_to_plat(struct udevice *dev)
 static int soft_spi_probe(struct udevice *dev)
 {
        struct spi_slave *slave = dev_get_parent_priv(dev);
-       struct soft_spi_plat *plat = dev->plat;
+       struct soft_spi_plat *plat = dev_get_plat(dev);
        int cs_flags, clk_flags;
        int ret;