Add CPLD class for Mihawk platform
If PGOOD signal is abnormal when chassis power_on, read
Mihawk's CPLD-register via I2C to confirm the error.
First, confirm whether the power_on_error signal is 1
when chassis power_on(1 means abnormal).
If the signal is 1, read the error-code-register to
analysis reason.
Second, runtime to confirm whether the power_ready_error
signal is 1 after chassis power_on(1 means abnormal).
If the signal is 1, read the error-code-register to
analysis reason and shutdown the chassis.
Tested:
Use command "obmcutil chassiskill" to trigger PGOOD error
action analysis during chassis power on.
Signed-off-by: Andy YF Wang <Andy_YF_Wang@wistron.com>
Change-Id: I5f9c0d508627324a6c784ded125c28f0437bf52d
Signed-off-by: Alvin Wang <alvinwang@msn.com>
diff --git a/power-sequencer/main.cpp b/power-sequencer/main.cpp
index b9fa53e..72f96fb 100644
--- a/power-sequencer/main.cpp
+++ b/power-sequencer/main.cpp
@@ -13,7 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "config.h"
+
#include "argument.hpp"
+#include "mihawk-cpld.hpp"
#include "pgood_monitor.hpp"
#include "runtime_monitor.hpp"
#include "ucd90160.hpp"
@@ -52,7 +55,7 @@
auto bus = sdbusplus::bus::new_default();
bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
- auto device = std::make_unique<UCD90160>(0, bus);
+ auto device = std::make_unique<SEQUENCER>(0, bus);
std::unique_ptr<DeviceMonitor> monitor;