meta-facebook: phosphor-state-manager: move greatlakes overrides to system

Greatlakes was a prototype and introduced a lot of noise at the top
level.  Move this into the system-specific side.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ibf3310c7e3ccc4d400f5d422ef577fb2bfdbd685
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle
deleted file mode 100644
index bbf1c91..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-SLOT=$(( $1-1 ))
-OFFSET=$(( 0x9 + SLOT ))
-
-chassis-power-cycle()
-{
-    CHASSIS_ID=$1
-
-    if [ "$CHASSIS_ID" -le 4  ]
-    then
-        chassis_status=$(chassis-power-status $SLOT)
-        if [ "$chassis_status" == "$STATE_ON" ]
-        then
-            i2cset -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" "$OFFSET" "$POW_OFF_SLOT"
-            sleep 10
-            chassis_status=$(chassis-power-status $SLOT)
-            if [ "$chassis_status" -ne "$STATE_OFF" ]
-            then
-                echo "chassis$CHASSIS_ID power off fail"
-                exit 1
-            fi
-        fi
-        i2cset -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" "$OFFSET" "$POW_ON_SLOT"
-        sleep 2
-
-        # Check chassis stattus after doing 12V cycle
-        chassis_status=$(chassis-power-status $SLOT)
-        if [ "$chassis_status" == "$STATE_ON" ]
-        then
-            busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_ON"
-            exit 0;
-        else
-            busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_OFF"
-            exit 0;
-        fi
-    fi
-
-    echo "Invalid slot id"
-    exit 1;
-}
-
-if [ "$1" == 0 ]
-then
-    echo "Enter SLED-cycle"
-    result=$(i2cset -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" 0x2b 0x1)
-    echo "$result"
-else
-    echo "Enter slot$1 cycle"
-    chassis-power-cycle "$1"
-fi
-
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle@.service
deleted file mode 100644
index b95bbf7..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-powercycle@.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Chassis Power Cycle: %i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/chassis-powercycle %i
-ExecStartPost=/bin/systemctl restart phosphor-discover-system-state@%i.service
-
-[Install]
-WantedBy=obmc-chassis-powercycle@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff
deleted file mode 100644
index bde6ce0..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-CHASSIS_ID=$1
-SLOT=$(( $1-1 ))
-OFFSET=$(( 0x9 + SLOT ))
-
-# Server 12v power off
-chassis-power-off()
-{
-        result=$(i2cset -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" "$OFFSET" "$POW_OFF_SLOT")
-        echo "$result"
-        sleep 1
-
-        # Check chassis status after doing 12V off
-        chassis_status=$(chassis-power-status $SLOT)
-        if [ "$chassis_status" == "$STATE_OFF" ]
-        then
-                busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_OFF"
-                echo "Chassis is power off"
-        else
-                busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_ON"
-                echo "Chassis is power on"
-                exit 0;
-        fi
-}
-
-chassis_status=$(chassis-power-status $SLOT)
-if [ "$chassis_status" == "$STATE_UNKNOWN" ]
-then
-        echo "Invalid slot id"
-        exit 1;
-elif [ "$chassis_status" == "$STATE_ON" ]
-then
-        chassis-power-off
-        exit 0;
-else
-        echo "Chassis is already off"
-        exit 0;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff@.service
deleted file mode 100644
index 09494c1..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweroff@.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=power off chassis:%i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/chassis-poweroff %i
-
-[Install]
-WantedBy=obmc-chassis-hard-poweroff@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron
deleted file mode 100644
index 08b1e30..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-CHASSIS_ID=$1
-SLOT=$(( $1-1 ))
-OFFSET=$(( 0x9 + SLOT ))
-
-# Server 12v power on
-chassis-power-on()
-{
-       result=$(i2cset -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" "$OFFSET" "$POW_ON_SLOT")
-       echo "$result"
-       sleep 1
-
-       # Check chassis stattus after doing 12V on
-       chassis_status=$(chassis-power-status $SLOT)
-       if [ "$chassis_status" == "$STATE_ON" ]
-       then
-               busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_ON"
-               echo "Chassis is power on"
-       else
-               busctl set-property "$CHASSIS_BUS_NAME""$CHASSIS_ID" "$CHASSIS_OBJ_PATH""$CHASSIS_ID" "$CHASSIS_INTF_NAME" "$CHASSIS_PROPERTY_NAME" s "$CHASSIS_OFF"
-               echo "Chassis is power off"
-               exit 0;
-       fi
-}
-
-chassis_status=$(chassis-power-status $SLOT)
-if [ "$chassis_status" == "$STATE_UNKNOWN" ]
-then
-        echo "Invalid slot id"
-        exit 1;
-elif [ "$chassis_status" == "$STATE_OFF" ]
-then
-        chassis-power-on
-        exit 0;
-else
-        echo "Chassis is already on"
-        exit 0;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron@.service
deleted file mode 100644
index f147737..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/chassis-poweron@.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=power on chassis:%i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/chassis-poweron %i
-ExecStartPost=/bin/systemctl restart phosphor-discover-system-state@%i.service
-
-[Install]
-WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle
deleted file mode 100644
index 47fecfc..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-HOST_ID=$1
-SLOT_ID=$(( $1-1  << 2 ))
-
-# Host Reboot
-host-reboot()
-{
-        power_delay=$1
-        for pwr_cmd in "${power_seq[@]}"
-        do
-             response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0x00 "$pwr_cmd")"
-             echo "$response"
-             result=$(echo "$response" | cut -d" " -f "$IPMB_CMD_COMPLETE_CODE_INDEX")
-             if [ "$result" -ne 0 ]
-             then
-                     echo "Failed to send ipmb command"
-                     exit 1
-             fi
-             if [ "$pwr_cmd" == "$POWER_BTN_LOW" ]
-             then
-                     sleep "$power_delay"
-             fi
-        done
-}
-
-# Check Host Response and Status
-host_status=$(host-power-status $SLOT_ID)
-if [ "$host_status" == "$STATE_ON" ]
-then
-  host-reboot 6
-  sleep 15
-  host-reboot 2
-
-  host_status=$(host-power-status $SLOT_ID)
-  if [ "$host_status" == "$STATE_ON" ]
-  then
-      busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_ON"
-      exit 0;
-  else
-      busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_OFF"
-      exit 0;
-  fi
-else
-  echo "Host is Off"
-  exit 1;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle@.service
deleted file mode 100644
index f45e71f..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powercycle@.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Host Power Cycle: %i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/host-powercycle %i
-
-[Install]
-WantedBy=obmc-host-reboot@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff
deleted file mode 100644
index b322faa..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-HOST_ID=$1
-SLOT_ID=$(( $1-1  << 2 ))
-
-# Host Power Off
-host-power-off()
-{
-        for pwr_cmd in "${power_seq[@]}"
-        do
-             response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0x00 "$pwr_cmd")"
-             echo "$response"
-             result=$(echo "$response" | cut -d" " -f "$IPMB_CMD_COMPLETE_CODE_INDEX")
-             if [ "$result" -ne 0 ]
-             then
-                     echo "Failed to send ipmb command"
-                     exit 1
-             fi
-             if [ "$pwr_cmd" == "$POWER_BTN_LOW" ]
-             then
-                     sleep 6
-             fi
-        done
-
-        # Check host stattus after doing host power off
-        host_status=$(host-power-status $SLOT_ID)
-        if [ "$host_status" == "$STATE_OFF" ]
-        then
-             busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_OFF"
-             echo "Host power off"
-             exit 0;
-        else
-             busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_ON"
-             echo "Host power on"
-             exit 0;
-        fi
-}
-
-# Check Host Response and Status
-host_status=$(host-power-status $SLOT_ID)
-if [ "$host_status" == "$STATE_ON" ]
-then
-       host-power-off
-else
-       echo "Power is already off"
-       exit 1;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff@.service
deleted file mode 100644
index 3ead57e..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweroff@.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=power off host:%i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/host-poweroff %i
-
-[Install]
-WantedBy=obmc-host-shutdown@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron
deleted file mode 100644
index 5d8fab3..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-HOST_ID=$1
-SLOT_ID=$(( $1-1  << 2 ))
-# Host Power On
-host-power-on()
-{
-        for pwr_cmd in "${power_seq[@]}"
-        do
-             response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0x00 "$pwr_cmd")"
-             echo "$response"
-             result=$(echo "$response" | cut -d" " -f "$IPMB_CMD_COMPLETE_CODE_INDEX")
-             if [ "$result" -ne 0 ]
-             then
-                     echo "Failed to send ipmb command"
-                     exit 1
-             fi
-             if [ "$pwr_cmd" == "$POWER_BTN_LOW" ]
-             then
-                     sleep 2
-             fi
-        done
-
-        # Check host status after doing host power on
-        host_status=$(host-power-status $SLOT_ID)
-        if [ "$host_status" == "$STATE_ON" ]
-        then
-             busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_ON"
-             echo "Host power on"
-             exit 0;
-        else
-             busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_OFF"
-             echo "Host power off"
-             exit 0;
-        fi
-}
-
-# Check Host Response and Status
-host_status=$(host-power-status $SLOT_ID)
-if [ "$host_status" == "$STATE_OFF" ]
-then
-   host-power-on
-else
-   echo "Power is already on"
-   exit 1;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron@.service
deleted file mode 100644
index 6f59a6b..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-poweron@.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=power on host:%i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/host-poweron %i
-
-[Install]
-WantedBy=obmc-host-start@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
deleted file mode 100644
index b90c5f0..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
-source /usr/libexec/phosphor-state-manager/power-cmd
-
-HOST_ID=$1
-SLOT_ID=$(( $1-1  << 2 ))
-
-# Host Reboot
-host-reboot()
-{
-    for reset_cmd in "${reset_seq[@]}"
-    do
-        response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0 "$reset_cmd")"
-        echo "$response"
-        result=$(echo "$response" | cut -d" " -f "$IPMB_CMD_COMPLETE_CODE_INDEX")
-        if [ "$result" -ne 0 ]
-        then
-            echo "Failed to send ipmb command"
-            exit 1
-        fi
-        if [ "$reset_cmd" == "$POWER_BTN_LOW" ]
-        then
-            sleep "$1"
-        fi
-    done
-
-    # Check host stattus after doing host power reset
-    host_status=$(host-power-status $SLOT_ID)
-    if [ "$host_status" == "$STATE_ON" ]
-    then
-        busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_ON"
-        echo "Host power Reset"
-        exit 0;
-    else
-        busctl set-property "$HOST_BUS_NAME""$HOST_ID" "$HOST_OBJ_PATH""$HOST_ID" "$HOST_INTF_NAME" "$HOST_PROPERTY_NAME" s "$HOST_OFF"
-        echo "Host power off"
-        exit 0;
-    fi
-}
-
-# Check Host Response and Status
-host_status=$(host-power-status $SLOT_ID)
-if [ "$host_status" == "$STATE_ON" ]
-then
-    host-reboot 1
-else
-    echo "Host is Off"
-    exit 1;
-fi
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset@.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset@.service
deleted file mode 100644
index 0fd059c..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset@.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Host Power Reset: %i
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/host-powerreset %i
-
-[Install]
-WantedBy=obmc-host-force-warm-reboot@%i.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
deleted file mode 100644
index 44ed0dc..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-cmd
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-export POWER_BTN_HIGH=0xFF
-export POWER_BTN_LOW=0xFE
-export RESET_BTN_HIGH=0xFF
-export RESET_BTN_LOW=0xFD
-export power_seq=( "$POWER_BTN_HIGH" "$POWER_BTN_LOW" "$POWER_BTN_HIGH" )
-export reset_seq=( "$RESET_BTN_HIGH" "$RESET_BTN_LOW" "$RESET_BTN_HIGH")
-export SERVICE="xyz.openbmc_project.Ipmi.Channel.Ipmb"
-export OBJECT_PATH="/xyz/openbmc_project/Ipmi/Channel/Ipmb"
-export INTERFACE="org.openbmc.Ipmb"
-export DATA_LEN=0x05
-export NETFN=0x06
-export LUN=0x00
-export CMD=0x52
-export STATE_OFF=0
-export STATE_ON=1
-export STATE_UNKNOWN=-1
-export CPLD_BUS_NUM=12
-export CPLD_PWR_CTRL_ADDR=0xf
-export POW_ON_SLOT=0x01
-export POW_OFF_SLOT=0x00
-export PWRGD_SYS_PWROK_INDEX=12
-export IANA="0x15 0xA0 0x0"
-export IANA_LEN=3
-export CHASSIS_BUS_NAME="xyz.openbmc_project.State.Chassis"
-export CHASSIS_OBJ_PATH="/xyz/openbmc_project/state/chassis"
-export CHASSIS_INTF_NAME="xyz.openbmc_project.State.Chassis"
-export CHASSIS_PROPERTY_NAME="CurrentPowerState"
-export HOST_BUS_NAME="xyz.openbmc_project.State.Host"
-export HOST_OBJ_PATH="/xyz/openbmc_project/state/host"
-export HOST_INTF_NAME="xyz.openbmc_project.State.Host"
-export HOST_PROPERTY_NAME="CurrentHostState"
-export CHASSIS_ON="xyz.openbmc_project.State.Chassis.PowerState.On"
-export CHASSIS_OFF="xyz.openbmc_project.State.Chassis.PowerState.Off"
-export HOST_ON="xyz.openbmc_project.State.Host.HostState.Running"
-export HOST_OFF="xyz.openbmc_project.State.Host.HostState.Off"
-export IPMB_CMD_COMPLETE_CODE_INDEX=2
-
-host-power-status()
-{
-    SLOT_ID=$1
-
-    response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" 0x38 "$LUN" 0x03 0x03 0x15 0xa0 0x00)"
-    result=$(echo "$response" | cut -d" " -f "$PWRGD_SYS_PWROK_INDEX")
-    res="$(( "$result" & 0x80  ))"
-    status="$(( "$res" >> 7 ))"
-
-    echo "$status"
-    return 0
-}
-
-chassis-power-status()
-{
-    slot=$1
-    status=-1
-
-    if [ "$slot" -le 4  ]
-    then
-            response="$(i2cget -y "$CPLD_BUS_NUM" "$CPLD_PWR_CTRL_ADDR" 0x25)"
-            res="$(( "$response" >> slot ))"
-            status="$(( "$res" & 0x01  ))"
-    fi
-
-    echo "$status"
-    return 0
-}
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init
deleted file mode 100644
index da4c278..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-# Provide source directive to shellcheck.
-gpioInitHighTable=(
-    "power-nic-bmc-enable"
-    "usb-bmc-enable"
-    "reset-cause-usb-hub"
-    "bmc-ready"
-    "fan0-bmc-cpld-enable"
-    "fan1-bmc-cpld-enable"
-    "fan2-bmc-cpld-enable"
-    "fan3-bmc-cpld-enable"
-)
-
-gpio-init()
-{
-    for gpioInitHigh in "${gpioInitHighTable[@]}"
-    do
-    # need the word splitting for gpiofind command.
-    # shellcheck disable=SC2046
-    gpioset $(gpiofind "${gpioInitHigh}")=1
-    done
-}
-
-gpio-init
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init.service
deleted file mode 100644
index 7eb8d13..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/power-ctrl-init.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Power Control Initialization
-Before=mapper-wait@-xyz.openbmc_project.State.Chassis@0.service
-Before=mapper-wait@-xyz-openbmc_project-state-bmc.service
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/power-ctrl-init
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/sled-cycle.service b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/sled-cycle.service
deleted file mode 100644
index d6b2118..0000000
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/sled-cycle.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Sled Cycle
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/phosphor-state-manager/chassis-powercycle 0
-
-[Install]
-WantedBy=obmc-chassis-powercycle@0.target
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
index 8d48c68..fb6970c 100644
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
+++ b/meta-facebook/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 HOST_DEFAULT_TARGETS:append = " \
     obmc-host-shutdown@{}.target.wants/host-poweroff@{}.service \
@@ -17,49 +17,4 @@
     obmc-chassis-poweroff@{}.target.requires/obmc-powered-off@{}.service \
 "
 
