With DM_SPI_FLASH is enabled, the code uses the legacy SPI FLASH code leading to probable errors since it doesn't use speed and mode provided by DT.
This adds the DM functions as dummy inline functions to add both legacy and DM support in DFU sf code avoiding using #if/#else conditionals. Signed-off-by: Neil Armstrong <neil.armstr...@linaro.org> --- Changes in v2: - switch to if(IS_ENABLED()) - add SPI FLASH DM functions as dummy inline functions - Link to v1: https://lore.kernel.org/r/20240917-uboot-topic-dfu-sf-dt-v1-1-8cf38451e...@linaro.org --- Neil Armstrong (2): spi: add DM_SPI_FLASH compatibility inline functions dfu: sf: rely on DT for spi speed and mode drivers/dfu/dfu_sf.c | 16 +++++++++++++++- include/spi_flash.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) --- base-commit: 19dbc09405d3503ce3efef3c2e4b4f0f1a03372d change-id: 20240917-uboot-topic-dfu-sf-dt-8ae62e5c7d79 Best regards, -- Neil Armstrong <neil.armstr...@linaro.org>