summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorShelley Chen <shchen@google.com>2021-09-28 12:59:30 -0700
committerShelley Chen <shchen@google.com>2021-09-29 20:20:22 +0000
commit10129f81ac9fbbdafdedaa086c4d777c9d0604f2 (patch)
tree3691c6c3b4877aaf751f73fdf5c6d1c29250f270 /src/mainboard/google
parentffebd4970ffb393ee04b1c35b513c40ed8a11f21 (diff)
mb/google/herobrine: Change preprocessor to C code
BUG=b:182963902 BRANCH=None TEST=./util/abuild/abuild -p none -t GOOGLE_HEROBRINE -x -a -c max -B Change-Id: I10f8a9682200b883474dc385331c5dae84cbdb08 Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58022 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/herobrine/mainboard.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c
index ffcd71f24b..76102e2cb6 100644
--- a/src/mainboard/google/herobrine/mainboard.c
+++ b/src/mainboard/google/herobrine/mainboard.c
@@ -42,15 +42,21 @@ static void mainboard_init(struct device *dev)
qupv3_se_fw_load_and_init(QUPV3_1_SE5, SE_PROTOCOL_I2C, MIXED); /* Touch I2C */
qupv3_se_fw_load_and_init(QUPV3_0_SE7, SE_PROTOCOL_UART, FIFO); /* BT UART */
-#if CONFIG(BOARD_GOOGLE_HEROBRINE)
- qupv3_se_fw_load_and_init(QUPV3_0_SE0, SE_PROTOCOL_I2C, MIXED); /* Audio I2C */
- qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, MIXED); /* Trackpad I2C */
- qupv3_se_fw_load_and_init(QUPV3_1_SE3, SE_PROTOCOL_SPI, MIXED); /* Fingerprint SPI */
-#elif CONFIG(BOARD_GOOGLE_PIGLIN)
- qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, GSI); /* APPS I2C */
- qupv3_se_fw_load_and_init(QUPV3_1_SE4, SE_PROTOCOL_SPI, MIXED); /* ESIM SPI */
- qupv3_se_fw_load_and_init(QUPV3_1_SE6, SE_PROTOCOL_SPI, MIXED); /* Fingerprint SPI */
-#endif
+ if (CONFIG(BOARD_GOOGLE_HEROBRINE)) {
+ /* Audio I2C */
+ qupv3_se_fw_load_and_init(QUPV3_0_SE0, SE_PROTOCOL_I2C, MIXED);
+ /* Trackpad I2C */
+ qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, MIXED);
+ /* Fingerprint SPI */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE3, SE_PROTOCOL_SPI, MIXED);
+ } else if (CONFIG(BOARD_GOOGLE_PIGLIN)) {
+ /* APPS I2C */
+ qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, GSI);
+ /* ESIM SPI */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE4, SE_PROTOCOL_SPI, MIXED);
+ /* Fingerprint SPI */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE6, SE_PROTOCOL_SPI, MIXED);
+ }
/* Take FPMCU out of reset. Power was already applied
in romstage and should have stabilized by now. */