-CHASSIS_DEFAULT_TARGETS:remove:greatlakes = " \
-    obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \
-    obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \
-    "
-
-SRC_URI:append:greatlakes = " \
-    file://chassis-poweroff@.service \
-    file://chassis-poweron@.service \
-    file://chassis-powercycle@.service \
-    file://host-poweroff@.service \
-    file://host-poweron@.service \
-    file://host-powercycle@.service \
-    file://host-powerreset@.service \
-    file://power-ctrl-init.service \
-    file://chassis-poweroff \
-    file://chassis-poweron \
-    file://chassis-powercycle \
-    file://host-poweroff \
-    file://host-poweron \
-    file://host-powercycle \
-    file://host-powerreset \
-    file://power-cmd \
-    file://power-ctrl-init \
-    "
-
-RDEPENDS:${PN}:append:greatlakes = " bash"
-
-do_install:append:greatlakes() {
-    install -d ${D}${systemd_system_unitdir}
-    install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
-
-    install -d ${D}${libexecdir}/${PN}
-    install -m 0755 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/
-    install -m 0755 ${WORKDIR}/power-ctrl-init ${D}${libexecdir}/${PN}/
-}
-
 FILES:${PN} += " ${systemd_system_unitdir}/*.service"
-
-SYSTEMD_SERVICE:${PN}-bmc:append:greatlakes = "power-ctrl-init.service"