[PATCH 18/41] arm: samsung: Rename CONFIG_G_DNL_*_NUM variables

Tom Rini trini at konsulko.com
Fri Dec 2 22:42:28 CET 2022


Following how g_dnl_bind_fixup is used on other platforms, rename the
unchanging defines used here to be prefixed with EXYNOS rather than
Samsung, and define them here.

Cc: Minkyu Kang <mk7.kang at samsung.com>
Cc: Jaehoon Chung <jh80.chung at samsung.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 board/samsung/common/gadget.c    | 14 ++++++++++----
 include/configs/dh_imx6.h        |  4 ----
 include/configs/exynos4-common.h |  6 ------
 include/configs/odroid_xu3.h     |  8 --------
 include/configs/s5p_goni.h       |  7 -------
 include/configs/socfpga_common.h |  4 ----
 6 files changed, 10 insertions(+), 33 deletions(-)

diff --git a/board/samsung/common/gadget.c b/board/samsung/common/gadget.c
index 6d783e61e0d3..9487f9ec4e0c 100644
--- a/board/samsung/common/gadget.c
+++ b/board/samsung/common/gadget.c
@@ -7,14 +7,20 @@
 #include <common.h>
 #include <linux/usb/ch9.h>
 
+#define EXYNOS_G_DNL_THOR_VENDOR_NUM	0x04E8
+#define EXYNOS_G_DNL_THOR_PRODUCT_NUM	0x685D
+
+#define EXYNOS_G_DNL_UMS_VENDOR_NUM	0x0525
+#define EXYNOS_G_DNL_UMS_PRODUCT_NUM	0xA4A5
+
 int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 {
 	if (!strcmp(name, "usb_dnl_thor")) {
-		put_unaligned(CONFIG_G_DNL_THOR_VENDOR_NUM, &dev->idVendor);
-		put_unaligned(CONFIG_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct);
+		put_unaligned(EXYNOS_G_DNL_THOR_VENDOR_NUM, &dev->idVendor);
+		put_unaligned(EXYNOS_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct);
 	} else if (!strcmp(name, "usb_dnl_ums")) {
-		put_unaligned(CONFIG_G_DNL_UMS_VENDOR_NUM, &dev->idVendor);
-		put_unaligned(CONFIG_G_DNL_UMS_PRODUCT_NUM, &dev->idProduct);
+		put_unaligned(EXYNOS_G_DNL_UMS_VENDOR_NUM, &dev->idVendor);
+		put_unaligned(EXYNOS_G_DNL_UMS_PRODUCT_NUM, &dev->idProduct);
 	} else {
 		put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor);
 		put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct);
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index f9b3d19480ed..3aed6299ed56 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -38,10 +38,6 @@
 /* USB Gadget (DFU, UMS) */
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
 #define DFU_DEFAULT_POLL_TIMEOUT	300
-
-/* USB IDs */
-#define CONFIG_G_DNL_UMS_VENDOR_NUM	0x0525
-#define CONFIG_G_DNL_UMS_PRODUCT_NUM	0xA4A5
 #endif
 #endif
 
diff --git a/include/configs/exynos4-common.h b/include/configs/exynos4-common.h
index bf965e5cedb3..e8c182bc2f39 100644
--- a/include/configs/exynos4-common.h
+++ b/include/configs/exynos4-common.h
@@ -12,12 +12,6 @@
 
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
-/* USB Samsung's IDs */
-#define CONFIG_G_DNL_THOR_VENDOR_NUM 0x04E8
-#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
-#define CONFIG_G_DNL_UMS_VENDOR_NUM 0x0525
-#define CONFIG_G_DNL_UMS_PRODUCT_NUM 0xA4A5
-
 /* Common environment variables */
 #define ENV_ITB \
 	"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} " \
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index 5bbe7aadcb25..bf63a4de0765 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -20,14 +20,6 @@
 #define DFU_DEFAULT_POLL_TIMEOUT	300
 #define DFU_MANIFEST_POLL_TIMEOUT	25000
 
-/* THOR */
-#define CONFIG_G_DNL_THOR_VENDOR_NUM	CONFIG_USB_GADGET_VENDOR_NUM
-#define CONFIG_G_DNL_THOR_PRODUCT_NUM	0x685D
-
-/* UMS */
-#define CONFIG_G_DNL_UMS_VENDOR_NUM	0x0525
-#define CONFIG_G_DNL_UMS_PRODUCT_NUM	0xA4A5
-
 #define CONFIG_DFU_ALT_SYSTEM               \
 	"uImage fat 0 1;"                   \
 	"zImage fat 0 1;"                   \
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 97f5dd0e473a..da83db1f68ab 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -24,13 +24,6 @@
 /* USB Composite download gadget - g_dnl */
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
-/* USB Samsung's IDs */
-
-#define CONFIG_G_DNL_THOR_VENDOR_NUM 0x04E8
-#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
-#define CONFIG_G_DNL_UMS_VENDOR_NUM 0x0525
-#define CONFIG_G_DNL_UMS_PRODUCT_NUM 0xA4A5
-
 /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
 
 /* partitions definitions */
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index bbbdea6664ca..088cd4d4f7f6 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -83,10 +83,6 @@
  */
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
 #define DFU_DEFAULT_POLL_TIMEOUT	300
-
-/* USB IDs */
-#define CONFIG_G_DNL_UMS_VENDOR_NUM	0x0525
-#define CONFIG_G_DNL_UMS_PRODUCT_NUM	0xA4A5
 #endif
 
 /*
-- 
2.25.1



More information about the U-Boot mailing list