diff options
author | Julius Werner <jwerner@chromium.org> | 2019-03-05 16:53:33 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-03-08 08:33:24 +0000 |
commit | cd49cce7b70e80b4acc49b56bb2bb94370b4d867 (patch) | |
tree | 8e89136e2da7cf54453ba8c112eda94415b56242 /src/superio | |
parent | b3a8cc54dbaf833c590a56f912209a5632b71f49 (diff) | |
download | coreboot-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/superio')
-rw-r--r-- | src/superio/ite/common/env_ctrl.c | 12 | ||||
-rw-r--r-- | src/superio/ite/common/env_ctrl.h | 22 | ||||
-rw-r--r-- | src/superio/ite/common/env_ctrl_chip.h | 2 | ||||
-rw-r--r-- | src/superio/ite/it8716f/superio.c | 2 | ||||
-rw-r--r-- | src/superio/nuvoton/common/early_serial.c | 2 | ||||
-rw-r--r-- | src/superio/nuvoton/npcd378/superio.c | 4 | ||||
-rw-r--r-- | src/superio/via/vt1211/superio.c | 2 |
7 files changed, 23 insertions, 23 deletions
diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c index f69273e984..57896e0c01 100644 --- a/src/superio/ite/common/env_ctrl.c +++ b/src/superio/ite/common/env_ctrl.c @@ -156,7 +156,7 @@ static void fan_smartconfig(const u16 base, const u8 fan, /* 50% duty cycle by default */ const u8 duty = conf->pwm_start ? conf->pwm_start : 50; - if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_8BIT_PWM)) + if (CONFIG(SUPERIO_ITE_ENV_CTRL_8BIT_PWM)) pwm_start = ITE_EC_FAN_CTL_PWM_DUTY(duty); else pwm_ctrl |= ITE_EC_FAN_CTL_PWM_DUTY(duty); @@ -193,12 +193,12 @@ static void enable_fan(const u16 base, const u8 fan, u8 reg; if (conf->mode == FAN_IGNORE || - (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_NO_ONOFF) && + (CONFIG(SUPERIO_ITE_ENV_CTRL_NO_ONOFF) && conf->mode <= FAN_MODE_OFF)) return; /* FAN_CTL2 might have its own frequency setting */ - if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_PWM_FREQ2) && fan == 2) { + if (CONFIG(SUPERIO_ITE_ENV_CTRL_PWM_FREQ2) && fan == 2) { reg = ite_ec_read(base, ITE_EC_ADC_TEMP_EXTRA_CHANNEL_ENABLE); reg &= ~ITE_EC_FAN_PWM_CLOCK_MASK; reg |= ITE_EC_FAN_PWM_DEFAULT_CLOCK; @@ -216,14 +216,14 @@ static void enable_fan(const u16 base, const u8 fan, ite_ec_write(base, ITE_EC_FAN_CTL_MODE, reg); } - if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG) + if (CONFIG(SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG) && conf->mode >= FAN_MODE_ON) { reg = ite_ec_read(base, ITE_EC_FAN_TAC_COUNTER_ENABLE); reg |= ITE_EC_FAN_TAC_16BIT_ENABLE(fan); ite_ec_write(base, ITE_EC_FAN_TAC_COUNTER_ENABLE, reg); } - if (IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS) && fan > 3) { + if (CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS) && fan > 3) { reg = ite_ec_read(base, ITE_EC_FAN_SEC_CTL); if (conf->mode >= FAN_MODE_ON) reg |= ITE_EC_FAN_SEC_CTL_TAC_EN(fan); @@ -238,7 +238,7 @@ static void enable_fan(const u16 base, const u8 fan, reg &= ~ITE_EC_FAN_MAIN_CTL_TAC_EN(fan); /* Some ITEs have SmartGuardian always enabled */ - if (!IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_NO_ONOFF)) { + if (!CONFIG(SUPERIO_ITE_ENV_CTRL_NO_ONOFF)) { if (conf->mode >= FAN_SMART_SOFTWARE) reg |= ITE_EC_FAN_MAIN_CTL_SMART(fan); else diff --git a/src/superio/ite/common/env_ctrl.h b/src/superio/ite/common/env_ctrl.h index e67af3445e..e29e33f54a 100644 --- a/src/superio/ite/common/env_ctrl.h +++ b/src/superio/ite/common/env_ctrl.h @@ -21,7 +21,7 @@ #include "env_ctrl_chip.h" -#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_8BIT_PWM) +#if CONFIG(SUPERIO_ITE_ENV_CTRL_8BIT_PWM) #define ITE_EC_FAN_MAX_PWM 0xff #define ITE_EC_FAN_PWM_DEFAULT_CLOCK ITE_EC_FAN_PWM_CLOCK_6MHZ #else @@ -58,12 +58,12 @@ #define ITE_EC_FAN_SEC_CTL_TAC_EN(x) (1 << (x)) #define ITE_EC_FAN_TAC_LIMIT(x) \ - (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0x84 + ((x)-4) * 2) \ : (0x10 + ((x)-1)) \ ) #define ITE_EC_FAN_TAC_EXT_LIMIT(x) \ - (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0x85 + ((x)-4) * 2) \ : (0x1b + ((x)-1)) \ ) @@ -87,12 +87,12 @@ #define ITE_EC_FAN_CTL_ON(x) (1 << ((x)-1)) #define ITE_EC_FAN_CTL_PWM_CONTROL(x) \ - (((x) > 3 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) > 3 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0x1e + ((x)-4)) \ : (0x15 + ((x)-1)) \ ) -#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS) +#if CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS) #define ITE_EC_FAN_CTL_TEMPIN_MASK (7 << 3) #define ITE_EC_FAN_CTL_TEMPIN(x) ((((x)-1) & 7) << 3) #else @@ -145,32 +145,32 @@ static const u8 ITE_EC_TEMP_ADJUST[] = { 0x56, 0x57, 0x59 }; #define ITE_EC_BEEP_FREQ_DIVISOR(x) (((x) & 0x0f) << 0) #define ITE_EC_FAN_CTL_TEMP_LIMIT_OFF(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa0) \ : (0x60 + ((x)-1) * 8) \ ) #define ITE_EC_FAN_CTL_TEMP_LIMIT_START(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa1) \ : (0x61 + ((x)-1) * 8) \ ) #define ITE_EC_FAN_CTL_TEMP_LIMIT_FULL(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa2) \ : (0x62 + ((x)-1) * 8) \ ) #define ITE_EC_FAN_CTL_PWM_START(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa3) \ : (0x63 + ((x)-1) * 8) \ ) #define ITE_EC_FAN_CTL_PWM_AUTO(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa4) \ : (0x64 + ((x)-1) * 8) \ ) #define ITE_EC_FAN_CTL_DELTA_TEMP(x) \ - (((x) == 5 && IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)) \ + (((x) == 5 && CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS)) \ ? (0xa5) \ : (0x65 + ((x)-1) * 8) \ ) diff --git a/src/superio/ite/common/env_ctrl_chip.h b/src/superio/ite/common/env_ctrl_chip.h index 68bf5a035f..923bfa3aea 100644 --- a/src/superio/ite/common/env_ctrl_chip.h +++ b/src/superio/ite/common/env_ctrl_chip.h @@ -21,7 +21,7 @@ #define ITE_EC_TMPIN_CNT 3 -#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS) +#if CONFIG(SUPERIO_ITE_ENV_CTRL_5FANS) #define ITE_EC_FAN_CNT 5 #else #define ITE_EC_FAN_CNT 3 diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c index c9330e70eb..de1ef0d73e 100644 --- a/src/superio/ite/it8716f/superio.c +++ b/src/superio/ite/it8716f/superio.c @@ -26,7 +26,7 @@ #include "it8716f.h" -#if !IS_ENABLED(CONFIG_SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL) +#if !CONFIG(SUPERIO_ITE_IT8716F_OVERRIDE_FANCTL) void init_ec(u16 base) { diff --git a/src/superio/nuvoton/common/early_serial.c b/src/superio/nuvoton/common/early_serial.c index 9b5c2d3759..b35ec9d8b9 100644 --- a/src/superio/nuvoton/common/early_serial.c +++ b/src/superio/nuvoton/common/early_serial.c @@ -64,7 +64,7 @@ void nuvoton_pnp_exit_conf_state(pnp_devfn_t dev) void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase) { nuvoton_pnp_enter_conf_state(dev); - if (IS_ENABLED(CONFIG_SUPERIO_NUVOTON_NCT6776_COM_A)) + if (CONFIG(SUPERIO_NUVOTON_NCT6776_COM_A)) /* Route GPIO8 pin group to COM A */ pnp_write_config(dev, 0x2a, 0x40); pnp_set_logical_device(dev); diff --git a/src/superio/nuvoton/npcd378/superio.c b/src/superio/nuvoton/npcd378/superio.c index 1802193033..c1f557ebed 100644 --- a/src/superio/nuvoton/npcd378/superio.c +++ b/src/superio/nuvoton/npcd378/superio.c @@ -103,7 +103,7 @@ static void npcd378_init(struct device *dev) } } -#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) +#if CONFIG(HAVE_ACPI_TABLES) static void npcd378_ssdt(struct device *dev) { struct resource *res; @@ -157,7 +157,7 @@ static struct device_operations ops = { .enable = pnp_alt_enable, .init = npcd378_init, .ops_pnp_mode = &pnp_conf_mode_8787_aa, -#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) +#if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt_generator = npcd378_ssdt, .acpi_name = npcd378_acpi_name, #endif diff --git a/src/superio/via/vt1211/superio.c b/src/superio/via/vt1211/superio.c index 3468b6398b..4d7c8dedfc 100644 --- a/src/superio/via/vt1211/superio.c +++ b/src/superio/via/vt1211/superio.c @@ -112,7 +112,7 @@ static void vt1211_pnp_set_resources(struct device *dev) { struct resource *res; -#if IS_ENABLED(CONFIG_CONSOLE_SERIAL) && IS_ENABLED(CONFIG_DRIVERS_UART_8250IO) +#if CONFIG(CONSOLE_SERIAL) && CONFIG(DRIVERS_UART_8250IO) /* TODO: Do the same for SP2? */ if (dev->path.pnp.device == VT1211_SP1) { for (res = dev->resource_list; res; res = res->next) { |