yosemite4: Revise getting EID for host power control

Revise getting EID from dbus MCTP to state manager directly.

Tested:
Do host power on/off/cycle/reset on yosemite4 unit

Change-Id: Idacb08a2dab76ef5ca50b21a977a77b72af046db
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powercycle b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powercycle
index 237e432..3958354 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powercycle
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powercycle
@@ -8,8 +8,7 @@
 
 # TODO: check power status before do power cycle
 # Set state effecter state: Entity ID 0x0000 for host power control, 0x3 for power cycle
-GETEID=$(busctl call "$MCTP_BUS_NAME" "$MCTP_OBJ_PATH" "$MCTP_INTF_NAME" LearnEndpoint say "mctpi2c$(($1-1))" 1 0x20)
-EID=$(echo "$GETEID" | awk '{print $2}')
+EID=$(($1*10))
 if ! pldmtool raw -d 0x80 0x02 0x39 0x00 0x00 0x01 0x00 0x03 -m "$EID"
 then
     echo "Failed to set host$1 power cycle"
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweroff b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweroff
index df881ea..210aabe 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweroff
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweroff
@@ -8,8 +8,7 @@
 
 # TODO: check power status before do power off
 # Set state effecter state: Entity ID 0x0000 for host power control, 0x2 for power off
-GETEID=$(busctl call "$MCTP_BUS_NAME" "$MCTP_OBJ_PATH" "$MCTP_INTF_NAME" LearnEndpoint say "mctpi2c$(($1-1))" 1 0x20)
-EID=$(echo "$GETEID" | awk '{print $2}')
+EID=$(($1*10))
 if ! pldmtool raw -d 0x80 0x02 0x39 0x00 0x00 0x01 0x00 0x02 -m "$EID"
 then
     echo "Failed to set host$1 power off"
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweron b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweron
index 5dcb1da..8a2a19b 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweron
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-poweron
@@ -6,8 +6,7 @@
 
 # TODO: check power status before do power on
 # Set state effecter state: Entity ID 0x0000 for host power control, 0x1 for power on
-GETEID=$(busctl call "$MCTP_BUS_NAME" "$MCTP_OBJ_PATH" "$MCTP_INTF_NAME" LearnEndpoint say "mctpi2c$(($1-1))" 1 0x20)
-EID=$(echo "$GETEID" | awk '{print $2}')
+EID=$(($1*10))
 if ! pldmtool raw -d 0x80 0x02 0x39 0x00 0x00 0x01 0x00 0x01 -m "$EID"
 then
     echo "Failed to set host$1 power on"
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powerreset b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powerreset
index d667899..03c63b2 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powerreset
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/host-powerreset
@@ -8,8 +8,7 @@
 
 # TODO: check power status before do power reset
 # Set state effecter state: Entity ID 0x0000 for host power control, 0x4 for power reset
-GETEID=$(busctl call "$MCTP_BUS_NAME" "$MCTP_OBJ_PATH" "$MCTP_INTF_NAME" LearnEndpoint say "mctpi2c$(($1-1))" 1 0x20)
-EID=$(echo "$GETEID" | awk '{print $2}')
+EID=$(($1*10))
 if ! pldmtool raw -d 0x80 0x02 0x39 0x00 0x00 0x01 0x00 0x04 -m "$EID"
 then
     echo "Failed to set host$1 power reset"
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/power-cmd b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/power-cmd
index e3ce65f..bfde55d 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/power-cmd
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/power-cmd
@@ -14,6 +14,3 @@
 export CHASSIS_PROPERTY_NAME="CurrentPowerState"
 export CHASSIS_ON_PROPERTY="xyz.openbmc_project.State.Chassis.PowerState.On"
 export CHASSIS_OFF_PROPERTY="xyz.openbmc_project.State.Chassis.PowerState.Off"
-export MCTP_BUS_NAME="xyz.openbmc_project.MCTP"
-export MCTP_OBJ_PATH="/xyz/openbmc_project/mctp"
-export MCTP_INTF_NAME="au.com.CodeConstruct.MCTP"