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/mainboard/google/gru/board.h | 4 ++-- src/mainboard/google/gru/boardid.c | 4 ++-- src/mainboard/google/gru/bootblock.c | 10 +++++----- src/mainboard/google/gru/chromeos.c | 10 +++++----- src/mainboard/google/gru/mainboard.c | 18 +++++++++--------- src/mainboard/google/gru/pwm_regulator.c | 12 ++++++------ src/mainboard/google/gru/romstage.c | 4 ++-- src/mainboard/google/gru/sdram_configs.c | 2 +- 8 files changed, 32 insertions(+), 32 deletions(-) (limited to 'src/mainboard/google/gru') diff --git a/src/mainboard/google/gru/board.h b/src/mainboard/google/gru/board.h index 41157f0ef3..e9545de625 100644 --- a/src/mainboard/google/gru/board.h +++ b/src/mainboard/google/gru/board.h @@ -24,7 +24,7 @@ #define GPIO_RESET GPIO(0, B, 3) #define GPIO_SDMMC_PWR GPIO(4, D, 5) -#if IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET) +#if CONFIG(GRU_BASEBOARD_SCARLET) #define GPIO_BL_EN GPIO(4, C, 5) #define GPIO_BACKLIGHT GPIO(4, C, 6) #define GPIO_EC_IN_RW GPIO(0, A, 1) @@ -50,7 +50,7 @@ #define GPIO_WP GPIO(1, C, 2) #endif -#if IS_ENABLED(CONFIG_GRU_HAS_WLAN_RESET) +#if CONFIG(GRU_HAS_WLAN_RESET) #define GPIO_WLAN_RST_L GPIO(1, B, 3) #else #define GPIO_WLAN_RST_L dead_code_t(gpio_t, "no WLAN reset on this board in FW") diff --git a/src/mainboard/google/gru/boardid.c b/src/mainboard/google/gru/boardid.c index 5b2985a7c2..4630a9170b 100644 --- a/src/mainboard/google/gru/boardid.c +++ b/src/mainboard/google/gru/boardid.c @@ -22,7 +22,7 @@ static const int id_readings[] = { /* ID : Volts : ADC value : Bucket */ /* == ===== ========= ========== */ -#if IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) +#if CONFIG(BOARD_GOOGLE_KEVIN) /* 0 : 0.109V: 62 : 0 - 91 */ 91, #else /* 0 : 0.074V: 42 : 0 - 81 */ 81, @@ -80,7 +80,7 @@ uint32_t ram_code(void) uint32_t sku_id(void) { - if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (!CONFIG(GRU_BASEBOARD_SCARLET)) return UNDEFINED_STRAPPING_ID; static uint32_t sku_id = UNDEFINED_STRAPPING_ID; diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c index 9a716aeaa9..7c18e12fd1 100644 --- a/src/mainboard/google/gru/bootblock.c +++ b/src/mainboard/google/gru/bootblock.c @@ -35,7 +35,7 @@ void bootblock_mainboard_early_init(void) so that we know we can use our GPIOs reliably in following code. */ write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 1 | 1 << 0)); /* On Scarlet-based boards, the 4C/4D domain is 1.8V (on others 3.0V) */ - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (CONFIG(GRU_BASEBOARD_SCARLET)) write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 3)); /* Reconfigure GPIO1 from dynamic voltage selection through GPIO0_B1 to @@ -46,10 +46,10 @@ void bootblock_mainboard_early_init(void) /* Enable rails powering GPIO blocks, among other things. */ gpio_output(GPIO_P30V_EN, 1); - if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (!CONFIG(GRU_BASEBOARD_SCARLET)) gpio_output(GPIO_P15V_EN, 1); /* Scarlet: EC-controlled */ - if (IS_ENABLED(CONFIG_CONSOLE_SERIAL)) { + if (CONFIG(CONSOLE_SERIAL)) { _Static_assert(CONFIG_CONSOLE_SERIAL_UART_ADDRESS == UART2_BASE, "CONSOLE_SERIAL_UART should be UART2"); @@ -89,10 +89,10 @@ static void configure_ec(void) static void configure_tpm(void) { - if (IS_ENABLED(CONFIG_GRU_HAS_TPM2)) { + if (CONFIG(GRU_HAS_TPM2)) { rockchip_spi_init(CONFIG_DRIVER_TPM_SPI_BUS, 1500*KHz); - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) { + if (CONFIG(GRU_BASEBOARD_SCARLET)) { gpio_input(GPIO(2, B, 1)); /* SPI2_MISO no-pull */ gpio_input(GPIO(2, B, 2)); /* SPI2_MOSI no-pull */ gpio_input(GPIO(2, B, 3)); /* SPI2_CLK no-pull */ diff --git a/src/mainboard/google/gru/chromeos.c b/src/mainboard/google/gru/chromeos.c index 7fb47d0da8..a856e45089 100644 --- a/src/mainboard/google/gru/chromeos.c +++ b/src/mainboard/google/gru/chromeos.c @@ -21,7 +21,7 @@ #include "board.h" -static const uint32_t wp_polarity = IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET) ? +static const uint32_t wp_polarity = CONFIG(GRU_BASEBOARD_SCARLET) ? ACTIVE_LOW : ACTIVE_HIGH; int get_write_protect_state(void) @@ -36,14 +36,14 @@ void fill_lb_gpios(struct lb_gpios *gpios) {GPIO_WP.raw, wp_polarity, gpio_get(GPIO_WP), "write protect"}, {-1, ACTIVE_HIGH, get_recovery_mode_switch(), "recovery"}, -#if IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET) +#if CONFIG(GRU_BASEBOARD_SCARLET) {GPIO_BACKLIGHT.raw, ACTIVE_HIGH, -1, "backlight"}, #endif {GPIO_EC_IN_RW.raw, ACTIVE_HIGH, -1, "EC in RW"}, {GPIO_EC_IRQ.raw, ACTIVE_LOW, -1, "EC interrupt"}, {GPIO_RESET.raw, ACTIVE_HIGH, -1, "reset"}, {GPIO_SPK_PA_EN.raw, ACTIVE_HIGH, -1, "speaker enable"}, -#if IS_ENABLED(CONFIG_GRU_HAS_TPM2) +#if CONFIG(GRU_HAS_TPM2) {GPIO_TPM_IRQ.raw, ACTIVE_HIGH, -1, "TPM interrupt"}, #endif }; @@ -53,7 +53,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) void setup_chromeos_gpios(void) { - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (CONFIG(GRU_BASEBOARD_SCARLET)) gpio_input(GPIO_WP); else gpio_input_pullup(GPIO_WP); @@ -61,7 +61,7 @@ void setup_chromeos_gpios(void) gpio_input_pullup(GPIO_EC_IRQ); } -#if IS_ENABLED(CONFIG_GRU_HAS_TPM2) +#if CONFIG(GRU_HAS_TPM2) int tis_plat_irq_status(void) { return gpio_irq_status(GPIO_TPM_IRQ); diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index d4fa7fc381..19f4ecca55 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -97,7 +97,7 @@ static void register_gpio_suspend(void) * 1.5V and 1.8V are EC-controlled on Scarlet derivatives, * so we skip them. */ - if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) { + if (!CONFIG(GRU_BASEBOARD_SCARLET)) { static struct bl31_gpio_param param_p15_en = { .h = { .type = PARAM_SUSPEND_GPIO }, .gpio = { .polarity = BL31_GPIO_LEVEL_LOW }, @@ -164,7 +164,7 @@ static void configure_sdmmc(void) gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */ /* set SDMMC_DET_L pin */ - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (CONFIG(GRU_BASEBOARD_SCARLET)) /* * do not have external pull up, so need to * set this pin internal pull up @@ -178,7 +178,7 @@ static void configure_sdmmc(void) * In Scarlet derivatives, this GPIO set to high will get 3v, * With other board variants setting this GPIO low results in 3V. */ - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (CONFIG(GRU_BASEBOARD_SCARLET)) gpio_output(GPIO(2, D, 4), 1); else gpio_output(GPIO(2, D, 4), 0); @@ -226,7 +226,7 @@ static void configure_codec(void) write32(&rk3399_grf->iomux_i2s0, IOMUX_I2S0_SD0); write32(&rk3399_grf->iomux_i2sclk, IOMUX_I2SCLK); - if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (!CONFIG(GRU_BASEBOARD_SCARLET)) gpio_output(GPIO_P18V_AUDIO_PWREN, 1); gpio_output(GPIO_SPK_PA_EN, 0); @@ -239,7 +239,7 @@ static void configure_display(void) * Rainier is Scarlet-derived, but uses EDP so use board-specific * config rather than baseboard. */ - if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)) { + if (CONFIG(BOARD_GOOGLE_SCARLET)) { gpio_output(GPIO(4, D, 1), 0); /* DISPLAY_RST_L */ gpio_output(GPIO(4, D, 3), 1); /* PPVARP_LCD */ mdelay(10); @@ -342,9 +342,9 @@ static void mainboard_init(struct device *dev) if (display_init_required()) configure_display(); setup_usb(0); - if (IS_ENABLED(CONFIG_GRU_HAS_WLAN_RESET)) + if (CONFIG(GRU_HAS_WLAN_RESET)) assert_wifi_reset(); - if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) { + if (!CONFIG(GRU_BASEBOARD_SCARLET)) { configure_touchpad(); /* Scarlet: works differently */ setup_usb(1); /* Scarlet: only one USB port */ } @@ -370,10 +370,10 @@ void mainboard_power_on_backlight(void) gpio_output(GPIO_BL_EN, 1); /* BL_EN */ /* Configure as output GPIO, to be toggled by payload. */ - if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) + if (CONFIG(GRU_BASEBOARD_SCARLET)) gpio_output(GPIO_BACKLIGHT, 0); - if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU)) + if (CONFIG(BOARD_GOOGLE_GRU)) prepare_backlight_i2c(); } diff --git a/src/mainboard/google/gru/pwm_regulator.c b/src/mainboard/google/gru/pwm_regulator.c index 0da6539643..6c64990794 100644 --- a/src/mainboard/google/gru/pwm_regulator.c +++ b/src/mainboard/google/gru/pwm_regulator.c @@ -58,12 +58,12 @@ int scarlet_pwm_design_voltage[][2] = { int pwm_enum_to_pwm_number[] = { [PWM_REGULATOR_GPU] = 0, [PWM_REGULATOR_LIT] = 2, -#if IS_ENABLED(CONFIG_GRU_HAS_CENTERLOG_PWM) +#if CONFIG(GRU_HAS_CENTERLOG_PWM) [PWM_REGULATOR_CENTERLOG] = 3, #else [PWM_REGULATOR_CENTERLOG] = -1, #endif -#if IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET) +#if CONFIG(GRU_BASEBOARD_SCARLET) [PWM_REGULATOR_BIG] = 3, #else [PWM_REGULATOR_BIG] = 1, @@ -78,14 +78,14 @@ void pwm_regulator_configure(enum pwm_regulator pwm, int millivolt) voltage_min = pwm_design_voltage[pwm][0]; voltage_max = pwm_design_voltage[pwm][1]; - if ((IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && board_id() < 6) || - (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU) && board_id() < 2)) { + if ((CONFIG(BOARD_GOOGLE_KEVIN) && board_id() < 6) || + (CONFIG(BOARD_GOOGLE_GRU) && board_id() < 2)) { voltage_min = PWM_DESIGN_VOLTAGE_MIN_OUTDATED; voltage_max = PWM_DESIGN_VOLTAGE_MAX_OUTDATED; - } else if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && board_id() >= 6) { + } else if (CONFIG(BOARD_GOOGLE_KEVIN) && board_id() >= 6) { voltage_min = kevin6_pwm_design_voltage[pwm][0]; voltage_max = kevin6_pwm_design_voltage[pwm][1]; - } else if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)) { + } else if (CONFIG(GRU_BASEBOARD_SCARLET)) { voltage_min = scarlet_pwm_design_voltage[pwm][0]; voltage_max = scarlet_pwm_design_voltage[pwm][1]; } diff --git a/src/mainboard/google/gru/romstage.c b/src/mainboard/google/gru/romstage.c index 0b944febc5..57c716590b 100644 --- a/src/mainboard/google/gru/romstage.c +++ b/src/mainboard/google/gru/romstage.c @@ -35,9 +35,9 @@ static void init_dvs_outputs(void) * Kevin's logic rail has some ripple, so up the voltage a bit. Newer * boards use a fixed 900mV regulator for centerlogic. */ - if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN)) + if (CONFIG(BOARD_GOOGLE_KEVIN)) pwm_regulator_configure(PWM_REGULATOR_CENTERLOG, 925); - else if (IS_ENABLED(CONFIG_GRU_HAS_CENTERLOG_PWM)) + else if (CONFIG(GRU_HAS_CENTERLOG_PWM)) pwm_regulator_configure(PWM_REGULATOR_CENTERLOG, 900); /* Allow time for the regulators to settle */ diff --git a/src/mainboard/google/gru/sdram_configs.c b/src/mainboard/google/gru/sdram_configs.c index e67f0ec2f7..5e9e15f1df 100644 --- a/src/mainboard/google/gru/sdram_configs.c +++ b/src/mainboard/google/gru/sdram_configs.c @@ -51,7 +51,7 @@ enum dram_speeds { static enum dram_speeds get_sdram_target_mhz(void) { - if (IS_ENABLED(CONFIG_BOARD_GOOGLE_BOB) && board_id() < 4) + if (CONFIG(BOARD_GOOGLE_BOB) && board_id() < 4) return dram_800MHz; return dram_928MHz; -- cgit v1.2.3