[PoC 226/241] global: Migrate CONFIG_USBD_HS to CFG

Tom Rini trini at konsulko.com
Sun Nov 20 15:17:28 CET 2022


Signed-off-by: Tom Rini <trini at konsulko.com>
---
 README                                 |  2 +-
 drivers/serial/usbtty.c                | 12 ++++++------
 drivers/serial/usbtty.h                |  2 +-
 drivers/usb/gadget/ep0.c               |  2 +-
 include/configs/apalis_imx6.h          |  2 +-
 include/configs/colibri-imx6ull.h      |  2 +-
 include/configs/colibri_imx6.h         |  2 +-
 include/configs/colibri_imx7.h         |  2 +-
 include/configs/ge_b1x5v2.h            |  2 +-
 include/configs/gw_ventana.h           |  2 +-
 include/configs/imx7-cm.h              |  2 +-
 include/configs/librem5.h              |  2 +-
 include/configs/mx6sabre_common.h      |  2 +-
 include/configs/mx7dsabresd.h          |  2 +-
 include/configs/nitrogen6x.h           |  2 +-
 include/configs/novena.h               |  2 +-
 include/configs/pico-imx6ul.h          |  2 +-
 include/configs/siemens-am33x-common.h |  2 +-
 include/configs/tbs2910.h              |  2 +-
 include/configs/warp7.h                |  2 +-
 include/usbdescriptors.h               |  2 +-
 include/usbdevice.h                    |  8 ++++----
 scripts/config_whitelist.txt           |  2 +-
 23 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/README b/README
index aeb94d003f6a..43b34f4118c4 100644
--- a/README
+++ b/README
@@ -629,7 +629,7 @@ The following options need to be configured:
 		variable usbtty to be cdc_acm should suffice. The following
 		might be defined in YourBoardName.h
 
