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>
This commit is contained in:
committed by
Patrick Georgi
parent
b3a8cc54db
commit
cd49cce7b7
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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. */
|
||||
|
@@ -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 {
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user