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>
This commit is contained in:
Tarun Tuli 2023-06-07 21:23:13 +00:00 committed by Felix Held
parent 4ef89f74f4
commit 11ef816cf0
1 changed files with 1 additions and 1 deletions

View File

@ -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);