-			CONFIG_USBD_HS
+			CFG_USBD_HS
 			Define this to enable the high speed support for usb
 			device and usbtty. If this feature is enabled, a routine
 			int is_usbd_high_speed(void)
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index 4f4eb02de083..984a6c93f313 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -121,7 +121,7 @@ static struct usb_device_descriptor device_descriptor = {
 };
 
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 static struct usb_qualifier_descriptor qualifier_descriptor = {
 	.bLength = sizeof(struct usb_qualifier_descriptor),
 	.bDescriptorType =	USB_DT_QUAL,
@@ -639,7 +639,7 @@ static void usbtty_init_instances (void)
 	memset (device_instance, 0, sizeof (struct usb_device_instance));
 	device_instance->device_state = STATE_INIT;
 	device_instance->device_descriptor = &device_descriptor;
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 	device_instance->qualifier_descriptor = &qualifier_descriptor;
 #endif
 	device_instance->event = usbtty_event_handler;
@@ -755,7 +755,7 @@ static void usbtty_init_terminal_type(short type)
 			device_descriptor.idProduct =
 				cpu_to_le16(CONFIG_USBD_PRODUCTID_CDCACM);
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 			qualifier_descriptor.bDeviceClass =
 				COMMUNICATIONS_DEVICE_CLASS;
 #endif
@@ -787,7 +787,7 @@ static void usbtty_init_terminal_type(short type)
 			device_descriptor.bDeviceClass = 0xFF;
 			device_descriptor.idProduct =
 				cpu_to_le16(CONFIG_USBD_PRODUCTID_GSERIAL);
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 			qualifier_descriptor.bDeviceClass = 0xFF;
 #endif
 			/* Assign endpoint indices */
@@ -937,7 +937,7 @@ static int usbtty_configured (void)
 static void usbtty_event_handler (struct usb_device_instance *device,
 				  usb_device_event_t event, int data)
 {
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 	int i;
 #endif
 	switch (event) {
@@ -950,7 +950,7 @@ static void usbtty_event_handler (struct usb_device_instance *device,
 		break;
 
 	case DEVICE_ADDRESS_ASSIGNED:
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 		/*
 		 * is_usbd_high_speed routine needs to be defined by
 		 * specific gadget driver
diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h
index e27aa368c9af..002d69a40f1d 100644
--- a/drivers/serial/usbtty.h
+++ b/drivers/serial/usbtty.h
@@ -51,7 +51,7 @@
 #define CONFIG_USBD_SERIAL_INT_PKTSIZE	UDC_INT_PACKET_SIZE
 #define CONFIG_USBD_SERIAL_BULK_PKTSIZE	UDC_BULK_PACKET_SIZE
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 #define CONFIG_USBD_SERIAL_BULK_HS_PKTSIZE	UDC_BULK_HS_PACKET_SIZE
 #endif
 
diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c
index 6624f61b763c..84ef8abfe52e 100644
--- a/drivers/usb/gadget/ep0.c
+++ b/drivers/usb/gadget/ep0.c
@@ -371,7 +371,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device,
 		}
 		break;
 	case USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER:
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 		{
 			struct usb_qualifier_descriptor *qualifier_descriptor =
 				device->qualifier_descriptor;
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 02de22ce6a24..d41e12460f57 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -29,7 +29,7 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 /* Client */
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* Framebuffer and LCD */
 
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index b744ae1d6e85..dd5ae3dff804 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -130,7 +130,7 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* USB Device Firmware Update support */
 #define DFU_DEFAULT_POLL_TIMEOUT	300
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index e34d933abae2..2a0408c0b137 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -26,7 +26,7 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 /* Client */
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* Command definition */
 
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 8efcc8c17b3d..bc2fb9358b3b 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -174,6 +174,6 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #endif
diff --git a/include/configs/ge_b1x5v2.h b/include/configs/ge_b1x5v2.h
index dd3c56c480be..c1e004b24e12 100644
--- a/include/configs/ge_b1x5v2.h
+++ b/include/configs/ge_b1x5v2.h
@@ -26,7 +26,7 @@
 /* USB */
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* Memory */
 #define PHYS_SDRAM		       MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 4d0acdd0f3b6..5aec15179a63 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -38,7 +38,7 @@
 /* USB Configs */
 #define CFG_MXC_USB_PORTSC     (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS      0
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* Miscellaneous configurable options */
 
diff --git a/include/configs/imx7-cm.h b/include/configs/imx7-cm.h
index 4202c5928c2f..182ed606c734 100644
--- a/include/configs/imx7-cm.h
+++ b/include/configs/imx7-cm.h
@@ -81,6 +81,6 @@
 /* USB Configs */
 #define CFG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/librem5.h b/include/configs/librem5.h
index 4725be264a9b..565b68623df8 100644
--- a/include/configs/librem5.h
+++ b/include/configs/librem5.h
@@ -27,7 +27,7 @@
 
 #define CFG_SYS_FSL_USDHC_NUM	2
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #define CONSOLE_ON_UART1
 
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index e1cdedf27680..38cfefcddcac 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -145,6 +145,6 @@
 
 /* Environment organization */
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #endif                         /* __MX6QSABRE_COMMON_CONFIG_H */
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 5392f38074ed..8384589509c7 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -101,6 +101,6 @@
 /* USB Configs */
 #define CFG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index d35650a66e13..9ce2425e1c1b 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -11,7 +11,7 @@
 
 #include "mx6_common.h"
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #define CFG_MXC_UART_BASE	       UART2_BASE
 
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 000626dcb485..63ee19d58064 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -60,7 +60,7 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 /* Gadget part */
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 #endif
 
 /* Extra U-Boot environment. */
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index 531e462485d8..aa2e6878901a 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -26,7 +26,7 @@
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CFG_MXC_USB_FLAGS		0
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 437a76165fd5..9d1fc1c910ca 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -73,7 +73,7 @@
  */
 
 /* USB DRACO ID as default */
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* USB Device Firmware Update support */
 #define DFU_MANIFEST_POLL_TIMEOUT	25000
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 7debc90205a8..047279c8f481 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -29,7 +29,7 @@
 #ifdef CONFIG_CMD_USB
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #ifdef CONFIG_CMD_USB_MASS_STORAGE
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 #endif /* CONFIG_CMD_USB_MASS_STORAGE */
 #endif /* CONFIG_CMD_USB      */
 
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index ebc5f4aa6c91..6db4eb9d8406 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -95,7 +95,7 @@
 
 #define CFG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 
-#define CONFIG_USBD_HS
+#define CFG_USBD_HS
 
 /* USB Device Firmware Update support */
 #define DFU_DEFAULT_POLL_TIMEOUT	300
diff --git a/include/usbdescriptors.h b/include/usbdescriptors.h
index 9a5038745116..f7e28cf8d3f1 100644
--- a/include/usbdescriptors.h
+++ b/include/usbdescriptors.h
@@ -227,7 +227,7 @@ struct usb_device_descriptor {
 	u8 bNumConfigurations;
 } __attribute__ ((packed));
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 struct usb_qualifier_descriptor {
 	u8 bLength;
 	u8 bDescriptorType;
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 611cd6e4abf7..373360c4a4c9 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -196,7 +196,7 @@ struct usb_bus_instance;
 #define USB_DT_INTERFACE		0x04
 #define USB_DT_ENDPOINT			0x05
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 #define USB_DT_QUAL			0x06
 #endif
 
@@ -279,7 +279,7 @@ struct usb_bus_instance;
  * USB Spec Release number
  */
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 #define USB_BCD_VERSION			0x0200
 #else
 #define USB_BCD_VERSION			0x0110
@@ -552,7 +552,7 @@ struct usb_device_instance {
 	/* generic */
 	char *name;
 	struct usb_device_descriptor *device_descriptor;	/* per device descriptor */
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 	struct usb_qualifier_descriptor *qualifier_descriptor;
 #endif
 
@@ -644,7 +644,7 @@ struct usb_string_descriptor *usbd_get_string (u8);
 struct usb_device_descriptor *usbd_device_device_descriptor(struct
 		usb_device_instance *, int);
 
-#if defined(CONFIG_USBD_HS)
+#if defined(CFG_USBD_HS)
 /*
  * is_usbd_high_speed routine needs to be defined by specific gadget driver
  * It returns true if device enumerates at High speed
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 96532633226f..2c7beda9248d 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -240,7 +240,7 @@ CFG_UBOOT_SECTOR_START
 CFG_UEC_ETH
 CFG_USART_BASE
 CFG_USART_ID
-CONFIG_USBD_HS
+CFG_USBD_HS
 CONFIG_USB_BOOTING
 CONFIG_USB_EXT2_BOOT
 CONFIG_USB_FAT_BOOT
-- 
2.25.1



More information about the U-Boot mailing list