meta-fii: meta-mori: Remove pwn-init
No need to enable fan in script because there's already a commit
cofigure the pwm enable file.
https://github.com/openbmc/dbus-sensors/commit/abf91de1876278b8b8f98787577a539804833ad4
Change-Id: Id884bfb16c20218cdcc48b290ba04db8d0584ed3
Signed-off-by: Vincent Chou <vincent.chou@fii-na.com>
diff --git a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init.bb b/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init.bb
deleted file mode 100644
index 798bf2b..0000000
--- a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Initialize PWM sensors"
-DESCRIPTION = "Initialize PWM sensors"
-LICENSE = "CLOSED"
-DEPENDS:append = " systemd"
-PR = "r1"
-
-SRC_URI = " \
- file://pwm_init.service \
- file://bin/pwm_init.sh \
-"
-
-S = "${WORKDIR}"
-SYSTEMD_AUTO_ENABLE = "enable"
-SYSTEMD_SERVICE:${PN} = " pwm_init.service"
-
-inherit systemd
-
-do_install() {
- install -d ${D}${libexecdir}/${PN}
- install -m 0755 ${S}/bin/* ${D}${libexecdir}/${PN}/
- install -d ${D}${systemd_system_unitdir}
- install -m 0644 ${S}/*.service ${D}${systemd_system_unitdir}
-}
-
-RDEPENDS:${PN}:append = " bash"
-
-FILES:${PN}:append = " ${bindir}/* ${systemd_system_unitdir}/*"
diff --git a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh b/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh
deleted file mode 100644
index d1d7df1..0000000
--- a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/bin/pwm_init.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#
-
-# Provide source directive to shellcheck.
-# shellcheck source=meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh
-source /usr/libexec/mori-fw/mori-lib.sh
-
-
-# Set all pwm to 50%
-find /sys/class/hwmon/hwmon*/ -name 'pwm[1-6]' -exec bash -c 'echo "$1" && echo 127 > "$1" && cat "$1"' -- {} \;
-
-
-# Set all fans to pwm mode.
-find /sys/class/hwmon/hwmon*/ -name 'pwm*_enable' -exec bash -c 'echo "$1" && echo 1 > "$1" && cat "$1"' -- {} \;
-
-
-for i in {0..5}
-do
- fan_pwm_rate_of_change=0x$(printf '%02x' $((8 + i)) | \
- awk '{print $1}')
- # Set Fan PWM Rate-of-Change Bits(bits 4:2) to 000b
- # Register 08h to 0Dh
- oriRegVal=$(i2cget -y -f "${I2C_FANCTRL[0]}" 0x"${I2C_FANCTRL[1]}" \
- "$fan_pwm_rate_of_change")
- updateVal=$((oriRegVal & 0xe3))
- updateVal=0x$(printf "%x" $updateVal)
- i2cset -y -f "${I2C_FANCTRL[0]}" 0x"${I2C_FANCTRL[1]}" \
- "$fan_pwm_rate_of_change" "$updateVal"
-done
-
diff --git a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/pwm_init.service b/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/pwm_init.service
deleted file mode 100644
index 351d5f1..0000000
--- a/meta-fii/meta-mori/recipes-phosphor/fans/pwm-init/pwm_init.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Init PWM sensors
-Before=xyz.openbmc_project.fansensor.service
-
-[Service]
-Type=oneshot
-ExecStart=/usr/libexec/pwm-init/pwm_init.sh
-
-[Install]
-WantedBy=multi-user.target
-WantedBy=xyz.openbmc_project.fansensor.service
diff --git a/meta-fii/meta-mori/recipes-phosphor/image/obmc-phosphor-image.bbappend b/meta-fii/meta-mori/recipes-phosphor/image/obmc-phosphor-image.bbappend
index 3c09c31..99580a1 100644
--- a/meta-fii/meta-mori/recipes-phosphor/image/obmc-phosphor-image.bbappend
+++ b/meta-fii/meta-mori/recipes-phosphor/image/obmc-phosphor-image.bbappend
@@ -31,7 +31,6 @@
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " fru-device"
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " dbus-sensors"
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " estoraged"
-OBMC_IMAGE_EXTRA_INSTALL:append:mori = " pwm-init"
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " phosphor-pid-control"
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " phosphor-logging"
OBMC_IMAGE_EXTRA_INSTALL:append:mori = " mori-cmd"