summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:53:33 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-08 08:33:24 +0000
commitcd49cce7b70e80b4acc49b56bb2bb94370b4d867 (patch)
tree8e89136e2da7cf54453ba8c112eda94415b56242 /src/ec
parentb3a8cc54dbaf833c590a56f912209a5632b71f49 (diff)
downloadcoreboot-cd49cce7b70e80b4acc49b56bb2bb94370b4d867.tar.xz
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 <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31774 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/acpi/ec.asl4
-rw-r--r--src/ec/google/chromeec/ec.c6
-rw-r--r--src/ec/google/chromeec/ec_i2c.c2
-rw-r--r--src/ec/google/chromeec/ec_lpc.c10
-rw-r--r--src/ec/google/chromeec/smihandler.c2
-rw-r--r--src/ec/google/chromeec/switches.c6
-rw-r--r--src/ec/google/wilco/acpi/superio.asl2
-rw-r--r--src/ec/google/wilco/bootblock.c2
-rw-r--r--src/ec/kontron/kempld/early_kempld.c2
-rw-r--r--src/ec/lenovo/h8/acpi/thinkpad.asl2
-rw-r--r--src/ec/lenovo/h8/h8.c12
-rw-r--r--src/ec/lenovo/h8/panic.c4
-rw-r--r--src/ec/quanta/ene_kb3940q/ec.c2
13 files changed, 28 insertions, 28 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index b2e65d0e31..962988e7a9 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -94,7 +94,7 @@ Device (EC0)
USPP, 8, // USB Port Power
}
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
+#if CONFIG(EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
OperationRegion (EMEM, EmbeddedControl,
EC_ACPI_MEM_MAPPED_BEGIN, EC_ACPI_MEM_MAPPED_SIZE)
Field (EMEM, ByteAcc, Lock, Preserve)
@@ -525,7 +525,7 @@ Device (EC0)
}
}
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER)
+#if CONFIG(EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER)
/*
* Enable USB Port Power
* Arg0 = USB port ID
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 70b3f493eb..629144c584 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -413,7 +413,7 @@ static void google_chromeec_log_device_events(uint64_t mask)
uint64_t events;
int i;
- if (!IS_ENABLED(CONFIG_ELOG) || !mask)
+ if (!CONFIG(ELOG) || !mask)
return;
if (google_chromeec_check_feature(EC_FEATURE_DEVICE_EVENT) != 1)
@@ -434,7 +434,7 @@ void google_chromeec_log_events(uint64_t mask)
uint64_t wake_mask;
bool restore_wake_mask = false;
- if (!IS_ENABLED(CONFIG_ELOG))
+ if (!CONFIG(ELOG))
return;
/*
@@ -536,7 +536,7 @@ int google_chromeec_set_sku_id(u32 skuid)
return 0;
}
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_RTC)
+#if CONFIG(EC_GOOGLE_CHROMEEC_RTC)
int rtc_get(struct rtc_time *time)
{
struct chromeec_command cmd;
diff --git a/src/ec/google/chromeec/ec_i2c.c b/src/ec/google/chromeec/ec_i2c.c
index 7770d602e3..2eecced721 100644
--- a/src/ec/google/chromeec/ec_i2c.c
+++ b/src/ec/google/chromeec/ec_i2c.c
@@ -22,7 +22,7 @@
#include "ec.h"
#include "ec_commands.h"
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_I2C_PROTO3)
+#if CONFIG(EC_GOOGLE_CHROMEEC_I2C_PROTO3)
#define PROTO3_FRAMING_BYTES sizeof(uint32_t)
/* Just use the LPC host packet size to size the buffer. */
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 61005d3e3b..7293cffcd3 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -38,7 +38,7 @@ static void read_bytes(u16 port, unsigned int length, u8 *dest, u8 *csum)
{
int i;
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_MEC)
+#if CONFIG(EC_GOOGLE_CHROMEEC_MEC)
/* Access desired range though EMI interface */
if (port >= MEC_EMI_RANGE_START && port <= MEC_EMI_RANGE_END) {
u8 ret = mec_io_bytes(MEC_IO_READ, MEC_EMI_BASE,
@@ -77,7 +77,7 @@ static void write_bytes(u16 port, unsigned int length, u8 *msg, u8 *csum)
{
int i;
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_MEC)
+#if CONFIG(EC_GOOGLE_CHROMEEC_MEC)
/* Access desired range though EMI interface */
if (port >= MEC_EMI_RANGE_START && port <= MEC_EMI_RANGE_END) {
u8 ret = mec_io_bytes(MEC_IO_WRITE, MEC_EMI_BASE,
@@ -132,7 +132,7 @@ static int google_chromeec_wait_ready(u16 port)
EC_LPC_CMDR_BUSY, 0);
}
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
+#if CONFIG(EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
/* Read memmap data through ACPI port 66/62 */
static int read_memmap(u8 *data, u8 offset)
{
@@ -166,7 +166,7 @@ static int google_chromeec_command_version(void)
{
u8 id1, id2, flags;
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
+#if CONFIG(EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
if (read_memmap(&id1, EC_MEMMAP_ID) ||
read_memmap(&id2, EC_MEMMAP_ID + 1) ||
read_memmap(&flags, EC_MEMMAP_HOST_CMD_FLAGS)) {
@@ -386,7 +386,7 @@ void google_chromeec_ioport_range(uint16_t *out_base, size_t *out_size)
uint16_t base;
size_t size;
- if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_MEC)) {
+ if (CONFIG(EC_GOOGLE_CHROMEEC_MEC)) {
base = MEC_EMI_BASE;
size = MEC_EMI_SIZE;
} else {
diff --git a/src/ec/google/chromeec/smihandler.c b/src/ec/google/chromeec/smihandler.c
index cab71928da..eec888ecff 100644
--- a/src/ec/google/chromeec/smihandler.c
+++ b/src/ec/google/chromeec/smihandler.c
@@ -26,7 +26,7 @@ static int chromeec_process_one_event(void)
uint8_t event = google_chromeec_get_event();
/* Log this event */
- if (IS_ENABLED(CONFIG_ELOG_GSMI) && event)
+ if (CONFIG(ELOG_GSMI) && event)
elog_add_event_byte(ELOG_TYPE_EC_EVENT, event);
switch (event) {
diff --git a/src/ec/google/chromeec/switches.c b/src/ec/google/chromeec/switches.c
index 1cf26a2729..7b3f4d4cf1 100644
--- a/src/ec/google/chromeec/switches.c
+++ b/src/ec/google/chromeec/switches.c
@@ -17,10 +17,10 @@
#include <cbmem.h>
#include <ec/google/chromeec/ec.h>
-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_LPC)
+#if CONFIG(EC_GOOGLE_CHROMEEC_LPC)
int get_lid_switch(void)
{
- if (!IS_ENABLED(CONFIG_VBOOT_LID_SWITCH))
+ if (!CONFIG(VBOOT_LID_SWITCH))
return -1;
return !!(google_chromeec_get_switches() & EC_SWITCH_LID_OPEN);
@@ -30,7 +30,7 @@ int get_lid_switch(void)
int get_recovery_mode_switch(void)
{
/* Check for dedicated recovery switch first. */
- if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_LPC) &&
+ if (CONFIG(EC_GOOGLE_CHROMEEC_LPC) &&
(google_chromeec_get_switches() & EC_SWITCH_DEDICATED_RECOVERY))
return 1;
diff --git a/src/ec/google/wilco/acpi/superio.asl b/src/ec/google/wilco/acpi/superio.asl
index 9c23c49fdc..0995d6a173 100644
--- a/src/ec/google/wilco/acpi/superio.asl
+++ b/src/ec/google/wilco/acpi/superio.asl
@@ -29,7 +29,7 @@ Device (SIO)
Method (_STA, 0, NotSerialized)
{
-#if IS_ENABLED(CONFIG_DRIVERS_UART_8250IO)
+#if CONFIG(DRIVERS_UART_8250IO)
Return (0x0f)
#else
Return (Zero)
diff --git a/src/ec/google/wilco/bootblock.c b/src/ec/google/wilco/bootblock.c
index 74578069dc..daf2d7f6c1 100644
--- a/src/ec/google/wilco/bootblock.c
+++ b/src/ec/google/wilco/bootblock.c
@@ -48,6 +48,6 @@ static void wilco_ec_serial_init(void)
void wilco_ec_early_init(void)
{
- if (IS_ENABLED(CONFIG_DRIVERS_UART_8250IO))
+ if (CONFIG(DRIVERS_UART_8250IO))
wilco_ec_serial_init();
}
diff --git a/src/ec/kontron/kempld/early_kempld.c b/src/ec/kontron/kempld/early_kempld.c
index 773b8b6ef9..44eea187a8 100644
--- a/src/ec/kontron/kempld/early_kempld.c
+++ b/src/ec/kontron/kempld/early_kempld.c
@@ -47,7 +47,7 @@ void kempld_release_mutex(void)
void kempld_enable_uart_for_console(void)
{
- if (!IS_ENABLED(CONFIG_CONSOLE_SERIAL))
+ if (!CONFIG(CONSOLE_SERIAL))
return;
if (kempld_get_mutex(100) < 0)
diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl
index 449fd6ee61..7f592c1bbf 100644
--- a/src/ec/lenovo/h8/acpi/thinkpad.asl
+++ b/src/ec/lenovo/h8/acpi/thinkpad.asl
@@ -318,7 +318,7 @@ Device (HKEY)
}
}
- #if IS_ENABLED(CONFIG_H8_HAS_BAT_TRESHOLDS_IMPL)
+ #if CONFIG(H8_HAS_BAT_TRESHOLDS_IMPL)
#include "thinkpad_bat_thresholds.asl"
#endif
}
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 6e1534c781..de4f2c29b2 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -192,7 +192,7 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len)
return i;
}
-#if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLES)
+#if CONFIG(GENERATE_SMBIOS_TABLES)
static void h8_smbios_strings(struct device *dev, struct smbios_type11 *t)
{
char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-";
@@ -208,7 +208,7 @@ static void h8_init(struct device *dev)
pc_keyboard_init(NO_AUX_DEVICE);
}
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
static const char *h8_acpi_name(const struct device *dev)
{
return "EC";
@@ -216,10 +216,10 @@ static const char *h8_acpi_name(const struct device *dev)
#endif
struct device_operations h8_dev_ops = {
-#if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLES)
+#if CONFIG(GENERATE_SMBIOS_TABLES)
.get_smbios_strings = h8_smbios_strings,
#endif
-#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt_generator = h8_ssdt_generator,
.acpi_name = h8_acpi_name,
#endif
@@ -312,7 +312,7 @@ static void h8_enable(struct device *dev)
if (get_option(&val, "volume") == CB_SUCCESS && !acpi_is_wakeup_s3())
ec_write(H8_VOLUME_CONTROL, val);
- val = (IS_ENABLED(CONFIG_H8_SUPPORT_BT_ON_WIFI) || h8_has_bdc(dev)) &&
+ val = (CONFIG(H8_SUPPORT_BT_ON_WIFI) || h8_has_bdc(dev)) &&
h8_bluetooth_nv_enable();
h8_bluetooth_enable(val);
@@ -340,7 +340,7 @@ static void h8_enable(struct device *dev)
h8_set_audio_mute(0);
-#if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT)
+#if !CONFIG(H8_DOCK_EARLY_INIT)
h8_mainboard_init_dock();
#endif
}
diff --git a/src/ec/lenovo/h8/panic.c b/src/ec/lenovo/h8/panic.c
index fbe0dc052c..4981b861db 100644
--- a/src/ec/lenovo/h8/panic.c
+++ b/src/ec/lenovo/h8/panic.c
@@ -19,7 +19,7 @@
static void h8_panic(void)
{
- if (IS_ENABLED(CONFIG_H8_FLASH_LEDS_ON_DEATH)) {
+ if (CONFIG(H8_FLASH_LEDS_ON_DEATH)) {
static const u8 leds[] = {
H8_LED_CONTROL_POWER_LED,
H8_LED_CONTROL_BAT0_LED,
@@ -37,7 +37,7 @@ static void h8_panic(void)
ec_write(H8_LED_CONTROL,
H8_LED_CONTROL_BLINK | leds[i]);
}
- if (IS_ENABLED(CONFIG_H8_BEEP_ON_DEATH)) {
+ if (CONFIG(H8_BEEP_ON_DEATH)) {
/* Beep 4 Sec. 1250 Hz */
ec_write(H8_SOUND_ENABLE1, 4);
ec_write(H8_SOUND_REPEAT, 1);
diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c
index 11a1cb8e7d..af2d3782a2 100644
--- a/src/ec/quanta/ene_kb3940q/ec.c
+++ b/src/ec/quanta/ene_kb3940q/ec.c
@@ -129,7 +129,7 @@ void ec_mem_write(u8 addr, u8 data)
#ifndef __SMM__
static void ene_kb3940q_log_events(void)
{
-#if IS_ENABLED(CONFIG_ELOG)
+#if CONFIG(ELOG)
u8 reason = ec_mem_read(EC_SHUTDOWN_REASON);
if (reason)
elog_add_event_byte(ELOG_TYPE_EC_SHUTDOWN, reason);