summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-05-10 06:52:17 +0200
committerPatrick Georgi <pgeorgi@google.com>2016-05-10 23:46:28 +0200
commit90c0a18e8d8b820c31c378addfee0a8c222c6a86 (patch)
tree3ccde1b826c8727ca496a27118f2317d19eacede
parent55e75452d4bc3b5a5743a7e3704b83a302283fa7 (diff)
downloadcoreboot-90c0a18e8d8b820c31c378addfee0a8c222c6a86.tar.xz
google/gale: use if (IS_ENABLED()) over #ifdef
Change-Id: I9047251608fbb92180f2e92d19fd128c5f1ef399 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14754 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/mainboard/google/gale/mainboard.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mainboard/google/gale/mainboard.c b/src/mainboard/google/gale/mainboard.c
index e1a23c937f..f0e704a4b4 100644
--- a/src/mainboard/google/gale/mainboard.c
+++ b/src/mainboard/google/gale/mainboard.c
@@ -40,7 +40,9 @@ static void setup_usb(void)
#define TPM_RESET_GPIO 19
void ipq_setup_tpm(void)
{
-#ifdef CONFIG_I2C_TPM
+ if (!IS_ENABLED(CONFIG_I2C_TPM))
+ return;
+
gpio_tlmm_config_set(TPM_RESET_GPIO, FUNC_SEL_GPIO,
GPIO_PULL_UP, GPIO_6MA, 1);
gpio_set(TPM_RESET_GPIO, 0);
@@ -66,8 +68,6 @@ void ipq_setup_tpm(void)
* to the TPM either fail or timeout.
*/
mdelay(30);
-
-#endif /* CONFIG_I2C_TPM */
}
static void mainboard_init(device_t dev)
@@ -80,10 +80,10 @@ static void mainboard_init(device_t dev)
setup_usb();
ipq_setup_tpm();
-#if IS_ENABLED(CONFIG_CHROMEOS)
- /* Copy WIFI calibration data into CBMEM. */
- cbmem_add_vpd_calibration_data();
-#endif
+ if (IS_ENABLED(CONFIG_CHROMEOS)) {
+ /* Copy WIFI calibration data into CBMEM. */
+ cbmem_add_vpd_calibration_data();
+ }
/*
* Make sure bootloader can issue sounds The frequency is calculated
@@ -114,8 +114,8 @@ void lb_board(struct lb_header *header)
dma->range_start = (uintptr_t)_dma_coherent;
dma->range_size = _dma_coherent_size;
-#if IS_ENABLED(CONFIG_CHROMEOS)
- /* Retrieve the switch interface MAC addressses. */
- lb_table_add_macs_from_vpd(header);
-#endif
+ if (IS_ENABLED(CONFIG_CHROMEOS)) {
+ /* Retrieve the switch interface MAC addressses. */
+ lb_table_add_macs_from_vpd(header);
+ }
}