]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: rockchip_sfc: Use linux rockchip,sfc-no-dma prop
authorJonas Karlman <jonas@kwiboo.se>
Wed, 17 May 2023 18:26:28 +0000 (18:26 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Thu, 18 May 2023 00:44:04 +0000 (08:44 +0800)
Use the same prop as linux to control the use of fifo or dma mode. Also
add a u-boot,spl-sfc-no-dma prop to control the same in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/spi/rockchip_sfc.c

index 851a6482985b6d6eccfb5e6a02a3a64ef8c82c4b..596c22aa01086aa229d68eb16046e6ceb5a1ffdd 100644 (file)
@@ -227,10 +227,10 @@ static int rockchip_sfc_ofdata_to_platdata(struct udevice *bus)
        struct rockchip_sfc *sfc = dev_get_plat(bus);
 
        sfc->regbase = dev_read_addr_ptr(bus);
-       if (ofnode_read_bool(dev_ofnode(bus), "sfc-no-dma"))
-               sfc->use_dma = false;
-       else
-               sfc->use_dma = true;
+       sfc->use_dma = !dev_read_bool(bus, "rockchip,sfc-no-dma");
+
+       if (IS_ENABLED(CONFIG_SPL_BUILD) && sfc->use_dma)
+               sfc->use_dma = !dev_read_bool(bus, "u-boot,spl-sfc-no-dma");
 
 #if CONFIG_IS_ENABLED(CLK)
        int ret;