summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/elog/boot_count.c2
-rw-r--r--src/drivers/elog/elog.c12
-rw-r--r--src/drivers/intel/gma/int15.h2
-rw-r--r--src/drivers/pc80/pc/i8254.c2
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc.c2
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc_romcc.c6
-rw-r--r--src/drivers/uart/util.c4
-rw-r--r--src/drivers/usb/ehci_debug.c8
8 files changed, 19 insertions, 19 deletions
diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c
index 6e9fcaba3a..f1ae9d8f66 100644
--- a/src/drivers/elog/boot_count.c
+++ b/src/drivers/elog/boot_count.c
@@ -27,7 +27,7 @@
* This can either be declared as part of the option
* table or statically defined in the board config.
*/
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
# include "option_table.h"
# define BOOT_COUNT_CMOS_OFFSET (CMOS_VSTART_boot_count_offset >> 3)
#else
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index 27b6e2970d..1c175614c5 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -13,13 +13,13 @@
* GNU General Public License for more details.
*/
-#if CONFIG_HAVE_ACPI_RESUME == 1
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
#include <arch/acpi.h>
#endif
#include <bootstate.h>
#include <cbmem.h>
#include <console/console.h>
-#if CONFIG_ARCH_X86
+#if IS_ENABLED(CONFIG_ARCH_X86)
#include <pc80/mc146818rtc.h>
#endif
#include <bcd.h>
@@ -786,8 +786,8 @@ int elog_init(void)
#if !defined(__SMM__)
/* Log boot count event except in S3 resume */
-#if CONFIG_ELOG_BOOT_COUNT == 1
-#if CONFIG_HAVE_ACPI_RESUME == 1
+#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
if (!acpi_is_wakeup_s3())
#endif
elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read());
@@ -796,9 +796,9 @@ int elog_init(void)
elog_add_event_dword(ELOG_TYPE_BOOT, 0);
#endif
-#if CONFIG_ARCH_X86
+#if IS_ENABLED(CONFIG_ARCH_X86)
/* Check and log POST codes from previous boot */
- if (CONFIG_CMOS_POST)
+ if (IS_ENABLED(CONFIG_CMOS_POST))
cmos_post_log();
#endif
#endif
diff --git a/src/drivers/intel/gma/int15.h b/src/drivers/intel/gma/int15.h
index db83f6a3cd..4a445e55db 100644
--- a/src/drivers/intel/gma/int15.h
+++ b/src/drivers/intel/gma/int15.h
@@ -26,7 +26,7 @@ enum {
};
-#if CONFIG_VGA_ROM_RUN
+#if IS_ENABLED(CONFIG_VGA_ROM_RUN)
/* Install custom int15 handler for VGA OPROM */
void install_intel_vga_int15_handler(int active_lfp, int pfit, int display, int panel_type);
#else
diff --git a/src/drivers/pc80/pc/i8254.c b/src/drivers/pc80/pc/i8254.c
index 5851ec08a0..eb91bf6f01 100644
--- a/src/drivers/pc80/pc/i8254.c
+++ b/src/drivers/pc80/pc/i8254.c
@@ -32,7 +32,7 @@ void setup_i8254(void)
outb(0x12, TIMER1_PORT);
}
-#if CONFIG_UDELAY_TIMER2
+#if IS_ENABLED(CONFIG_UDELAY_TIMER2)
static void load_timer2(unsigned int ticks)
{
/* Set up the timer gate, turn off the speaker */
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c
index 33860b8de3..0e9a88ab5c 100644
--- a/src/drivers/pc80/rtc/mc146818rtc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc.c
@@ -28,7 +28,7 @@
#include <cbfs.h>
/* There's no way around this include guard. option_table.h is autogenerated */
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
#include "option_table.h"
#else
#define LB_CKS_RANGE_START 0
diff --git a/src/drivers/pc80/rtc/mc146818rtc_romcc.c b/src/drivers/pc80/rtc/mc146818rtc_romcc.c
index 8bebc4229d..dc4f2efec4 100644
--- a/src/drivers/pc80/rtc/mc146818rtc_romcc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc_romcc.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <pc80/mc146818rtc.h>
#include <fallback.h>
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
#include "option_table.h"
#endif
@@ -19,7 +19,7 @@ static int cmos_error(void)
static int cmos_chksum_valid(void)
{
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
unsigned char addr;
u16 sum, old_sum;
@@ -93,7 +93,7 @@ static inline __attribute__((unused)) int do_normal_boot(void)
unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def)
{
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
unsigned byte;
byte = cmos_read(start/8);
diff --git a/src/drivers/uart/util.c b/src/drivers/uart/util.c
index e1b83ba59d..f0f885d532 100644
--- a/src/drivers/uart/util.c
+++ b/src/drivers/uart/util.c
@@ -13,14 +13,14 @@
#include <console/console.h>
#include <console/uart.h>
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
#include <option.h>
#include "option_table.h"
#endif
unsigned int default_baudrate(void)
{
-#if !defined(__SMM__) && CONFIG_USE_OPTION_TABLE
+#if !defined(__SMM__) && IS_ENABLED(CONFIG_USE_OPTION_TABLE)
static const unsigned baud[8] =
{ 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1200 };
unsigned b_index = 0;
diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c
index cac043ebef..6fcf683fe6 100644
--- a/src/drivers/usb/ehci_debug.c
+++ b/src/drivers/usb/ehci_debug.c
@@ -33,7 +33,7 @@ struct ehci_debug_info {
struct dbgp_pipe ep_pipe[DBGP_MAX_ENDPOINTS];
};
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static void dbgp_print_data(struct ehci_dbg_port *ehci_debug);
static int dbgp_enabled(void);
# define dprintk(LEVEL, args...) \
@@ -197,7 +197,7 @@ static void dbgp_get_data(struct ehci_dbg_port *ehci_debug, void *buf, int size)
bytes[i] = (hi >> (8*(i - 4))) & 0xff;
}
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static void dbgp_print_data(struct ehci_dbg_port *ehci_debug)
{
u32 ctrl = read32(&ehci_debug->control);
@@ -578,7 +578,7 @@ err:
//return ret;
next_debug_port:
-#if CONFIG_USBDEBUG_DEFAULT_PORT==0
+#if CONFIG_USBDEBUG_DEFAULT_PORT == 0
port_map_tried |= (1 << (debug_port - 1));
new_debug_port = ((debug_port-1 + 1) % n_ports) + 1;
if (port_map_tried != ((1 << n_ports) - 1)) {
@@ -599,7 +599,7 @@ next_debug_port:
return -10;
}
-#if CONFIG_DEBUG_USBDEBUG
+#if IS_ENABLED(CONFIG_DEBUG_USBDEBUG)
static int dbgp_enabled(void)
{
struct dbgp_pipe *globals = &dbgp_ehci_info()->ep_pipe[DBGP_SETUP_EP0];