All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/14] Makefile: Update migration warnings
@ 2021-03-25  8:24 Simon Glass
  2021-03-25  8:24 ` [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top Simon Glass
                   ` (14 more replies)
  0 siblings, 15 replies; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 02/14] Makefile: Add common code to report deprecation Simon Glass
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 02/14] Makefile: Add common code to report deprecation
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
  2021-03-25  8:24 ` [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning Simon Glass
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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)
 
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
  2021-03-25  8:24 ` [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top Simon Glass
  2021-03-25  8:24 ` [PATCH v4 02/14] Makefile: Add common code to report deprecation Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 04/14] Makefile: Use common code for USB " Simon Glass
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 04/14] Makefile: Use common code for USB deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (2 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE " Simon Glass
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (3 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 04/14] Makefile: Use common code for USB " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 06/14] Makefile: Use common code for LIBATA " Simon Glass
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 06/14] Makefile: Use common code for LIBATA deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (4 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 07/14] Makefile: Use common code for PCI " Simon Glass
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 07/14] Makefile: Use common code for PCI deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (5 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 06/14] Makefile: Use common code for LIBATA " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO " Simon Glass
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (6 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 07/14] Makefile: Use common code for PCI " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH " Simon Glass
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (7 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 10/14] Makefile: Use common code for WDT " Simon Glass
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 10/14] Makefile: Use common code for WDT deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (8 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 11/14] Makefile: Use common code for DM_ETH " Simon Glass
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 11/14] Makefile: Use common code for DM_ETH deprecation warning
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (9 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 10/14] Makefile: Use common code for WDT " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message Simon Glass
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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.
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (10 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 11/14] Makefile: Use common code for DM_ETH " Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:12   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 13/14] dm: i2c: Add a migration method for I2C Simon Glass
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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 ======================"
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 13/14] dm: i2c: Add a migration method for I2C
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (11 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 17:13   ` Tom Rini
  2021-03-25  8:24 ` [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO Simon Glass
  2021-03-31  6:46 ` [PATCH v4 00/14] Makefile: Update migration warnings Bin Meng
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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.
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (12 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 13/14] dm: i2c: Add a migration method for I2C Simon Glass
@ 2021-03-25  8:24 ` Simon Glass
  2021-03-27 15:58   ` Tom Rini
  2021-03-31  6:46 ` [PATCH v4 00/14] Makefile: Update migration warnings Bin Meng
  14 siblings, 1 reply; 33+ messages in thread
From: Simon Glass @ 2021-03-25  8:24 UTC (permalink / raw)
  To: u-boot

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.
-- 
2.31.0.291.g576ba9dcdaf-goog

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO
  2021-03-25  8:24 ` [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO Simon Glass
@ 2021-03-27 15:58   ` Tom Rini
  2021-03-27 16:05     ` Tom Rini
  0 siblings, 1 reply; 33+ messages in thread
From: Tom Rini @ 2021-03-27 15:58 UTC (permalink / raw)
  To: u-boot

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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/f04c8bb8/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO
  2021-03-27 15:58   ` Tom Rini
@ 2021-03-27 16:05     ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 16:05 UTC (permalink / raw)
  To: u-boot

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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/b5b2e51b/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top
  2021-03-25  8:24 ` [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/ae29c96a/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 02/14] Makefile: Add common code to report deprecation
  2021-03-25  8:24 ` [PATCH v4 02/14] Makefile: Add common code to report deprecation Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/8cae7038/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning
  2021-03-25  8:24 ` [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/51fbcbdf/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 04/14] Makefile: Use common code for USB deprecation warning
  2021-03-25  8:24 ` [PATCH v4 04/14] Makefile: Use common code for USB " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/d0d184ae/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE deprecation warning
  2021-03-25  8:24 ` [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/4d798f49/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 06/14] Makefile: Use common code for LIBATA deprecation warning
  2021-03-25  8:24 ` [PATCH v4 06/14] Makefile: Use common code for LIBATA " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/b029cef8/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 07/14] Makefile: Use common code for PCI deprecation warning
  2021-03-25  8:24 ` [PATCH v4 07/14] Makefile: Use common code for PCI " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/2efc9514/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO deprecation warning
  2021-03-25  8:24 ` [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/be7dcb83/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH deprecation warning
  2021-03-25  8:24 ` [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/931eb563/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 10/14] Makefile: Use common code for WDT deprecation warning
  2021-03-25  8:24 ` [PATCH v4 10/14] Makefile: Use common code for WDT " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/e1f39aa6/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 11/14] Makefile: Use common code for DM_ETH deprecation warning
  2021-03-25  8:24 ` [PATCH v4 11/14] Makefile: Use common code for DM_ETH " Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/675263c2/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message
  2021-03-25  8:24 ` [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message Simon Glass
@ 2021-03-27 17:12   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:12 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/23c1a2b8/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 13/14] dm: i2c: Add a migration method for I2C
  2021-03-25  8:24 ` [PATCH v4 13/14] dm: i2c: Add a migration method for I2C Simon Glass
@ 2021-03-27 17:13   ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2021-03-27 17:13 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210327/6fc9d124/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 00/14] Makefile: Update migration warnings
  2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
                   ` (13 preceding siblings ...)
  2021-03-25  8:24 ` [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO Simon Glass
@ 2021-03-31  6:46 ` Bin Meng
  2021-03-31 16:39   ` Tom Rini
  14 siblings, 1 reply; 33+ messages in thread
From: Bin Meng @ 2021-03-31  6:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v4 00/14] Makefile: Update migration warnings
  2021-03-31  6:46 ` [PATCH v4 00/14] Makefile: Update migration warnings Bin Meng
@ 2021-03-31 16:39   ` Tom Rini
  2021-03-31 22:19     ` Simon Glass
  0 siblings, 1 reply; 33+ messages in thread
From: Tom Rini @ 2021-03-31 16:39 UTC (permalink / raw)
  To: u-boot

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"; \

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210331/4d85987d/attachment.sig>

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v4 00/14] Makefile: Update migration warnings
  2021-03-31 16:39   ` Tom Rini
@ 2021-03-31 22:19     ` Simon Glass
  0 siblings, 0 replies; 33+ messages in thread
From: Simon Glass @ 2021-03-31 22:19 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2021-03-31 22:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25  8:24 [PATCH v4 00/14] Makefile: Update migration warnings Simon Glass
2021-03-25  8:24 ` [PATCH v4 01/14] Makefile: Move non-DM migration messages to the top Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 02/14] Makefile: Add common code to report deprecation Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 03/14] Makefile: Use common code for MMC deprecation warning Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 04/14] Makefile: Use common code for USB " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 05/14] Makefile: Use common code for MVSATA_IDE " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 06/14] Makefile: Use common code for LIBATA " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 07/14] Makefile: Use common code for PCI " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 08/14] Makefile: Use common code for DM_VIDEO " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 09/14] Makefile: Use common code for SPI_FLASH " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 10/14] Makefile: Use common code for WDT " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 11/14] Makefile: Use common code for DM_ETH " Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 12/14] Makefile: Drop the old SPI flash migration message Simon Glass
2021-03-27 17:12   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 13/14] dm: i2c: Add a migration method for I2C Simon Glass
2021-03-27 17:13   ` Tom Rini
2021-03-25  8:24 ` [PATCH v4 14/14] dm: gpio: Add a migration message for GPIO Simon Glass
2021-03-27 15:58   ` Tom Rini
2021-03-27 16:05     ` Tom Rini
2021-03-31  6:46 ` [PATCH v4 00/14] Makefile: Update migration warnings Bin Meng
2021-03-31 16:39   ` Tom Rini
2021-03-31 22:19     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.