aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTarun Tuli <taruntuli@google.com>2023-06-07 21:23:13 +0000
committerFelix Held <felix-coreboot@felixheld.de>2023-06-12 15:27:02 +0000
commit11ef816cf0465fe09cf8aa0f469b8ce2ce2f41bd (patch)
treee5107c0bbdee013786b304ee577821807a0d8f33 /src
parent4ef89f74f40589c446d55eaedffff04260d00ba0 (diff)
mb/google/brya/var/hades: Abort power on if any rails fail to come up
Currently if a rails PG fails to assert, the power on sequence continue after the 20ms timeout. Instead, we should abort and enter a power down. BUG=b:285980464 TEST=sequence now aborts and powers down on failure Change-Id: Id0865e6bdb5db1815ad5509306637308e98c15d7 Signed-off-by: Tarun Tuli <taruntuli@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75534 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/variants/hades/variant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/variants/hades/variant.c b/src/mainboard/google/brya/variants/hades/variant.c
index 5cdfabbb7c..0864ec007f 100644
--- a/src/mainboard/google/brya/variants/hades/variant.c
+++ b/src/mainboard/google/brya/variants/hades/variant.c
@@ -83,7 +83,7 @@ static bool sequence_rail(const struct power_rail_sequence *seq, enum rail_state
pwr_en_state = !pwr_en_state;
gpio_output(seq->pwr_en_gpio, pwr_en_state);
- result = wait_us(DEFAULT_PG_TIMEOUT_US, gpio_get(seq->pg_gpio) == state) >= 0;
+ result = wait_us(DEFAULT_PG_TIMEOUT_US, gpio_get(seq->pg_gpio) == state) > 0;
if (seq->delay_ms)
mdelay(seq->delay_ms);