summaryrefslogtreecommitdiff
path: root/src/superio/ite/common
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/superio/ite/common
parentb3a8cc54dbaf833c590a56f912209a5632b71f49 (diff)
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/ite/common')
-rw-r--r--src/superio/ite/common/env_ctrl.c12
-rw-r--r--src/superio/ite/common/env_ctrl.h22
-rw-r--r--src/superio/ite/common/env_ctrl_chip.h2
3 files changed, 18 insertions, 18 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