Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70230 )
Change subject: mb/google/herobrine: NVMe id determined by logical (not physical) bit ......................................................................
mb/google/herobrine: NVMe id determined by logical (not physical) bit
NVMe is determined by a logical bit 1, not the physical SKU pin. Thus, (logical) sku_id & 0x2 == 0x2 would mean that the device has NVMe enabled on it. Previously, I thought that it was tied to a physical pin, but this is not correct.
BUG=b:254281839 BRANCH=None TEST=flash and boot on villager and make sure that NVMe is not initialized in coreboot.
Change-Id: Iaa75d2418d6a2351d874842e8678bd6ad3c92526 Signed-off-by: Shelley Chen shchen@google.com --- M src/mainboard/google/herobrine/mainboard.c 1 file changed, 23 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/70230/1
diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c index c9bca73..62fad15 100644 --- a/src/mainboard/google/herobrine/mainboard.c +++ b/src/mainboard/google/herobrine/mainboard.c @@ -85,9 +85,8 @@ }
/* - * Determine if board need to perform PCIe initialization. On Herobrine, - * resistor strapping will be such that bit 0 will be assigned 2 (high Z) if it - * is an NVMe enabled platform. + * Determine if board need to perform PCIe initialization. On Herobrine, If it + * is an NVMe enabled platform, logical sku_id & 2 will be true. */ bool mainboard_needs_pcie_init(void) { @@ -106,11 +105,7 @@ return true; }
- if ((sku % 3) == 2) - return true; - - /* Otherwise, eMMC */ - return false; + return !!(sku & 0x2); }
static void mainboard_init(struct device *dev)