meta-facebook: yosemite4: Adjust sled cycle method
Use FRU information to distinguish different sled cycle methods.
PVT or after : notify CPLD by GPIOO7
Before PVT : notify CPLD by CPLD IO expender
Tested:
Did sled cycle on EVT, DVT an PVT system.
Change-Id: Iad82056ff9a57ef6bf39ec1978c5d099b55706a9
Signed-off-by: Marshall Zhan <marshall.zhan.wiwynn@gmail.com>
diff --git a/meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common-functions b/meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common-functions
index 5c69011..d8a54c4 100644
--- a/meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common-functions
+++ b/meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common-functions
@@ -26,3 +26,11 @@
grep nuvoton /sys/firmware/devicetree/base/compatible
return 0
}
+
+get_product_version()
+{
+ local FRU_NAME=$1
+ local PRODUCT_VERSION
+ PRODUCT_VERSION=$(busctl get-property xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/board/Yosemite_4_"$FRU_NAME" xyz.openbmc_project.Inventory.Decorator.Revision Version| awk -F\" '{print $2}')
+ echo "$PRODUCT_VERSION"
+}