[PATCH v4 00/14] Makefile: Update migration warnings

The code that produces the migration warnings is quite tedious to understanding and modify. This series updates it to use a common function to handle the logic, so that the message definition is quite short and has no duplication in it.
It is still necessary to write a message in migration.rst however.
This series came out of a patch intended to add an I2C warning.
It also renames CONFIG_DM_RESET; it does not need to be migrated since it already uses driver model.
Changes in v4: - Refactored the warning code to make it easier to get this right - Add GPIO deprecation as well - Add patches to rename DM_RESET to RESET
Changes in v3: - s/'network'/I2C/ again
Changes in v2: - s/'network'/I2C/
Simon Glass (14): Makefile: Move non-DM migration messages to the top Makefile: Add common code to report deprecation Makefile: Use common code for MMC deprecation warning Makefile: Use common code for USB deprecation warning Makefile: Use common code for MVSATA_IDE deprecation warning Makefile: Use common code for LIBATA deprecation warning Makefile: Use common code for PCI deprecation warning Makefile: Use common code for DM_VIDEO deprecation warning Makefile: Use common code for SPI_FLASH deprecation warning Makefile: Use common code for WDT deprecation warning Makefile: Use common code for DM_ETH deprecation warning Makefile: Drop the old SPI flash migration message dm: i2c: Add a migration method for I2C dm: gpio: Add a migration message for GPIO
Makefile | 157 +++++++++++---------------------- doc/driver-model/migration.rst | 16 ++++ 2 files changed, 67 insertions(+), 106 deletions(-)

