diff options
| author | Tom Rini <[email protected]> | 2023-01-10 11:19:45 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-01-20 12:27:24 -0500 |
| commit | 6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd (patch) | |
| tree | ae38e9dcf468b2e4e58293561fae87895d9b549f /drivers/serial | |
| parent | ad242344681f6a0076a6bf100aa83ac9ecbea355 (diff) | |
global: Finish CONFIG -> CFG migration
At this point, the remaining places where we have a symbol that is
defined as CONFIG_... are in fairly odd locations. While as much dead
code has been removed as possible, some of these locations are simply
less obvious at first. In other cases, this code is used, but was
defined in such a way as to have been missed by earlier checks. Perform
a rename of all such remaining symbols to be CFG_... rather than
CONFIG_...
Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers/serial')
| -rw-r--r-- | drivers/serial/ns16550.c | 12 | ||||
| -rw-r--r-- | drivers/serial/serial_omap.c | 6 | ||||
| -rw-r--r-- | drivers/serial/usbtty.c | 28 | ||||
| -rw-r--r-- | drivers/serial/usbtty.h | 18 |
4 files changed, 32 insertions, 32 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 772dd6fef8f..eab9537fbae 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -52,9 +52,9 @@ DECLARE_GLOBAL_DATA_PTR; #endif #endif -#ifndef CONFIG_SYS_NS16550_IER -#define CONFIG_SYS_NS16550_IER 0x00 -#endif /* CONFIG_SYS_NS16550_IER */ +#ifndef CFG_SYS_NS16550_IER +#define CFG_SYS_NS16550_IER 0x00 +#endif /* CFG_SYS_NS16550_IER */ static inline void serial_out_shift(void *addr, int shift, int value) { @@ -251,7 +251,7 @@ void ns16550_init(struct ns16550 *com_port, int baud_divisor) while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT)) ; - serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); + serial_out(CFG_SYS_NS16550_IER, &com_port->ier); #if defined(CONFIG_ARCH_OMAP2PLUS) || defined(CONFIG_OMAP_SERIAL) serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ #endif @@ -275,7 +275,7 @@ void ns16550_init(struct ns16550 *com_port, int baud_divisor) #if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) void ns16550_reinit(struct ns16550 *com_port, int baud_divisor) { - serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); + serial_out(CFG_SYS_NS16550_IER, &com_port->ier); ns16550_setbrg(com_port, 0); serial_out(UART_MCRVAL, &com_port->mcr); serial_out(ns16550_getfcr(com_port), &com_port->fcr); @@ -340,7 +340,7 @@ static inline void _debug_uart_init(void) */ baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); - serial_dout(&com_port->ier, CONFIG_SYS_NS16550_IER); + serial_dout(&com_port->ier, CFG_SYS_NS16550_IER); serial_dout(&com_port->mcr, UART_MCRVAL); serial_dout(&com_port->fcr, UART_FCR_DEFVAL); diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index 904f7d21bf0..26310b0b746 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -21,8 +21,8 @@ #ifdef CONFIG_DEBUG_UART_OMAP -#ifndef CONFIG_SYS_NS16550_IER -#define CONFIG_SYS_NS16550_IER 0x00 +#ifndef CFG_SYS_NS16550_IER +#define CFG_SYS_NS16550_IER 0x00 #endif #define UART_MCRVAL 0x00 @@ -71,7 +71,7 @@ static inline void _debug_uart_init(void) baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); - serial_dout(&com_port->ier, CONFIG_SYS_NS16550_IER); + serial_dout(&com_port->ier, CFG_SYS_NS16550_IER); serial_dout(&com_port->mdr1, 0x7); serial_dout(&com_port->mcr, UART_MCRVAL); serial_dout(&com_port->fcr, UART_FCR_DEFVAL); diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index 07a59ec9607..ecb6ba853df 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -45,8 +45,8 @@ #define GSERIAL_RX_ENDPOINT 1 #define NUM_ACM_INTERFACES 2 #define NUM_GSERIAL_INTERFACES 1 -#define CONFIG_USBD_DATA_INTERFACE_STR "Bulk Data Interface" -#define CONFIG_USBD_CTRL_INTERFACE_STR "Control Interface" +#define CFG_USBD_DATA_INTERFACE_STR "Bulk Data Interface" +#define CFG_USBD_CTRL_INTERFACE_STR "Control Interface" /* * Buffers to hold input and output data @@ -97,9 +97,9 @@ static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4}; static u8 wstrManufacturer[2 + 2*(sizeof(CONFIG_USBD_MANUFACTURER)-1)]; static u8 wstrProduct[2 + 2*(sizeof(CONFIG_USBD_PRODUCT_NAME)-1)]; static u8 wstrSerial[2 + 2*(sizeof(serial_number) - 1)]; -static u8 wstrConfiguration[2 + 2*(sizeof(CONFIG_USBD_CONFIGURATION_STR)-1)]; -static u8 wstrDataInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; -static u8 wstrCtrlInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; +static u8 wstrConfiguration[2 + 2*(sizeof(CFG_USBD_CONFIGURATION_STR)-1)]; +static u8 wstrDataInterface[2 + 2*(sizeof(CFG_USBD_DATA_INTERFACE_STR)-1)]; +static u8 wstrCtrlInterface[2 + 2*(sizeof(CFG_USBD_DATA_INTERFACE_STR)-1)]; /* Standard USB Data Structures */ static struct usb_interface_descriptor interface_descriptors[MAX_INTERFACES]; @@ -206,7 +206,7 @@ static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { .bEndpointAddress = UDC_INT_ENDPOINT | USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize - = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), + = cpu_to_le16(CFG_USBD_SERIAL_INT_PKTSIZE), .bInterval = 0xFF, }, @@ -233,7 +233,7 @@ static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = - cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), + cpu_to_le16(CFG_USBD_SERIAL_BULK_PKTSIZE), .bInterval = 0xFF, }, { @@ -244,7 +244,7 @@ static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = - cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), + cpu_to_le16(CFG_USBD_SERIAL_BULK_PKTSIZE), .bInterval = 0xFF, }, }, @@ -312,7 +312,7 @@ gserial_configuration_descriptors[NUM_CONFIGS] ={ .bEndpointAddress = UDC_OUT_ENDPOINT | USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = - cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE), + cpu_to_le16(CFG_USBD_SERIAL_OUT_PKTSIZE), .bInterval= 0xFF, }, { @@ -322,7 +322,7 @@ gserial_configuration_descriptors[NUM_CONFIGS] ={ .bEndpointAddress = UDC_IN_ENDPOINT | USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = - cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE), + cpu_to_le16(CFG_USBD_SERIAL_IN_PKTSIZE), .bInterval = 0xFF, }, { @@ -332,7 +332,7 @@ gserial_configuration_descriptors[NUM_CONFIGS] ={ .bEndpointAddress = UDC_INT_ENDPOINT | USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = - cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), + cpu_to_le16(CFG_USBD_SERIAL_INT_PKTSIZE), .bInterval = 0xFF, }, }, @@ -594,20 +594,20 @@ static void usbtty_init_strings (void) string = (struct usb_string_descriptor *) wstrConfiguration; string->bLength = sizeof(wstrConfiguration); string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_CONFIGURATION_STR, string->wData); + str2wide (CFG_USBD_CONFIGURATION_STR, string->wData); usbtty_string_table[STR_CONFIG]=string; string = (struct usb_string_descriptor *) wstrDataInterface; string->bLength = sizeof(wstrDataInterface); string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_DATA_INTERFACE_STR, string->wData); + str2wide (CFG_USBD_DATA_INTERFACE_STR, string->wData); usbtty_string_table[STR_DATA_INTERFACE]=string; string = (struct usb_string_descriptor *) wstrCtrlInterface; string->bLength = sizeof(wstrCtrlInterface); string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_CTRL_INTERFACE_STR, string->wData); + str2wide (CFG_USBD_CTRL_INTERFACE_STR, string->wData); usbtty_string_table[STR_CTRL_INTERFACE]=string; /* Now, initialize the string table for ep0 handling */ diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h index 8c7e61b2ca2..b176a7961b8 100644 --- a/drivers/serial/usbtty.h +++ b/drivers/serial/usbtty.h @@ -20,17 +20,17 @@ #include <usb/udc.h> #include <version.h> -#ifndef CONFIG_USBD_CONFIGURATION_STR -#define CONFIG_USBD_CONFIGURATION_STR "TTY via USB" +#ifndef CFG_USBD_CONFIGURATION_STR +#define CFG_USBD_CONFIGURATION_STR "TTY via USB" #endif -#define CONFIG_USBD_SERIAL_OUT_ENDPOINT UDC_OUT_ENDPOINT -#define CONFIG_USBD_SERIAL_OUT_PKTSIZE UDC_OUT_PACKET_SIZE -#define CONFIG_USBD_SERIAL_IN_ENDPOINT UDC_IN_ENDPOINT -#define CONFIG_USBD_SERIAL_IN_PKTSIZE UDC_IN_PACKET_SIZE -#define CONFIG_USBD_SERIAL_INT_ENDPOINT UDC_INT_ENDPOINT -#define CONFIG_USBD_SERIAL_INT_PKTSIZE UDC_INT_PACKET_SIZE -#define CONFIG_USBD_SERIAL_BULK_PKTSIZE UDC_BULK_PACKET_SIZE +#define CFG_USBD_SERIAL_OUT_ENDPOINT UDC_OUT_ENDPOINT +#define CFG_USBD_SERIAL_OUT_PKTSIZE UDC_OUT_PACKET_SIZE +#define CFG_USBD_SERIAL_IN_ENDPOINT UDC_IN_ENDPOINT +#define CFG_USBD_SERIAL_IN_PKTSIZE UDC_IN_PACKET_SIZE +#define CFG_USBD_SERIAL_INT_ENDPOINT UDC_INT_ENDPOINT +#define CFG_USBD_SERIAL_INT_PKTSIZE UDC_INT_PACKET_SIZE +#define CFG_USBD_SERIAL_BULK_PKTSIZE UDC_BULK_PACKET_SIZE #define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS |
