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/meson.build b/power-sequencer/meson.build
index a52fe02..d5f37cc 100644
--- a/power-sequencer/meson.build
+++ b/power-sequencer/meson.build
@@ -1,16 +1,25 @@
-ucd90160_defs_cpp = custom_target(
- 'ucd90160_defs.cpp',
- command: [
- prog_python, '@INPUT0@',
- '-i', '@INPUT1@', '-o', meson.current_build_dir(),
- ],
- input: [
- 'gen-ucd90160-defs.py',
- get_option('ucd90160-yaml'),
- 'templates/ucd90160_defs.mako.cpp'
- ],
- output: 'ucd90160_defs.cpp',
-)
+sequencer_src = []
+
+if sequencer == 'ucd90160'
+ ucd90160_defs_cpp = custom_target(
+ 'ucd90160_defs.cpp',
+ command: [
+ prog_python, '@INPUT0@',
+ '-i', '@INPUT1@', '-o', meson.current_build_dir(),
+ ],
+ input: [
+ 'gen-ucd90160-defs.py',
+ get_option('ucd90160-yaml'),
+ 'templates/ucd90160_defs.mako.cpp'
+ ],
+ output: 'ucd90160_defs.cpp',
+ )
+
+ sequencer_src += ['ucd90160.cpp', ucd90160_defs_cpp]
+
+elif sequencer == 'mihawk-cpld'
+ sequencer_src += 'mihawk-cpld.cpp'
+endif
executable(
'pseq-monitor',
@@ -19,13 +28,13 @@
'main.cpp',
'pgood_monitor.cpp',
'runtime_monitor.cpp',
- 'ucd90160.cpp',
- ucd90160_defs_cpp,
+ sequencer_src,
dependencies: [
phosphor_dbus_interfaces,
phosphor_logging,
sdbusplus,
sdeventplus,
+ libi2c_dep,
],
include_directories: '..',
install: true,