At present the driver model migration messages are mixed with the others. Collect them together before starting to refactor them.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile index b72d8d20c08..b735a6ae6cd 100644 --- a/Makefile +++ b/Makefile @@ -1037,6 +1037,21 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) endif endif endif +ifeq ($(CONFIG_OF_EMBED),y) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "CONFIG_OF_EMBED is enabled. This option should only" + @echo >&2 "be used for debugging purposes. Please use" + @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline." + @echo >&2 "See doc/README.fdt-control for more info." + @echo >&2 "====================================================" +endif +ifneq ($(CONFIG_SPL_FIT_GENERATOR),) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate" + @echo >&2 "to binman instead, to avoid the proliferation of" + @echo >&2 "arch-specific scripts with no tests." + @echo >&2 "====================================================" +endif ifneq ($(CONFIG_DM),y) @echo >&2 "===================== WARNING ======================" @echo >&2 "This board does not use CONFIG_DM. CONFIG_DM will be" @@ -1106,14 +1121,6 @@ ifneq ($(CONFIG_DM_VIDEO),y) @echo >&2 "====================================================" endif endif -ifeq ($(CONFIG_OF_EMBED),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "CONFIG_OF_EMBED is enabled. This option should only" - @echo >&2 "be used for debugging purposes. Please use" - @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline." - @echo >&2 "See doc/README.fdt-control for more info." - @echo >&2 "====================================================" -endif ifeq ($(CONFIG_SPI_FLASH),y) ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "===================== WARNING ======================" @@ -1145,13 +1152,6 @@ ifneq ($(CONFIG_DM_ETH),y) @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif -endif -ifneq ($(CONFIG_SPL_FIT_GENERATOR),) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate" - @echo >&2 "to binman instead, to avoid the proliferation of" - @echo >&2 "arch-specific scripts with no tests." - @echo >&2 "====================================================" endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG

On Thu, Mar 25, 2021 at 09:24:32PM +1300, Simon Glass wrote:
At present the driver model migration messages are mixed with the others. Collect them together before starting to refactor them.
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Add a function which can be called to report a migration problem. This will make it easier to add new migration checks, since the logic and strings are not spread out over 8 lines of code.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/Makefile b/Makefile index b735a6ae6cd..063f88d3103 100644 --- a/Makefile +++ b/Makefile @@ -1017,6 +1017,33 @@ quiet_cmd_cfgcheck = CFGCHK $2 cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ $(srctree)/scripts/config_whitelist.txt $(srctree)
+# Concat the value of all the CONFIGs (result is 'y' or 'yy', etc. ) +got = $(foreach cfg,$(1),$($(cfg))) + +# expected value 'y for each one +expect = $(foreach cfg,$(1),y) + +# Show a deprecation message +# Args: +# 1: List of CONFIG_DM_... to migrate to (e.g. "CONFIG_DM_MMC CONFIG_BLK") +# 2: Name of component (e.g . "Ethernet drivers") +# 3: Release deadline (e.g. "v202.07") +# 4: Condition to require before checking (e.g. "$(CONFIG_NET)") +# Note: Script avoids bash construct, hence the strange double 'if' +# (patches welcome!) +define deprecated + if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \ + echo >&2 "===================== WARNING ======================"; \ + echo >&2 "This board does not use $(firstword $(1)) (Driver Model"; \ + echo >&2 "for $(2)). Please update the board to use"; \ + echo >&2 "$(firstword $(1)) before the $(3) release. Failure to"; \ + echo >&2 "update by the deadline may result in board removal."; \ + echo >&2 "See doc/driver-model/migration.rst for more info."; \ + echo >&2 "===================================================="; \ + fi; fi + +endef + PHONY += inputs inputs: $(INPUTS-y)

On Thu, Mar 25, 2021 at 09:24:33PM +1300, Simon Glass wrote:
Add a function which can be called to report a migration problem. This will make it easier to add new migration checks, since the logic and strings are not spread out over 8 lines of code.
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the MMC check to use the 'deprecated' function.
Tested with zc5202
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_MMC. Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_MMC (Driver Model for MMC). Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index 063f88d3103..3e73b813d91 100644 --- a/Makefile +++ b/Makefile @@ -1087,16 +1087,7 @@ ifneq ($(CONFIG_DM),y) @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif -ifeq ($(CONFIG_MMC),y) -ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_MMC. Please update" - @echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) ifeq ($(CONFIG_USB),y) ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:34PM +1300, Simon Glass wrote:
Update the MMC check to use the 'deprecated' function.
Tested with zc5202
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_MMC. Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_MMC (Driver Model for MMC). Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the USB check to use the 'deprecated' function.
Tested with xpress
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_USB (Driver Model for USB). Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index 3e73b813d91..98040677180 100644 --- a/Makefile +++ b/Makefile @@ -1088,16 +1088,8 @@ ifneq ($(CONFIG_DM),y) @echo >&2 "====================================================" endif $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) -ifeq ($(CONFIG_USB),y) -ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_USB. Please update" - @echo >&2 "the board to use CONFIG_DM_USB before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_USB CONFIG_OF_CONTROL CONFIG_BLK,\ + USB,v2019.07,$(CONFIG_USB)) ifeq ($(CONFIG_MVSATA_IDE),y) @echo >&2 "===================== WARNING ======================" @echo >&2 "This board does use CONFIG_MVSATA_IDE which is not"

