Patrick Georgi would like nsekar@codeaurora.org to review this change.

View Change

TEMP: NOT FOR REVIEW: Mistral: Add board id detection using TPM

This patch adds support to select the board id
based on the TPM availability.

Change-Id: Ib75d51a21a6129e3650e2af24ff85f37a462591b
Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org>
---
M src/mainboard/google/mistral/boardid.c
1 file changed, 16 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/32271/1
diff --git a/src/mainboard/google/mistral/boardid.c b/src/mainboard/google/mistral/boardid.c
index 8258ac3..9a0d309 100644
--- a/src/mainboard/google/mistral/boardid.c
+++ b/src/mainboard/google/mistral/boardid.c
@@ -32,7 +32,22 @@
[1] = GPIO(106),
[0] = GPIO(105)};

- bid = gpio_binary_first_base3_value(pins, ARRAY_SIZE(pins));
+ if (is_tpm_detected() == 0) {
+ bid = 25; /* Assign 25 for EVB boards */
+ printk(BIOS_DEBUG, "EVB Board ID: %d\n", bid);
+ } else {
+ bid = 0; /* Assign 0 for Proto boards */
+
+ /* The board id assigned for Proto boards is 0.
+ * Since gpios are not wired in the initial phase,
+ * we will get 0 whihch is a coincidence.
+ * To make sure it starts working, after gpios are
+ * wired, reassign the value read from gpios to id.
+ */
+ bid = gpio_binary_first_base3_value(pins, ARRAY_SIZE(pins));
+
+ printk(BIOS_DEBUG, "Proto Board ID: %d\n", bid);
+ }

return bid;
}

To view, visit change 32271. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib75d51a21a6129e3650e2af24ff85f37a462591b
Gerrit-Change-Number: 32271
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: nsekar@codeaurora.org
Gerrit-MessageType: newchange