Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60795 )
Change subject: mb/google/herobrine: Ensure board ID GPIOs are set ......................................................................
mb/google/herobrine: Ensure board ID GPIOs are set
If a new variant is added without updating the `board_id()` function, invalid GPIOs would be used to determine the board ID. To avoid this, use the `dead_code()` macro to force a build-time error.
Change-Id: I863cd7acc31442333d8f73d1bd3a77f5c9978020 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/google/herobrine/boardid.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/60795/1
diff --git a/src/mainboard/google/herobrine/boardid.c b/src/mainboard/google/herobrine/boardid.c index 07ea362..9d5a37e 100644 --- a/src/mainboard/google/herobrine/boardid.c +++ b/src/mainboard/google/herobrine/boardid.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <assert.h> #include <boardid.h> #include <ec/google/chromeec/ec.h> #include "board.h" @@ -20,6 +21,8 @@ pins[2] = GPIO(50); pins[1] = GPIO(49); pins[0] = GPIO(48); + } else { + dead_code(); }
if (id == UNDEFINED_STRAPPING_ID)