On Thu, Mar 25, 2021 at 09:24:35PM +1300, Simon Glass wrote:
Update the USB check to use the 'deprecated' function.
Tested with xpress
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_USB (Driver Model for USB). Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_MVSATA_IDE check to use the 'deprecated' function.
Tested with nas220
Old message:
===================== WARNING ====================== This board does use CONFIG_MVSATA_IDE which is not ported to driver-model (DM) yet. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index 98040677180..366a63fc4b7 100644 --- a/Makefile +++ b/Makefile @@ -1090,16 +1090,8 @@ endif $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) $(call deprecated,CONFIG_DM_USB CONFIG_OF_CONTROL CONFIG_BLK,\ USB,v2019.07,$(CONFIG_USB)) -ifeq ($(CONFIG_MVSATA_IDE),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does use CONFIG_MVSATA_IDE which is not" - @echo >&2 "ported to driver-model (DM) yet. Please update the storage" - @echo >&2 "controller driver to use CONFIG_AHCI before the v2019.07" - @echo >&2 "release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif + $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ + $(CONFIG_MVSATA_IDE)) ifeq ($(CONFIG_LIBATA),y) ifneq ($(CONFIG_AHCI),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:36PM +1300, Simon Glass wrote:
Update the CONFIG_MVSATA_IDE check to use the 'deprecated' function.
Tested with nas220
Old message:
===================== WARNING ====================== This board does use CONFIG_MVSATA_IDE which is not ported to driver-model (DM) yet. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_LIBATA check to use the 'deprecated' function.
Tested with MPC8349ITX
Old message:
===================== WARNING ====================== This board does use CONFIG_LIBATA but has CONFIG_AHCI not enabled. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/Makefile b/Makefile index 366a63fc4b7..b8419a0924d 100644 --- a/Makefile +++ b/Makefile @@ -1092,17 +1092,7 @@ endif USB,v2019.07,$(CONFIG_USB)) $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ $(CONFIG_MVSATA_IDE)) -ifeq ($(CONFIG_LIBATA),y) -ifneq ($(CONFIG_AHCI),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does use CONFIG_LIBATA but has CONFIG_AHCI not" - @echo >&2 "enabled. Please update the storage controller driver to use" - @echo >&2 "CONFIG_AHCI before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) ifeq ($(CONFIG_PCI),y) ifneq ($(CONFIG_DM_PCI),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:37PM +1300, Simon Glass wrote:
Update the CONFIG_LIBATA check to use the 'deprecated' function.
Tested with MPC8349ITX
Old message:
===================== WARNING ====================== This board does use CONFIG_LIBATA but has CONFIG_AHCI not enabled. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_DM_PCI check to use the 'deprecated' function.
Tested with MPC8349ITX
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_PCI Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_PCI (Driver Model for PCI). Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index b8419a0924d..0b1f207f74d 100644 --- a/Makefile +++ b/Makefile @@ -1093,16 +1093,7 @@ endif $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ $(CONFIG_MVSATA_IDE)) $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) -ifeq ($(CONFIG_PCI),y) -ifneq ($(CONFIG_DM_PCI),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_PCI Please update" - @echo >&2 "the board to use CONFIG_DM_PCI before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) ifneq ($(CONFIG_LCD)$(CONFIG_VIDEO),) ifneq ($(CONFIG_DM_VIDEO),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:38PM +1300, Simon Glass wrote:
Update the CONFIG_DM_PCI check to use the 'deprecated' function.
Tested with MPC8349ITX
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_PCI Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_PCI (Driver Model for PCI). Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_DM_VIDEO check to use the 'deprecated' function.
Tested with pxm2
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO (Driver Model for video). Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index 0b1f207f74d..a059a46abfc 100644 --- a/Makefile +++ b/Makefile @@ -1094,16 +1094,8 @@ endif $(CONFIG_MVSATA_IDE)) $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) -ifneq ($(CONFIG_LCD)$(CONFIG_VIDEO),) -ifneq ($(CONFIG_DM_VIDEO),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_VIDEO Please update" - @echo >&2 "the board to use CONFIG_DM_VIDEO before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_VIDEO,video,v2019.07,\ + $(CONFIG_LCD)$(CONFIG_VIDEO)) ifeq ($(CONFIG_SPI_FLASH),y) ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:39PM +1300, Simon Glass wrote:
Update the CONFIG_DM_VIDEO check to use the 'deprecated' function.
Tested with pxm2
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO (Driver Model for video). Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_DM_SPI_FLASH check to use the 'deprecated' function.
Tested with vinco
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH (Driver Model for SPI flash). Please update the board to use CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile index a059a46abfc..944b5c28bfa 100644 --- a/Makefile +++ b/Makefile @@ -1096,16 +1096,8 @@ endif $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) $(call deprecated,CONFIG_DM_VIDEO,video,v2019.07,\ $(CONFIG_LCD)$(CONFIG_VIDEO)) -ifeq ($(CONFIG_SPI_FLASH),y) -ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_SPI_FLASH. Please update" - @echo >&2 "the board to use CONFIG_SPI_FLASH before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_SPI_FLASH,SPI flash,v2019.07,\ + $(CONFIG_SPI_FLASH)) ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),) ifneq ($(CONFIG_WDT),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:40PM +1300, Simon Glass wrote:
Update the CONFIG_DM_SPI_FLASH check to use the 'deprecated' function.
Tested with vinco
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH (Driver Model for SPI flash). Please update the board to use CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_WDT check to use the 'deprecated' function.
Tested with kmcent2
Old message:
===================== WARNING ====================== This board does not use CONFIG_WDT (DM watchdog support). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_WDT (Driver Model for DM watchdog). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile index 944b5c28bfa..3cb607ac735 100644 --- a/Makefile +++ b/Makefile @@ -1098,17 +1098,8 @@ endif $(CONFIG_LCD)$(CONFIG_VIDEO)) $(call deprecated,CONFIG_DM_SPI_FLASH,SPI flash,v2019.07,\ $(CONFIG_SPI_FLASH)) -ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),) -ifneq ($(CONFIG_WDT),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_WDT (DM watchdog support)." - @echo >&2 "Please update the board to use CONFIG_WDT before the" - @echo >&2 "v2019.10 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ + $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) ifneq ($(CONFIG_NET),) ifneq ($(CONFIG_DM_ETH),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:41PM +1300, Simon Glass wrote:
Update the CONFIG_WDT check to use the 'deprecated' function.
Tested with kmcent2
Old message:
===================== WARNING ====================== This board does not use CONFIG_WDT (DM watchdog support). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_WDT (Driver Model for DM watchdog). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Update the CONFIG_DM_ETH check to use the 'deprecated' function.
Tested with snow
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/Makefile b/Makefile index 3cb607ac735..c3382179dcc 100644 --- a/Makefile +++ b/Makefile @@ -1100,17 +1100,7 @@ endif $(CONFIG_SPI_FLASH)) $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) -ifneq ($(CONFIG_NET),) -ifneq ($(CONFIG_DM_ETH),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model" - @echo >&2 "for Ethernet drivers). Please update the board to use" - @echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to" - @echo >&2 "update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added.

