[PATCH 01/14] spi: rockchip_sfc: Use linux rockchip,sfc-no-dma prop

Kever Yang kever.yang at rock-chips.com
Sat May 6 11:47:01 CEST 2023


On 2023/4/22 09:23, Jonas Karlman wrote:
> 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 at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/spi/rockchip_sfc.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/rockchip_sfc.c b/drivers/spi/rockchip_sfc.c
> index 851a6482985b..1c26802c618e 100644
> --- a/drivers/spi/rockchip_sfc.c
> +++ b/drivers/spi/rockchip_sfc.c
> @@ -227,10 +227,12 @@ 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");
> +
> +#ifdef CONFIG_SPL_BUILD
> +	if (sfc->use_dma)
> +		sfc->use_dma = !dev_read_bool(bus, "u-boot,spl-sfc-no-dma");
> +#endif
>   
>   #if CONFIG_IS_ENABLED(CLK)
>   	int ret;


More information about the U-Boot mailing list