summaryrefslogtreecommitdiff
path: root/meta-quanta
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2022-04-07 23:23:44 +0300
committerWilliam A. Kennington III <wak@google.com>2022-04-16 03:30:29 +0300
commit09696fc31cb5ddbcc5b19d8bdb491a08c5db55e9 (patch)
treebddfa43b3647f9eff670b9ba5f38a8c9f62aad4f /meta-quanta
parentff50d27fb7f718805e15c5cdc586a6e65b929540 (diff)
downloadopenbmc-09696fc31cb5ddbcc5b19d8bdb491a08c5db55e9.tar.xz
meta-quanta: Add hotswap ordering
We want it to be possible to order units prior to the powercycle event if state needs to be persisted prior to a powercycle. We can also remove the time_delay functionality as this is now provided globally by the gbmc-psu-hardreset.target. Change-Id: I15b33e120be0246dd821d0dfe9d61b5aae7d1492 Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-quanta')
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service2
-rw-r--r--meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh7
-rw-r--r--meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/hotswap-power-cycle/files/hotswap-power-cycle.service7
3 files changed, 3 insertions, 13 deletions
diff --git a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service
index 054b2fe6d3..b95cafad4d 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service
+++ b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/hotswap-power-cycle.service
@@ -1,9 +1,9 @@
[Unit]
Description=Power Cycle by Hotswap Controller
+After=gbmc-psu-hardreset.target
[Service]
Type=oneshot
-EnvironmentFile=-/run/psu_timedelay
ExecStart=/usr/bin/tray_powercycle.sh
[Install]
diff --git a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh
index 01c52deac1..e22dd20438 100644
--- a/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh
+++ b/meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh
@@ -25,13 +25,6 @@ stop_phosphor_hwmon() {
}
main() {
- # Sleep PSU_HARDRESET_DELAY seconds
- local psu_delay=$((PSU_HARDRESET_DELAY))
- if ((psu_delay > 0)); then
- echo "Sleeping ${psu_delay} seconds before PSU hard reset!"
- sleep "${psu_delay}"
- fi
-
# Stop phosphor-hwmon so that ADM1272 powercycle doesn't happen
# in the middle of an i2c transaction and stuck the bus low
stop_phosphor_hwmon
diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/hotswap-power-cycle/files/hotswap-power-cycle.service b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/hotswap-power-cycle/files/hotswap-power-cycle.service
index a682eb2542..d1082a7a49 100644
--- a/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/hotswap-power-cycle/files/hotswap-power-cycle.service
+++ b/meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/hotswap-power-cycle/files/hotswap-power-cycle.service
@@ -1,13 +1,10 @@
[Unit]
Description=Power Cycle by Hotswap Controller
+After=gbmc-psu-hardreset.target
[Service]
-EnvironmentFile=/run/psu_timedelay
-ExecStartPre=sleep $PSU_HARDRESET_DELAY
-ExecStart= i2cset -f -y 8 0x11 0xd9
-Restart=no
Type=oneshot
-RemainAfterExit=true
+ExecStart= i2cset -f -y 8 0x11 0xd9
[Install]
WantedBy=gbmc-psu-hardreset.target