meta-ampere: move IPMI power soft to common

Ampere processor uses ACPI graceful shutdown which is triggered from BMC
via a GPIO pin named SHD_REQ. This feature is common for all Ampere
platforms.
This commit moves the configuration for IPMI power soft to
meta-ampere/meta-common so other platforms can use without changes

Tested:
1. Do A/C power the system and boot the Host to OS.
2. Run ipmitool chassis power soft
3. Check if the Host is graceful shutdown.

Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I8a3425c859c4be077075e6a51f12d50283eacdf7
diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere-phosphor-softpoweroff b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere-phosphor-softpoweroff
similarity index 100%
rename from meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere-phosphor-softpoweroff
rename to meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere-phosphor-softpoweroff
diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
similarity index 100%
rename from meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
rename to meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
diff --git a/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000..ae4a2df
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,21 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+
+RRECOMMENDS:${PN} += "ipmitool"
+RDEPENDS:${PN} += "bash"
+
+PACKAGECONFIG[dynamic-sensors] = "--enable-dynamic-sensors"
+HOSTIPMI_PROVIDER_LIBRARY += "libdynamiccmds.so"
+
+SRC_URI += "\
+            file://ampere-phosphor-softpoweroff \
+            file://ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
+           "
+
+AMPERE_SOFTPOWEROFF_TMPL = "ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
+
+do_install:append(){
+    install -d ${D}${includedir}/phosphor-ipmi-host
+    install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host
+    install -m 0755 ${WORKDIR}/ampere-phosphor-softpoweroff ${D}/${bindir}/phosphor-softpoweroff
+    install -m 0644 ${WORKDIR}/${AMPERE_SOFTPOWEROFF_TMPL} ${D}${systemd_unitdir}/system/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
+}
diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index 04fff3d..910b99f 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -2,26 +2,7 @@
 
 DEPENDS:append = " ${MACHINE}-yaml-config"
 
-RRECOMMENDS:${PN} += "ipmitool"
-RDEPENDS:${PN} += "bash"
-
-SRC_URI += " \
-            file://ampere-phosphor-softpoweroff \
-            file://ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
-            "
-
 EXTRA_OECONF = " \
                 SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/${MACHINE}-yaml-config/ipmi-sensors.yaml \
                "
 
-AMPERE_SOFTPOWEROFF_TMPL = "ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
-
-PACKAGECONFIG:append = " dynamic-sensors"
-HOSTIPMI_PROVIDER_LIBRARY += "libdynamiccmds.so"
-
-do_install:append(){
-    install -d ${D}${includedir}/phosphor-ipmi-host
-    install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host
-    install -m 0755 ${WORKDIR}/ampere-phosphor-softpoweroff ${D}/${bindir}/phosphor-softpoweroff
-    install -m 0644 ${WORKDIR}/${AMPERE_SOFTPOWEROFF_TMPL} ${D}${systemd_unitdir}/system/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
-}