On Thu, Mar 25, 2021 at 09:24:42PM +1300, Simon Glass wrote:
Update the CONFIG_DM_ETH check to use the 'deprecated' function.
Tested with snow
Old message:
===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
New message:
===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ====================================================
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

This message does not seem to make sense. It may be out of date. Drop it.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/Makefile b/Makefile index c3382179dcc..58e4d84b0fc 100644 --- a/Makefile +++ b/Makefile @@ -1058,11 +1058,6 @@ endif
ifeq ($(CONFIG_DEPRECATED),y) $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") -ifeq ($(CONFIG_SPI),y) -ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) - $(warning "The relevant config item with associated code will remove in v2019.07 release.") -endif -endif endif ifeq ($(CONFIG_OF_EMBED),y) @echo >&2 "===================== WARNING ======================"

On Thu, Mar 25, 2021 at 09:24:43PM +1300, Simon Glass wrote:
This message does not seem to make sense. It may be out of date. Drop it.
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 1 + doc/driver-model/migration.rst | 8 ++++++++ 2 files changed, 9 insertions(+)
diff --git a/Makefile b/Makefile index 58e4d84b0fc..25e8f19a0cb 100644 --- a/Makefile +++ b/Makefile @@ -1096,6 +1096,7 @@ endif $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) + $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2020.07,$(CONFIG_I2C)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. diff --git a/doc/driver-model/migration.rst b/doc/driver-model/migration.rst index 2284e8a6f70..8d0bb7635b5 100644 --- a/doc/driver-model/migration.rst +++ b/doc/driver-model/migration.rst @@ -99,3 +99,11 @@ Deadline: 2020.07 The network subsystem has supported the driver model since early 2015. Maintainers should submit patches switching over to using CONFIG_DM_ETH and other base driver model options in time for inclusion in the 2020.07 release. + +CONFIG_DM_I2C +------------- +Deadline: 2021.10 + +The I2C subsystem has supported the driver model since early 2015. +Maintainers should submit patches switching over to using CONFIG_DM_I2C and +other base driver model options in time for inclusion in the 2021.10 release.

