mbox series

[v2,0/2] dfu: sf: fix flash probe when DM_SPI_FLASH is enabled

Message ID 20241001-uboot-topic-dfu-sf-dt-v2-0-67f7acfa3ff5@linaro.org
Headers show
Series dfu: sf: fix flash probe when DM_SPI_FLASH is enabled | expand

Message

Neil Armstrong Oct. 1, 2024, 4:06 p.m. UTC
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.armstrong@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-8cf38451eea4@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,