diff options
-rw-r--r-- | src/include/console/cbmem_console.h | 5 | ||||
-rw-r--r-- | src/include/console/console.h | 4 | ||||
-rw-r--r-- | src/include/console/ne2k.h | 2 | ||||
-rw-r--r-- | src/include/console/qemu_debugcon.h | 2 | ||||
-rw-r--r-- | src/include/console/spi.h | 4 | ||||
-rw-r--r-- | src/include/console/spkmodem.h | 2 | ||||
-rw-r--r-- | src/include/console/uart.h | 6 | ||||
-rw-r--r-- | src/include/console/usb.h | 10 |
8 files changed, 19 insertions, 16 deletions
diff --git a/src/include/console/cbmem_console.h b/src/include/console/cbmem_console.h index f8b398221e..a8519d28a9 100644 --- a/src/include/console/cbmem_console.h +++ b/src/include/console/cbmem_console.h @@ -21,10 +21,11 @@ void cbmemc_init(void); void cbmemc_tx_byte(unsigned char data); -#define __CBMEM_CONSOLE_ENABLE__ (CONFIG_CONSOLE_CBMEM && \ +#define __CBMEM_CONSOLE_ENABLE__ (IS_ENABLED(CONFIG_CONSOLE_CBMEM) && \ (ENV_RAMSTAGE || ENV_VERSTAGE || ENV_POSTCAR || \ (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT) && \ - (ENV_ROMSTAGE || (ENV_BOOTBLOCK && CONFIG_BOOTBLOCK_CONSOLE)))\ + (ENV_ROMSTAGE || \ + (ENV_BOOTBLOCK && IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE))))\ )) #if __CBMEM_CONSOLE_ENABLE__ diff --git a/src/include/console/console.h b/src/include/console/console.h index d89d7471ca..e00482439a 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -28,7 +28,7 @@ #ifndef __ROMCC__ void post_code(u8 value); -#if CONFIG_CMOS_POST_EXTRA +#if IS_ENABLED(CONFIG_CMOS_POST_EXTRA) void post_log_extra(u32 value); struct device; void post_log_path(struct device *dev); @@ -46,7 +46,7 @@ void __attribute__ ((noreturn)) die(const char *msg); ((ENV_BOOTBLOCK && IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) || \ (ENV_POSTCAR && IS_ENABLED(CONFIG_POSTCAR_CONSOLE)) || \ ENV_VERSTAGE || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_LIBAGESA || \ - (ENV_SMM && CONFIG_DEBUG_SMI)) + (ENV_SMM && IS_ENABLED(CONFIG_DEBUG_SMI))) #if __CONSOLE_ENABLE__ asmlinkage void console_init(void); diff --git a/src/include/console/ne2k.h b/src/include/console/ne2k.h index ea2a139ad2..7b43084f38 100644 --- a/src/include/console/ne2k.h +++ b/src/include/console/ne2k.h @@ -27,7 +27,7 @@ void ne2k_transmit(unsigned int eth_nic_base); #define ne2k_append_data_byte(d, base) ne2k_append_data(&d, 1, base) #endif -#if CONFIG_CONSOLE_NE2K && (ENV_ROMSTAGE || ENV_RAMSTAGE) +#if IS_ENABLED(CONFIG_CONSOLE_NE2K) && (ENV_ROMSTAGE || ENV_RAMSTAGE) static inline void __ne2k_init(void) { ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT); diff --git a/src/include/console/qemu_debugcon.h b/src/include/console/qemu_debugcon.h index 544442a662..3175684dfb 100644 --- a/src/include/console/qemu_debugcon.h +++ b/src/include/console/qemu_debugcon.h @@ -7,7 +7,7 @@ void qemu_debugcon_init(void); void qemu_debugcon_tx_byte(unsigned char data); -#if CONFIG_CONSOLE_QEMU_DEBUGCON && (ENV_ROMSTAGE || ENV_RAMSTAGE) +#if IS_ENABLED(CONFIG_CONSOLE_QEMU_DEBUGCON) && (ENV_ROMSTAGE || ENV_RAMSTAGE) static inline void __qemu_debugcon_init(void) { qemu_debugcon_init(); } static inline void __qemu_debugcon_tx_byte(u8 data) { diff --git a/src/include/console/spi.h b/src/include/console/spi.h index 4d281acd77..dd33b0f375 100644 --- a/src/include/console/spi.h +++ b/src/include/console/spi.h @@ -22,8 +22,8 @@ void spiconsole_init(void); void spiconsole_tx_byte(unsigned char c); -#define __CONSOLE_SPI_ENABLE__ (CONFIG_SPI_CONSOLE && \ - (ENV_RAMSTAGE || (ENV_SMM && CONFIG_DEBUG_SMI))) +#define __CONSOLE_SPI_ENABLE__ (IS_ENABLED(CONFIG_SPI_CONSOLE) && \ + (ENV_RAMSTAGE || (ENV_SMM && IS_ENABLED(CONFIG_DEBUG_SMI)))) #if __CONSOLE_SPI_ENABLE__ static inline void __spiconsole_init(void) { spiconsole_init(); } diff --git a/src/include/console/spkmodem.h b/src/include/console/spkmodem.h index dfd21d4eef..336cf14904 100644 --- a/src/include/console/spkmodem.h +++ b/src/include/console/spkmodem.h @@ -7,7 +7,7 @@ void spkmodem_init(void); void spkmodem_tx_byte(unsigned char c); -#if CONFIG_SPKMODEM && (ENV_ROMSTAGE || ENV_RAMSTAGE) +#if IS_ENABLED(CONFIG_SPKMODEM) && (ENV_ROMSTAGE || ENV_RAMSTAGE) static inline void __spkmodem_init(void) { spkmodem_init(); } static inline void __spkmodem_tx_byte(u8 data) { spkmodem_tx_byte(data); } #else diff --git a/src/include/console/uart.h b/src/include/console/uart.h index 07ac763932..744eb625f4 100644 --- a/src/include/console/uart.h +++ b/src/include/console/uart.h @@ -55,9 +55,9 @@ static inline void *uart_platform_baseptr(int idx) void oxford_remap(unsigned int new_base); -#define __CONSOLE_SERIAL_ENABLE__ (CONFIG_CONSOLE_SERIAL && \ +#define __CONSOLE_SERIAL_ENABLE__ (IS_ENABLED(CONFIG_CONSOLE_SERIAL) && \ (ENV_BOOTBLOCK || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_VERSTAGE || \ - ENV_POSTCAR || (ENV_SMM && CONFIG_DEBUG_SMI))) + ENV_POSTCAR || (ENV_SMM && IS_ENABLED(CONFIG_DEBUG_SMI)))) #if __CONSOLE_SERIAL_ENABLE__ static inline void __uart_init(void) @@ -78,7 +78,7 @@ static inline void __uart_tx_byte(u8 data) {} static inline void __uart_tx_flush(void) {} #endif -#if CONFIG_GDB_STUB && (ENV_ROMSTAGE || ENV_RAMSTAGE) +#if IS_ENABLED(CONFIG_GDB_STUB) && (ENV_ROMSTAGE || ENV_RAMSTAGE) #define CONFIG_UART_FOR_GDB CONFIG_UART_FOR_CONSOLE static inline void __gdb_hw_init(void) { uart_init(CONFIG_UART_FOR_GDB); } static inline void __gdb_tx_byte(u8 data) diff --git a/src/include/console/usb.h b/src/include/console/usb.h index 1b153ef8e6..c67144d039 100644 --- a/src/include/console/usb.h +++ b/src/include/console/usb.h @@ -27,8 +27,9 @@ void usb_tx_flush(int idx); unsigned char usb_rx_byte(int idx); int usb_can_rx_byte(int idx); -#define __CONSOLE_USB_ENABLE__ (CONFIG_CONSOLE_USB && \ - ((ENV_ROMSTAGE && CONFIG_USBDEBUG_IN_ROMSTAGE) || ENV_RAMSTAGE)) +#define __CONSOLE_USB_ENABLE__ (IS_ENABLED(CONFIG_CONSOLE_USB) && \ + ((ENV_ROMSTAGE && IS_ENABLED(CONFIG_USBDEBUG_IN_ROMSTAGE)) || \ + ENV_RAMSTAGE)) #define USB_PIPE_FOR_CONSOLE 0 #define USB_PIPE_FOR_GDB 0 @@ -47,8 +48,9 @@ static inline void __usb_tx_flush(void) {} #endif /* */ -#if 0 && CONFIG_GDB_STUB && \ - ((ENV_ROMSTAGE && CONFIG_USBDEBUG_IN_ROMSTAGE) || ENV_RAMSTAGE) +#if 0 && IS_ENABLED(CONFIG_GDB_STUB) && \ + ((ENV_ROMSTAGE && IS_ENABLED(CONFIG_USBDEBUG_IN_ROMSTAGE)) \ + || ENV_RAMSTAGE) static inline void __gdb_hw_init(void) { usbdebug_init(); } static inline void __gdb_tx_byte(u8 data) { |