meta-ampere: mtjade: don't configure OCP GPIO when BMC rebooted
Configure OCP_AUX_PWREN and/or OCP_MAIN_PWREN GPIOs, even without
changing their values, make the OCP power glitched which consequently
makes the Host OS generates many calltrace message.
When BMC is rebooted, the ampere-gpio-poweron@service service is
triggered that reconfigure these GPIOs.
This comit prevents this case by checking if the Host is currently ON to
skip the reconfiguration.
Tested:
1. Boot the BMC and Host CPU.
2. Reboot BMC. Ensure no call trace for OCP
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I621e025adf72baf84bffd011ea0e04229f739755
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service
index 78862eb..fe776a5 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service
@@ -1,10 +1,10 @@
[Unit]
Description=Ampere set GPIOs before power off
Requires=op-wait-power-off@%i.service
-Before=op-wait-power-off@%i.service
+After=op-wait-power-off@%i.service
Conflicts=obmc-chassis-poweron@%i.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env ampere_gpio_utils.sh power off
-SyslogIdentifier=ampere_gpio_utils
\ No newline at end of file
+SyslogIdentifier=ampere_gpio_utils