From 11ef816cf0465fe09cf8aa0f469b8ce2ce2f41bd Mon Sep 17 00:00:00 2001 From: Tarun Tuli Date: Wed, 7 Jun 2023 21:23:13 +0000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75534 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- src/mainboard/google/brya/variants/hades/variant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainboard/google/brya/variants/hades') 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); -- cgit v1.2.3