On Thu, Mar 25, 2021 at 09:24:44PM +1300, Simon Glass wrote:
This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers.
Signed-off-by: Simon Glass sjg@chromium.org
After changing the date to v2022.04 (we must gave 1 year on new notices), applied to u-boot/master, thanks!

This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v4: - Refactored the warning code to make it easier to get this right - Add GPIO deprecation as well - Add patches to rename DM_RESET to RESET
Changes in v3: - s/'network'/I2C/ again
Changes in v2: - s/'network'/I2C/
Makefile | 1 + doc/driver-model/migration.rst | 8 ++++++++ 2 files changed, 9 insertions(+)
diff --git a/Makefile b/Makefile index 25e8f19a0cb..8e70da8d017 100644 --- a/Makefile +++ b/Makefile @@ -1097,6 +1097,7 @@ endif $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2020.07,$(CONFIG_I2C)) + $(call deprecated,CONFIG_DM_GPIO,GPIO drivers,v2020.07,$(CONFIG_GPIO)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. diff --git a/doc/driver-model/migration.rst b/doc/driver-model/migration.rst index 8d0bb7635b5..20ff2c94b94 100644 --- a/doc/driver-model/migration.rst +++ b/doc/driver-model/migration.rst @@ -107,3 +107,11 @@ Deadline: 2021.10 The I2C subsystem has supported the driver model since early 2015. Maintainers should submit patches switching over to using CONFIG_DM_I2C and other base driver model options in time for inclusion in the 2021.10 release. + +CONFIG_DM_GPIO +-------------- +Deadline: 2021.10 + +The GPIO subsystem has supported the driver model since early 2014. +Maintainers should submit patches switching over to using CONFIG_DM_GPIO and +other base driver model options in time for inclusion in the 2021.10 release.

On Thu, Mar 25, 2021 at 09:24:45PM +1300, Simon Glass wrote:
This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers.
Signed-off-by: Simon Glass sjg@chromium.org
After doing a world build of this, there are no warnings issued about DM_GPIO, so I'm not applying this patch. I'm going to fire up a quick patch to setup defaults and so forth next, to see what happens.

On Sat, Mar 27, 2021 at 11:58:14AM -0400, Tom Rini wrote:
On Thu, Mar 25, 2021 at 09:24:45PM +1300, Simon Glass wrote:
This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers.
Signed-off-by: Simon Glass sjg@chromium.org
After doing a world build of this, there are no warnings issued about DM_GPIO, so I'm not applying this patch. I'm going to fire up a quick patch to setup defaults and so forth next, to see what happens.
Looking harder, there is: AT91_GPIO, DA8XX_GPIO, IPROC_GPIO, MXC_GPIO, MXS_GPIO, OMAP_GPIO, CMD_PCA953X, SUNXI_GPIO, CMD_TCA642X, GPIO_UNIPHIER in terms of GPIO drivers that do not spell out a dependency on DM/DM_GPIO. The next step here would be to see which of these do not use DM_GPIO today and work up some deprecation warning from there.

Hi Simon and Tom,
On Thu, Mar 25, 2021 at 4:26 PM Simon Glass sjg@chromium.org wrote:
The code that produces the migration warnings is quite tedious to understanding and modify. This series updates it to use a common function to handle the logic, so that the message definition is quite short and has no duplication in it.
It is still necessary to write a message in migration.rst however.
This series came out of a patch intended to add an I2C warning.
It also renames CONFIG_DM_RESET; it does not need to be migrated since it already uses driver model.
Changes in v4:
- Refactored the warning code to make it easier to get this right
- Add GPIO deprecation as well
- Add patches to rename DM_RESET to RESET
This series caused a bunch of output message when building a board without "V=1":
$ make if [ -n "y" ]; then if [ "y y" != "y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_MMC (Driver Model"; echo >&2 "for MMC). Please update the board to use"; echo >&2 "CONFIG_DM_MMC before the v2019.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ " y y" != "y y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_USB (Driver Model"; echo >&2 "for USB). Please update the board to use"; echo >&2 "CONFIG_DM_USB before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use"; echo
&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2
"update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI). Please update the board to use"; echo >&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_PCI (Driver Model"; echo >&2 "for PCI). Please update the board to use"; echo >&2 "CONFIG_DM_PCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_VIDEO (Driver Model"; echo >&2 "for video). Please update the board to use"; echo >&2 "CONFIG_DM_VIDEO before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_SPI_FLASH (Driver Model"; echo >&2 "for SPI flash). Please update the board to use"; echo >&2 "CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to"; echo
&2 "update by the deadline may result in board removal."; echo >&2
"See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_WDT (Driver Model"; echo >&2 "for DM watchdog). Please update the board to use"; echo >&2 "CONFIG_WDT before the v2019.10 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "y" ]; then if [ "y" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model"; echo >&2 "for Ethernet drivers). Please update the board to use"; echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_I2C (Driver Model"; echo >&2 "for I2C drivers). Please update the board to use"; echo >&2 "CONFIG_DM_I2C before the v2022.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi CFGCHK u-boot.cfg cat: u-boot.cfg: No such file or directory
Also these warnings do not sound correct to this board as the board does not support AHCI or VIDEO, etc.
Regards, Bin

On Wed, Mar 31, 2021 at 02:46:54PM +0800, Bin Meng wrote:
Hi Simon and Tom,
On Thu, Mar 25, 2021 at 4:26 PM Simon Glass sjg@chromium.org wrote:
The code that produces the migration warnings is quite tedious to understanding and modify. This series updates it to use a common function to handle the logic, so that the message definition is quite short and has no duplication in it.
It is still necessary to write a message in migration.rst however.
This series came out of a patch intended to add an I2C warning.
It also renames CONFIG_DM_RESET; it does not need to be migrated since it already uses driver model.
Changes in v4:
- Refactored the warning code to make it easier to get this right
- Add GPIO deprecation as well
- Add patches to rename DM_RESET to RESET
This series caused a bunch of output message when building a board without "V=1":
$ make if [ -n "y" ]; then if [ "y y" != "y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_MMC (Driver Model"; echo >&2 "for MMC). Please update the board to use"; echo >&2 "CONFIG_DM_MMC before the v2019.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ " y y" != "y y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_USB (Driver Model"; echo >&2 "for USB). Please update the board to use"; echo >&2 "CONFIG_DM_USB before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use"; echo
&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2
"update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI). Please update the board to use"; echo >&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_PCI (Driver Model"; echo >&2 "for PCI). Please update the board to use"; echo >&2 "CONFIG_DM_PCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_VIDEO (Driver Model"; echo >&2 "for video). Please update the board to use"; echo >&2 "CONFIG_DM_VIDEO before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_SPI_FLASH (Driver Model"; echo >&2 "for SPI flash). Please update the board to use"; echo >&2 "CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to"; echo
&2 "update by the deadline may result in board removal."; echo >&2
"See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_WDT (Driver Model"; echo >&2 "for DM watchdog). Please update the board to use"; echo >&2 "CONFIG_WDT before the v2019.10 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "y" ]; then if [ "y" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model"; echo >&2 "for Ethernet drivers). Please update the board to use"; echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_I2C (Driver Model"; echo >&2 "for I2C drivers). Please update the board to use"; echo >&2 "CONFIG_DM_I2C before the v2022.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi CFGCHK u-boot.cfg cat: u-boot.cfg: No such file or directory
Also these warnings do not sound correct to this board as the board does not support AHCI or VIDEO, etc.
Yes, it looks like we should have: diff --git a/Makefile b/Makefile index 94c31d1bb876..48f24e81245e 100644 --- a/Makefile +++ b/Makefile @@ -1031,7 +1031,7 @@ expect = $(foreach cfg,$(1),y) # Note: Script avoids bash construct, hence the strange double 'if' # (patches welcome!) define deprecated - if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \ + @if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \ echo >&2 "===================== WARNING ======================"; \ echo >&2 "This board does not use $(firstword $(1)) (Driver Model"; \ echo >&2 "for $(2)). Please update the board to use"; \

Hi,
On Thu, 1 Apr 2021 at 05:39, Tom Rini trini@konsulko.com wrote:
On Wed, Mar 31, 2021 at 02:46:54PM +0800, Bin Meng wrote:
Hi Simon and Tom,
On Thu, Mar 25, 2021 at 4:26 PM Simon Glass sjg@chromium.org wrote:
The code that produces the migration warnings is quite tedious to understanding and modify. This series updates it to use a common function to handle the logic, so that the message definition is quite short and has no duplication in it.
It is still necessary to write a message in migration.rst however.
This series came out of a patch intended to add an I2C warning.
It also renames CONFIG_DM_RESET; it does not need to be migrated since it already uses driver model.
Changes in v4:
- Refactored the warning code to make it easier to get this right
- Add GPIO deprecation as well
- Add patches to rename DM_RESET to RESET
This series caused a bunch of output message when building a board without "V=1":
$ make if [ -n "y" ]; then if [ "y y" != "y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_MMC (Driver Model"; echo >&2 "for MMC). Please update the board to use"; echo >&2 "CONFIG_DM_MMC before the v2019.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ " y y" != "y y y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_USB (Driver Model"; echo >&2 "for USB). Please update the board to use"; echo >&2 "CONFIG_DM_USB before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use"; echo
&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2
"update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_AHCI (Driver Model"; echo >&2 "for AHCI). Please update the board to use"; echo >&2 "CONFIG_AHCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_PCI (Driver Model"; echo >&2 "for PCI). Please update the board to use"; echo >&2 "CONFIG_DM_PCI before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_VIDEO (Driver Model"; echo >&2 "for video). Please update the board to use"; echo >&2 "CONFIG_DM_VIDEO before the v2019.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_SPI_FLASH (Driver Model"; echo >&2 "for SPI flash). Please update the board to use"; echo >&2 "CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to"; echo
&2 "update by the deadline may result in board removal."; echo >&2
"See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_WDT (Driver Model"; echo >&2 "for DM watchdog). Please update the board to use"; echo >&2 "CONFIG_WDT before the v2019.10 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "y" ]; then if [ "y" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model"; echo >&2 "for Ethernet drivers). Please update the board to use"; echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi if [ -n "" ]; then if [ "" != "y" ]; then echo >&2 "===================== WARNING ======================"; echo >&2 "This board does not use CONFIG_DM_I2C (Driver Model"; echo >&2 "for I2C drivers). Please update the board to use"; echo >&2 "CONFIG_DM_I2C before the v2022.04 release. Failure to"; echo >&2 "update by the deadline may result in board removal."; echo >&2 "See doc/driver-model/migration.rst for more info."; echo >&2 "===================================================="; fi; fi CFGCHK u-boot.cfg cat: u-boot.cfg: No such file or directory
Also these warnings do not sound correct to this board as the board does not support AHCI or VIDEO, etc.
Yes, it looks like we should have: diff --git a/Makefile b/Makefile index 94c31d1bb876..48f24e81245e 100644 --- a/Makefile +++ b/Makefile @@ -1031,7 +1031,7 @@ expect = $(foreach cfg,$(1),y) # Note: Script avoids bash construct, hence the strange double 'if' # (patches welcome!) define deprecated
if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \
@if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \ echo >&2 "===================== WARNING ======================"; \ echo >&2 "This board does not use $(firstword $(1)) (Driver Model"; \ echo >&2 "for $(2)). Please update the board to use"; \
Thank you both, I sent a patch.
Regards, Simon
participants (3)
-
Bin Meng
-
Simon Glass
-
Tom Rini