From cd49cce7b70e80b4acc49b56bb2bb94370b4d867 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 5 Mar 2019 16:53:33 -0800 Subject: coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) This patch is a raw application of find src/ -type f | xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I6262d6d5c23cabe23c242b4f38d446b74fe16b88 Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/c/coreboot/+/31774 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/drivers/pc80/rtc/mc146818rtc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/drivers/pc80/rtc/mc146818rtc.c') diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c index 3b22a46298..c18f1e947b 100644 --- a/src/drivers/pc80/rtc/mc146818rtc.c +++ b/src/drivers/pc80/rtc/mc146818rtc.c @@ -30,7 +30,7 @@ #include /* There's no way around this include guard. option_table.h is autogenerated */ -#if IS_ENABLED(CONFIG_USE_OPTION_TABLE) +#if CONFIG(USE_OPTION_TABLE) #include "option_table.h" #else #define LB_CKS_RANGE_START 0 @@ -41,7 +41,7 @@ #include #if (defined(__PRE_RAM__) && \ -IS_ENABLED(CONFIG_HAVE_ROMSTAGE_NVRAM_CBFS_SPINLOCK)) +CONFIG(HAVE_ROMSTAGE_NVRAM_CBFS_SPINLOCK)) #define LOCK_NVRAM_CBFS_SPINLOCK() spin_lock(romstage_nvram_cbfs_lock()) #define UNLOCK_NVRAM_CBFS_SPINLOCK() spin_unlock(romstage_nvram_cbfs_lock()) #else @@ -70,7 +70,7 @@ static int cmos_checksum_valid(int range_start, int range_end, int cks_loc) int i; u16 sum, old_sum; - if (IS_ENABLED(CONFIG_STATIC_OPTION_TABLE)) + if (CONFIG(STATIC_OPTION_TABLE)) return 1; sum = 0; @@ -122,7 +122,7 @@ static bool __cmos_init(bool invalid) x = cmos_read(RTC_VALID); cmos_invalid = !(x & RTC_VRT); - if (IS_ENABLED(CONFIG_USE_OPTION_TABLE)) { + if (CONFIG(USE_OPTION_TABLE)) { /* See if there is a CMOS checksum error */ checksum_invalid = !cmos_checksum_valid(PC_CKS_RANGE_START, PC_CKS_RANGE_END, PC_CKS_LOC); @@ -162,7 +162,7 @@ static bool __cmos_init(bool invalid) /* Ensure all reserved bits are 0 in register D */ cmos_write(RTC_VRT, RTC_VALID); - if (IS_ENABLED(CONFIG_USE_OPTION_TABLE)) { + if (CONFIG(USE_OPTION_TABLE)) { /* See if there is a LB CMOS checksum error */ checksum_invalid = !cmos_checksum_valid(LB_CKS_RANGE_START, LB_CKS_RANGE_END, LB_CKS_LOC); @@ -196,7 +196,7 @@ static void cmos_init_vbnv(bool invalid) void cmos_init(bool invalid) { - if (IS_ENABLED(CONFIG_VBOOT_VBNV_CMOS)) + if (CONFIG(VBOOT_VBNV_CMOS)) cmos_init_vbnv(invalid); else __cmos_init(invalid); @@ -272,7 +272,7 @@ enum cb_err get_option(void *dest, const char *name) size_t namelen; int found = 0; - if (!IS_ENABLED(CONFIG_USE_OPTION_TABLE)) + if (!CONFIG(USE_OPTION_TABLE)) return CB_CMOS_OTABLE_DISABLED; LOCK_NVRAM_CBFS_SPINLOCK(); @@ -370,7 +370,7 @@ unsigned int read_option_lowlevel(unsigned int start, unsigned int size, { printk(BIOS_NOTICE, "NOTICE: read_option() used to access CMOS " "from non-ROMCC code, please use get_option() instead.\n"); - if (IS_ENABLED(CONFIG_USE_OPTION_TABLE)) { + if (CONFIG(USE_OPTION_TABLE)) { const unsigned char byte = cmos_read(start / 8); return (byte >> (start & 7U)) & ((1U << size) - 1U); } @@ -386,7 +386,7 @@ enum cb_err set_option(const char *name, void *value) size_t namelen; int found = 0; - if (!IS_ENABLED(CONFIG_USE_OPTION_TABLE)) + if (!CONFIG(USE_OPTION_TABLE)) return CB_CMOS_OTABLE_DISABLED; /* Figure out how long name is */ @@ -506,7 +506,7 @@ void set_boot_successful(void) byte = inb(RTC_PORT(1)); - if (IS_ENABLED(CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR)) { + if (CONFIG(SKIP_MAX_REBOOT_CNT_CLEAR)) { /* * Set the fallback boot bit to allow for recovery if * the payload fails to boot. -- cgit v1.2.3