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/elog-errors.hpp b/elog-errors.hpp
index 187e3de..f51e90f 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -22,26 +22,6 @@
{
namespace Error
{
-struct PowerSequencerPGOODFault;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
struct MemoryPowerFault;
} // namespace Error
} // namespace Fault
@@ -52,86 +32,6 @@
namespace sdbusplus
{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace Callout
-{
-namespace Error
-{
-struct GPIO;
-} // namespace Error
-} // namespace Callout
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerOnFailure;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerSupplyInputFault;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace Callout
-{
-namespace Error
-{
-struct IIC;
-} // namespace Error
-} // namespace Callout
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
namespace org
{
namespace open_power
@@ -162,127 +62,7 @@
{
namespace Error
{
-struct Shutdown;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace Callout
-{
-namespace Error
-{
-struct Inventory;
-} // namespace Error
-} // namespace Callout
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Common
-{
-namespace Callout
-{
-namespace Error
-{
-struct Device;
-} // namespace Error
-} // namespace Callout
-} // namespace Common
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerSequencerFault;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerSupplyOutputOvercurrent;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerSupplyOutputOvervoltage;
-} // namespace Error
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace Error
-{
-struct PowerSupplyFanFault;
+struct PowerSequencerPGOODFault;
} // namespace Error
} // namespace Fault
} // namespace Witherspoon
@@ -312,6 +92,26 @@
namespace sdbusplus
{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct GPUOverTemp;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
namespace xyz
{
namespace openbmc_project
@@ -342,6 +142,486 @@
{
namespace Error
{
+struct PowerOnFailure;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct Shutdown;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct PowerSupplyInputFault;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace Callout
+{
+namespace Error
+{
+struct Device;
+} // namespace Error
+} // namespace Callout
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode15;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode14;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode17;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode16;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode11;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode10;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode13;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode12;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode36;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode35;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode34;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode19;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode18;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode31;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode30;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace Callout
+{
+namespace Error
+{
+struct GPIO;
+} // namespace Error
+} // namespace Callout
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace Callout
+{
+namespace Error
+{
+struct IIC;
+} // namespace Error
+} // namespace Callout
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode32;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct PowerSupplyOutputOvercurrent;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode33;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
struct PowerSupplyTemperatureFault;
} // namespace Error
} // namespace Fault
@@ -362,6 +642,326 @@
{
namespace Error
{
+struct PowerSequencerFault;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct PowerSupplyFanFault;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct PowerSupplyOutputOvervoltage;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode9;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode8;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Common
+{
+namespace Callout
+{
+namespace Error
+{
+struct Inventory;
+} // namespace Error
+} // namespace Callout
+} // namespace Common
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode5;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode4;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode7;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode6;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode1;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode0;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode3;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode2;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode28;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode29;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
struct PowerSupplyShouldBeOn;
} // namespace Error
} // namespace Fault
@@ -382,7 +982,147 @@
{
namespace Error
{
-struct GPUOverTemp;
+struct ErrorCode20;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode21;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode22;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode23;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode24;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode25;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode26;
+} // namespace Error
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace Error
+{
+struct ErrorCode27;
} // namespace Error
} // namespace Fault
} // namespace Witherspoon
@@ -396,6 +1136,1624 @@
namespace logging
{
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _Shutdown
+{
+
+} // namespace _Shutdown
+
+struct Shutdown
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::Shutdown>
+{
+ using type = org::open_power::Witherspoon::Fault::Shutdown;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _PowerOnFailure
+{
+
+} // namespace _PowerOnFailure
+
+struct PowerOnFailure
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::PowerOnFailure>
+{
+ using type = org::open_power::Witherspoon::Fault::PowerOnFailure;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode0
+{
+
+} // namespace _ErrorCode0
+
+struct ErrorCode0
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode0>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode0;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode1
+{
+
+} // namespace _ErrorCode1
+
+struct ErrorCode1
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode1>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode1;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode2
+{
+
+} // namespace _ErrorCode2
+
+struct ErrorCode2
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode2>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode2;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode3
+{
+
+} // namespace _ErrorCode3
+
+struct ErrorCode3
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode3>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode3;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode4
+{
+
+} // namespace _ErrorCode4
+
+struct ErrorCode4
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode4>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode4;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode5
+{
+
+} // namespace _ErrorCode5
+
+struct ErrorCode5
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode5>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode5;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode6
+{
+
+} // namespace _ErrorCode6
+
+struct ErrorCode6
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode6>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode6;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode7
+{
+
+} // namespace _ErrorCode7
+
+struct ErrorCode7
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode7>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode7;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode8
+{
+
+} // namespace _ErrorCode8
+
+struct ErrorCode8
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode8>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode8;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode9
+{
+
+} // namespace _ErrorCode9
+
+struct ErrorCode9
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode9>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode9;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode10
+{
+
+} // namespace _ErrorCode10
+
+struct ErrorCode10
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode10>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode10;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode11
+{
+
+} // namespace _ErrorCode11
+
+struct ErrorCode11
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode11>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode11;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode12
+{
+
+} // namespace _ErrorCode12
+
+struct ErrorCode12
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode12>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode12;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode13
+{
+
+} // namespace _ErrorCode13
+
+struct ErrorCode13
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode13>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode13;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode14
+{
+
+} // namespace _ErrorCode14
+
+struct ErrorCode14
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode14>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode14;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode15
+{
+
+} // namespace _ErrorCode15
+
+struct ErrorCode15
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode15>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode15;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode16
+{
+
+} // namespace _ErrorCode16
+
+struct ErrorCode16
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode16>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode16;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode17
+{
+
+} // namespace _ErrorCode17
+
+struct ErrorCode17
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode17>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode17;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode18
+{
+
+} // namespace _ErrorCode18
+
+struct ErrorCode18
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode18>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode18;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode19
+{
+
+} // namespace _ErrorCode19
+
+struct ErrorCode19
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode19>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode19;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode20
+{
+
+} // namespace _ErrorCode20
+
+struct ErrorCode20
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode20>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode20;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode21
+{
+
+} // namespace _ErrorCode21
+
+struct ErrorCode21
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode21>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode21;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode22
+{
+
+} // namespace _ErrorCode22
+
+struct ErrorCode22
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode22>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode22;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode23
+{
+
+} // namespace _ErrorCode23
+
+struct ErrorCode23
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode23>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode23;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode24
+{
+
+} // namespace _ErrorCode24
+
+struct ErrorCode24
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode24>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode24;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode25
+{
+
+} // namespace _ErrorCode25
+
+struct ErrorCode25
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode25>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode25;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode26
+{
+
+} // namespace _ErrorCode26
+
+struct ErrorCode26
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode26>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode26;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode27
+{
+
+} // namespace _ErrorCode27
+
+struct ErrorCode27
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode27>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode27;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode28
+{
+
+} // namespace _ErrorCode28
+
+struct ErrorCode28
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode28>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode28;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode29
+{
+
+} // namespace _ErrorCode29
+
+struct ErrorCode29
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode29>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode29;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode30
+{
+
+} // namespace _ErrorCode30
+
+struct ErrorCode30
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode30>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode30;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode31
+{
+
+} // namespace _ErrorCode31
+
+struct ErrorCode31
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode31>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode31;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode32
+{
+
+} // namespace _ErrorCode32
+
+struct ErrorCode32
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode32>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode32;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode33
+{
+
+} // namespace _ErrorCode33
+
+struct ErrorCode33
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode33>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode33;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode34
+{
+
+} // namespace _ErrorCode34
+
+struct ErrorCode34
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode34>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode34;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode35
+{
+
+} // namespace _ErrorCode35
+
+struct ErrorCode35
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode35>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode35;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _ErrorCode36
+{
+
+} // namespace _ErrorCode36
+
+struct ErrorCode36
+{
+ static constexpr auto L = level::ERR;
+ using metadata_types = std::tuple<>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::ErrorCode36>
+{
+ using type = org::open_power::Witherspoon::Fault::ErrorCode36;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _PowerSequencerVoltageFault
+{
+
+struct RAIL
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "RAIL";
+ using type = std::tuple<std::decay_t<decltype("RAIL=%d")>, uint16_t>;
+ explicit constexpr RAIL(uint16_t a) : _entry(entry("RAIL=%d", a)){};
+ type _entry;
+};
+struct RAIL_NAME
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "RAIL_NAME";
+ using type =
+ std::tuple<std::decay_t<decltype("RAIL_NAME=%s")>, const char*>;
+ explicit constexpr RAIL_NAME(const char* a) :
+ _entry(entry("RAIL_NAME=%s", a)){};
+ type _entry;
+};
+struct RAW_STATUS
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "RAW_STATUS";
+ using type =
+ std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
+ explicit constexpr RAW_STATUS(const char* a) :
+ _entry(entry("RAW_STATUS=%s", a)){};
+ type _entry;
+};
+
+} // namespace _PowerSequencerVoltageFault
+
+struct PowerSequencerVoltageFault
+{
+ static constexpr auto L = level::ERR;
+ using RAIL = _PowerSequencerVoltageFault::RAIL;
+ using RAIL_NAME = _PowerSequencerVoltageFault::RAIL_NAME;
+ using RAW_STATUS = _PowerSequencerVoltageFault::RAW_STATUS;
+ using metadata_types = std::tuple<RAIL, RAIL_NAME, RAW_STATUS>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::org::open_power::Witherspoon::Fault::
+ Error::PowerSequencerVoltageFault>
+{
+ using type =
+ org::open_power::Witherspoon::Fault::PowerSequencerVoltageFault;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _PowerSequencerPGOODFault
+{
+
+struct INPUT_NUM
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "INPUT_NUM";
+ using type = std::tuple<std::decay_t<decltype("INPUT_NUM=%d")>, uint16_t>;
+ explicit constexpr INPUT_NUM(uint16_t a) :
+ _entry(entry("INPUT_NUM=%d", a)){};
+ type _entry;
+};
+struct INPUT_NAME
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "INPUT_NAME";
+ using type =
+ std::tuple<std::decay_t<decltype("INPUT_NAME=%s")>, const char*>;
+ explicit constexpr INPUT_NAME(const char* a) :
+ _entry(entry("INPUT_NAME=%s", a)){};
+ type _entry;
+};
+struct RAW_STATUS
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "RAW_STATUS";
+ using type =
+ std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
+ explicit constexpr RAW_STATUS(const char* a) :
+ _entry(entry("RAW_STATUS=%s", a)){};
+ type _entry;
+};
+
+} // namespace _PowerSequencerPGOODFault
+
+struct PowerSequencerPGOODFault
+{
+ static constexpr auto L = level::ERR;
+ using INPUT_NUM = _PowerSequencerPGOODFault::INPUT_NUM;
+ using INPUT_NAME = _PowerSequencerPGOODFault::INPUT_NAME;
+ using RAW_STATUS = _PowerSequencerPGOODFault::RAW_STATUS;
+ using metadata_types = std::tuple<INPUT_NUM, INPUT_NAME, RAW_STATUS>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::org::open_power::Witherspoon::Fault::
+ Error::PowerSequencerPGOODFault>
+{
+ using type = org::open_power::Witherspoon::Fault::PowerSequencerPGOODFault;
+};
+
+} // namespace details
+
+namespace org
+{
+namespace open_power
+{
+namespace Witherspoon
+{
+namespace Fault
+{
+namespace _PowerSequencerFault
+{
+
+struct RAW_STATUS
+{
+ /*
+ * We can't use -fsanitize=undefined if we declare a
+ * 'static constexpr auto str' member, so don't. Instead, open-code the
+ * mako template lookups.
+ */
+ static constexpr auto str_short = "RAW_STATUS";
+ using type =
+ std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
+ explicit constexpr RAW_STATUS(const char* a) :
+ _entry(entry("RAW_STATUS=%s", a)){};
+ type _entry;
+};
+
+} // namespace _PowerSequencerFault
+
+struct PowerSequencerFault
+{
+ static constexpr auto L = level::ERR;
+ using RAW_STATUS = _PowerSequencerFault::RAW_STATUS;
+ using metadata_types = std::tuple<RAW_STATUS>;
+};
+
+} // namespace Fault
+} // namespace Witherspoon
+} // namespace open_power
+} // namespace org
+
+namespace details
+{
+
+template <>
+struct map_exception_type<
+ sdbusplus::org::open_power::Witherspoon::Fault::Error::PowerSequencerFault>
+{
+ using type = org::open_power::Witherspoon::Fault::PowerSequencerFault;
+};
+
+} // namespace details
+
namespace xyz
{
namespace openbmc_project
@@ -1032,290 +3390,6 @@
{
namespace Fault
{
-namespace _Shutdown
-{
-} // namespace _Shutdown
-
-struct Shutdown
-{
- static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
-};
-
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
- sdbusplus::org::open_power::Witherspoon::Fault::Error::Shutdown>
-{
- using type = org::open_power::Witherspoon::Fault::Shutdown;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace _PowerOnFailure
-{
-} // namespace _PowerOnFailure
-
-struct PowerOnFailure
-{
- static constexpr auto L = level::ERR;
- using metadata_types = std::tuple<>;
-};
-
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
- sdbusplus::org::open_power::Witherspoon::Fault::Error::PowerOnFailure>
-{
- using type = org::open_power::Witherspoon::Fault::PowerOnFailure;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace _PowerSequencerVoltageFault
-{
-
-struct RAIL
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "RAIL";
- using type = std::tuple<std::decay_t<decltype("RAIL=%d")>, uint16_t>;
- explicit constexpr RAIL(uint16_t a) : _entry(entry("RAIL=%d", a)){};
- type _entry;
-};
-struct RAIL_NAME
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "RAIL_NAME";
- using type =
- std::tuple<std::decay_t<decltype("RAIL_NAME=%s")>, const char*>;
- explicit constexpr RAIL_NAME(const char* a) :
- _entry(entry("RAIL_NAME=%s", a)){};
- type _entry;
-};
-struct RAW_STATUS
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "RAW_STATUS";
- using type =
- std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
- explicit constexpr RAW_STATUS(const char* a) :
- _entry(entry("RAW_STATUS=%s", a)){};
- type _entry;
-};
-
-} // namespace _PowerSequencerVoltageFault
-
-struct PowerSequencerVoltageFault
-{
- static constexpr auto L = level::ERR;
- using RAIL = _PowerSequencerVoltageFault::RAIL;
- using RAIL_NAME = _PowerSequencerVoltageFault::RAIL_NAME;
- using RAW_STATUS = _PowerSequencerVoltageFault::RAW_STATUS;
- using metadata_types = std::tuple<RAIL, RAIL_NAME, RAW_STATUS>;
-};
-
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::org::open_power::Witherspoon::Fault::
- Error::PowerSequencerVoltageFault>
-{
- using type =
- org::open_power::Witherspoon::Fault::PowerSequencerVoltageFault;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace _PowerSequencerPGOODFault
-{
-
-struct INPUT_NUM
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "INPUT_NUM";
- using type = std::tuple<std::decay_t<decltype("INPUT_NUM=%d")>, uint16_t>;
- explicit constexpr INPUT_NUM(uint16_t a) :
- _entry(entry("INPUT_NUM=%d", a)){};
- type _entry;
-};
-struct INPUT_NAME
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "INPUT_NAME";
- using type =
- std::tuple<std::decay_t<decltype("INPUT_NAME=%s")>, const char*>;
- explicit constexpr INPUT_NAME(const char* a) :
- _entry(entry("INPUT_NAME=%s", a)){};
- type _entry;
-};
-struct RAW_STATUS
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "RAW_STATUS";
- using type =
- std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
- explicit constexpr RAW_STATUS(const char* a) :
- _entry(entry("RAW_STATUS=%s", a)){};
- type _entry;
-};
-
-} // namespace _PowerSequencerPGOODFault
-
-struct PowerSequencerPGOODFault
-{
- static constexpr auto L = level::ERR;
- using INPUT_NUM = _PowerSequencerPGOODFault::INPUT_NUM;
- using INPUT_NAME = _PowerSequencerPGOODFault::INPUT_NAME;
- using RAW_STATUS = _PowerSequencerPGOODFault::RAW_STATUS;
- using metadata_types = std::tuple<INPUT_NUM, INPUT_NAME, RAW_STATUS>;
-};
-
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::org::open_power::Witherspoon::Fault::
- Error::PowerSequencerPGOODFault>
-{
- using type = org::open_power::Witherspoon::Fault::PowerSequencerPGOODFault;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
-namespace _PowerSequencerFault
-{
-
-struct RAW_STATUS
-{
- /*
- * We can't use -fsanitize=undefined if we declare a
- * 'static constexpr auto str' member, so don't. Instead, open-code the
- * mako template lookups.
- */
- static constexpr auto str_short = "RAW_STATUS";
- using type =
- std::tuple<std::decay_t<decltype("RAW_STATUS=%s")>, const char*>;
- explicit constexpr RAW_STATUS(const char* a) :
- _entry(entry("RAW_STATUS=%s", a)){};
- type _entry;
-};
-
-} // namespace _PowerSequencerFault
-
-struct PowerSequencerFault
-{
- static constexpr auto L = level::ERR;
- using RAW_STATUS = _PowerSequencerFault::RAW_STATUS;
- using metadata_types = std::tuple<RAW_STATUS>;
-};
-
-} // namespace Fault
-} // namespace Witherspoon
-} // namespace open_power
-} // namespace org
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
- sdbusplus::org::open_power::Witherspoon::Fault::Error::PowerSequencerFault>
-{
- using type = org::open_power::Witherspoon::Fault::PowerSequencerFault;
-};
-
-} // namespace details
-
-namespace org
-{
-namespace open_power
-{
-namespace Witherspoon
-{
-namespace Fault
-{
namespace _GPUPowerFault
{
diff --git a/meson.build b/meson.build
index 1827472..2bc4b50 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,17 @@
install_dir: servicedir)
endforeach
+# Get the power sequencer class name
+sequencer = get_option('power_sequencer')
+if sequencer == 'ucd90160'
+ sequencer_class = 'UCD90160'
+elif sequencer == 'mihawk-cpld'
+ sequencer_class = 'MihawkCPLD'
+else
+ # power sequencer is incorrect
+ error('power sequencer is incorrect')
+endif
+
conf = configuration_data()
conf.set_quoted(
'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root'))
@@ -65,8 +76,10 @@
'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root'))
conf.set_quoted(
'PSU_JSON_PATH', '/usr/share/phosphor-power/psu.json')
+conf.set(
+ 'SEQUENCER', sequencer_class)
conf.set10(
- 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access'))
+ 'DEVICE_ACCESS', get_option('device-access'))
configure_file(output: 'config.h', configuration: conf)
diff --git a/meson_options.txt b/meson_options.txt
index da9cdd3..1155cac 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,8 +11,15 @@
option(
'tests', type: 'feature', description: 'Build tests.',
)
+
+# Supported power sequencers are: ucd90160, mihawk-cpld
option(
- 'ucd90160-access', type: 'boolean', value: true,
+ 'power_sequencer', type: 'string', value: 'ucd90160',
+ description: 'The power sequencer',
+)
+
+option(
+ 'device-access', type: 'boolean', value: true,
description: 'Enable UCD90160 hardware access.',
)
option(
diff --git a/org/open_power/Witherspoon/Fault.errors.yaml b/org/open_power/Witherspoon/Fault.errors.yaml
index 668568d..37b69a4 100644
--- a/org/open_power/Witherspoon/Fault.errors.yaml
+++ b/org/open_power/Witherspoon/Fault.errors.yaml
@@ -24,6 +24,117 @@
- name: PowerOnFailure
description: System power failed to turn on
+- name: ErrorCode0
+ description: Read CPLD-register fail
+
+- name: ErrorCode1
+ description: CPLD's error reason is PSU0_PGOOD fail
+
+- name: ErrorCode2
+ description: CPLD's error reason is PSU1_PGOOD fail
+
+- name: ErrorCode3
+ description: CPLD's error reason is 240Va_Fault_A fail
+
+- name: ErrorCode4
+ description: CPLD's error reason is 240Va_Fault_B fail
+
+- name: ErrorCode5
+ description: CPLD's error reason is 240Va_Fault_C fail
+
+- name: ErrorCode6
+ description: CPLD's error reason is 240Va_Fault_D fail
+
+- name: ErrorCode7
+ description: CPLD's error reason is 240Va_Fault_E fail
+
+- name: ErrorCode8
+ description: CPLD's error reason is 240Va_Fault_F fail
+
+- name: ErrorCode9
+ description: CPLD's error reason is 240Va_Fault_G fail
+
+- name: ErrorCode10
+ description: CPLD's error reason is 240Va_Fault_H fail
+
+- name: ErrorCode11
+ description: CPLD's error reason is 240Va_Fault_J fail
+
+- name: ErrorCode12
+ description: CPLD's error reason is 240Va_Fault_K fail
+
+- name: ErrorCode13
+ description: CPLD's error reason is 240Va_Fault_L fail
+
+- name: ErrorCode14
+ description: CPLD's error reason is P5V_pgood fail
+
+- name: ErrorCode15
+ description: CPLD's error reason is P3V3_pgood fail
+
+- name: ErrorCode16
+ description: CPLD's error reason is P1V8_pgood fail
+
+- name: ErrorCode17
+ description: CPLD's error reason is P1V1_pgood fail
+
+- name: ErrorCode18
+ description: CPLD's error reason is P0V9_pgood fail
+
+- name: ErrorCode19
+ description: CPLD's error reason is P2V5A_pgood fail
+
+- name: ErrorCode20
+ description: CPLD's error reason is P2V5B_pgood fail
+
+- name: ErrorCode21
+ description: CPLD's error reason is Vdn0_pgood fail
+
+- name: ErrorCode22
+ description: CPLD's error reason is Vdn1_pgood fail
+
+- name: ErrorCode23
+ description: CPLD's error reason is P1V5_pgood fail
+
+- name: ErrorCode24
+ description: CPLD's error reason is Vio0_pgood fail
+
+- name: ErrorCode25
+ description: CPLD's error reason is Vio1_pgood fail
+
+- name: ErrorCode26
+ description: CPLD's error reason is Vdd0_pgood fail
+
+- name: ErrorCode27
+ description: CPLD's error reason is Vcs0_pgood fail
+
+- name: ErrorCode28
+ description: CPLD's error reason is Vdd1_pgood fail
+
+- name: ErrorCode29
+ description: CPLD's error reason is Vcs1_pgood fail
+
+- name: ErrorCode30
+ description: CPLD's error reason is Vddr0_pgood fail
+
+- name: ErrorCode31
+ description: CPLD's error reason is Vtt0_pgood fail
+
+- name: ErrorCode32
+ description: CPLD's error reason is Vddr1_pgood fail
+
+- name: ErrorCode33
+ description: CPLD's error reason is Vtt1_pgood fail
+
+- name: ErrorCode34
+ description: CPLD's error reason is GPU0_pgood fail
+
+- name: ErrorCode35
+ description: CPLD's error reason is GPU1_pgood fail
+
+- name: ErrorCode36
+ description: CPLD's error reason is PSU0&PSU1_pgood fail
+
- name: PowerSequencerVoltageFault
description: The power sequencer chip detected a voltage fault
diff --git a/org/open_power/Witherspoon/Fault.metadata.yaml b/org/open_power/Witherspoon/Fault.metadata.yaml
index c8bfab8..44ff969 100644
--- a/org/open_power/Witherspoon/Fault.metadata.yaml
+++ b/org/open_power/Witherspoon/Fault.metadata.yaml
@@ -52,6 +52,117 @@
- name: PowerOnFailure
level: ERR
+- name: ErrorCode0
+ level: ERR
+
+- name: ErrorCode1
+ level: ERR
+
+- name: ErrorCode2
+ level: ERR
+
+- name: ErrorCode3
+ level: ERR
+
+- name: ErrorCode4
+ level: ERR
+
+- name: ErrorCode5
+ level: ERR
+
+- name: ErrorCode6
+ level: ERR
+
+- name: ErrorCode7
+ level: ERR
+
+- name: ErrorCode8
+ level: ERR
+
+- name: ErrorCode9
+ level: ERR
+
+- name: ErrorCode10
+ level: ERR
+
+- name: ErrorCode11
+ level: ERR
+
+- name: ErrorCode12
+ level: ERR
+
+- name: ErrorCode13
+ level: ERR
+
+- name: ErrorCode14
+ level: ERR
+
+- name: ErrorCode15
+ level: ERR
+
+- name: ErrorCode16
+ level: ERR
+
+- name: ErrorCode17
+ level: ERR
+
+- name: ErrorCode18
+ level: ERR
+
+- name: ErrorCode19
+ level: ERR
+
+- name: ErrorCode20
+ level: ERR
+
+- name: ErrorCode21
+ level: ERR
+
+- name: ErrorCode22
+ level: ERR
+
+- name: ErrorCode23
+ level: ERR
+
+- name: ErrorCode24
+ level: ERR
+
+- name: ErrorCode25
+ level: ERR
+
+- name: ErrorCode26
+ level: ERR
+
+- name: ErrorCode27
+ level: ERR
+
+- name: ErrorCode28
+ level: ERR
+
+- name: ErrorCode29
+ level: ERR
+
+- name: ErrorCode30
+ level: ERR
+
+- name: ErrorCode31
+ level: ERR
+
+- name: ErrorCode32
+ level: ERR
+
+- name: ErrorCode33
+ level: ERR
+
+- name: ErrorCode34
+ level: ERR
+
+- name: ErrorCode35
+ level: ERR
+
+- name: ErrorCode36
+ level: ERR
+
- name: PowerSequencerVoltageFault
level: ERR
meta:
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;
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,
diff --git a/power-sequencer/mihawk-cpld.cpp b/power-sequencer/mihawk-cpld.cpp
new file mode 100644
index 0000000..3a65a66
--- /dev/null
+++ b/power-sequencer/mihawk-cpld.cpp
@@ -0,0 +1,496 @@
+#include "config.h"
+
+#include "mihawk-cpld.hpp"
+
+#include "gpio.hpp"
+#include "utility.hpp"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
+#include <elog-errors.hpp>
+#include <org/open_power/Witherspoon/Fault/error.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/Device/error.hpp>
+
+#include <chrono>
+#include <iostream>
+#include <map>
+#include <memory>
+#include <string>
+
+// i2c bus & i2c slave address of Mihawk's CPLD_register
+static constexpr uint8_t busId = 11;
+static constexpr uint8_t slaveAddr = 0x40;
+
+// SMLink Status Register(Interrupt-control-bit Register)
+static constexpr size_t StatusReg_1 = 0x20;
+
+// SMLink Status Register(Power-on error code Register)
+static constexpr size_t StatusReg_2 = 0x21;
+
+// SMLink Status Register(Power-ready error code Register)
+static constexpr size_t StatusReg_3 = 0x22;
+
+using namespace std;
+
+namespace phosphor
+{
+namespace power
+{
+const auto DEVICE_NAME = "MihawkCPLD"s;
+
+namespace fs = std::filesystem;
+using namespace phosphor::logging;
+
+using namespace sdbusplus::org::open_power::Witherspoon::Fault::Error;
+
+MihawkCPLD::MihawkCPLD(size_t instance, sdbusplus::bus::bus& bus) :
+ Device(DEVICE_NAME, instance), bus(bus)
+{
+}
+
+void MihawkCPLD::onFailure()
+{
+ bool poweronError = checkPoweronFault();
+
+ // If the interrupt of power_on_error is switch on,
+ // read CPLD_register error code to analyze
+ // and report the error log event.
+ if (poweronError)
+ {
+ ErrorCode code;
+ code = static_cast<ErrorCode>(readFromCPLDErrorCode(StatusReg_2));
+
+ switch (code)
+ {
+ case ErrorCode::_1:
+ report<ErrorCode1>();
+ break;
+ case ErrorCode::_2:
+ report<ErrorCode2>();
+ break;
+ case ErrorCode::_3:
+ report<ErrorCode3>();
+ break;
+ case ErrorCode::_4:
+ report<ErrorCode4>();
+ break;
+ case ErrorCode::_5:
+ report<ErrorCode5>();
+ break;
+ case ErrorCode::_6:
+ report<ErrorCode6>();
+ break;
+ case ErrorCode::_7:
+ report<ErrorCode7>();
+ break;
+ case ErrorCode::_8:
+ report<ErrorCode8>();
+ break;
+ case ErrorCode::_9:
+ report<ErrorCode9>();
+ break;
+ case ErrorCode::_10:
+ report<ErrorCode10>();
+ break;
+ case ErrorCode::_11:
+ report<ErrorCode11>();
+ break;
+ case ErrorCode::_12:
+ report<ErrorCode12>();
+ break;
+ case ErrorCode::_13:
+ report<ErrorCode13>();
+ break;
+ case ErrorCode::_14:
+ report<ErrorCode14>();
+ break;
+ case ErrorCode::_15:
+ report<ErrorCode15>();
+ break;
+ case ErrorCode::_16:
+ report<ErrorCode16>();
+ break;
+ case ErrorCode::_17:
+ report<ErrorCode17>();
+ break;
+ case ErrorCode::_18:
+ report<ErrorCode18>();
+ break;
+ case ErrorCode::_19:
+ report<ErrorCode19>();
+ break;
+ case ErrorCode::_20:
+ report<ErrorCode20>();
+ break;
+ case ErrorCode::_21:
+ report<ErrorCode21>();
+ break;
+ case ErrorCode::_22:
+ report<ErrorCode22>();
+ break;
+ case ErrorCode::_23:
+ report<ErrorCode23>();
+ break;
+ case ErrorCode::_24:
+ report<ErrorCode24>();
+ break;
+ case ErrorCode::_25:
+ report<ErrorCode25>();
+ break;
+ case ErrorCode::_26:
+ report<ErrorCode26>();
+ break;
+ case ErrorCode::_27:
+ report<ErrorCode27>();
+ break;
+ case ErrorCode::_28:
+ report<ErrorCode28>();
+ break;
+ case ErrorCode::_29:
+ report<ErrorCode29>();
+ break;
+ case ErrorCode::_30:
+ report<ErrorCode30>();
+ break;
+ case ErrorCode::_31:
+ report<ErrorCode31>();
+ break;
+ case ErrorCode::_32:
+ report<ErrorCode32>();
+ break;
+ case ErrorCode::_33:
+ report<ErrorCode33>();
+ break;
+ case ErrorCode::_34:
+ report<ErrorCode34>();
+ break;
+ case ErrorCode::_35:
+ report<ErrorCode35>();
+ break;
+ case ErrorCode::_36:
+ report<ErrorCode36>();
+ break;
+ default:
+ // If the errorcode isn't 1~36,
+ // it indicates that the CPLD register
+ // has a reading issue,
+ // so the errorcode0 error is reported.
+ report<ErrorCode0>();
+ break;
+ }
+ clearCPLDregister();
+ }
+}
+
+void MihawkCPLD::analyze()
+{
+ bool powerreadyError = checkPowerreadyFault();
+
+ // Use the function of GPIO class to check
+ // GPIOF0(CPLD uses).
+ using namespace phosphor::gpio;
+ GPIO gpio{"/dev/gpiochip0", static_cast<gpioNum_t>(40), Direction::input};
+
+ // Check GPIOFO pin whether is switched off.
+ // if GPIOF0 has been switched off,
+ // check CPLD's errorcode & report error.
+ if (gpio.read() == Value::low)
+ {
+ // If the interrupt of power_ready_error is switch on,
+ // read CPLD_register error code to analyze and
+ // report the error event.
+ if (powerreadyError)
+ {
+ ErrorCode code;
+ code = static_cast<ErrorCode>(readFromCPLDErrorCode(StatusReg_3));
+
+ if (!errorcodeMask)
+ {
+ // Check the errorcodeMask & errorcode whether
+ // are the same value to avoid to report the
+ // same error again.
+ switch (code)
+ {
+ case ErrorCode::_1:
+ report<ErrorCode1>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_2:
+ report<ErrorCode2>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_3:
+ report<ErrorCode3>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_4:
+ report<ErrorCode4>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_5:
+ report<ErrorCode5>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_6:
+ report<ErrorCode6>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_7:
+ report<ErrorCode7>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_8:
+ report<ErrorCode8>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_9:
+ report<ErrorCode9>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_10:
+ report<ErrorCode10>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_11:
+ report<ErrorCode11>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_12:
+ report<ErrorCode12>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_13:
+ report<ErrorCode13>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_14:
+ report<ErrorCode14>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_15:
+ report<ErrorCode15>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_16:
+ report<ErrorCode16>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_17:
+ report<ErrorCode17>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_18:
+ report<ErrorCode18>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_19:
+ report<ErrorCode19>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_20:
+ report<ErrorCode20>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_21:
+ report<ErrorCode21>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_22:
+ report<ErrorCode22>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_23:
+ report<ErrorCode23>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_24:
+ report<ErrorCode24>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_25:
+ report<ErrorCode25>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_26:
+ report<ErrorCode26>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_27:
+ report<ErrorCode27>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_28:
+ report<ErrorCode28>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_29:
+ report<ErrorCode29>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_30:
+ report<ErrorCode30>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_31:
+ report<ErrorCode31>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_32:
+ report<ErrorCode32>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_33:
+ report<ErrorCode33>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_34:
+ report<ErrorCode34>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_35:
+ report<ErrorCode35>();
+ errorcodeMask = 1;
+ break;
+ case ErrorCode::_36:
+ report<ErrorCode36>();
+ errorcodeMask = 1;
+ break;
+ default:
+ // If the errorcode is not 1~36,
+ // it indicates that the CPLD register
+ // has a reading issue, so the
+ // errorcode0 error is reported.
+ report<ErrorCode0>();
+ errorcodeMask = 1;
+ break;
+ }
+ clearCPLDregister();
+ }
+ }
+ }
+
+ if (gpio.read() == Value::high)
+ {
+ // If there isn't an error(GPIOF0
+ // which CPLD uses is switched on),
+ // we clear errorcodeMask.
+ errorcodeMask = 0;
+ }
+}
+
+// Check for PoweronFault
+bool MihawkCPLD::checkPoweronFault()
+{
+ uint16_t statusValue_1;
+ bool result;
+
+ if (!i2c)
+ {
+ openCPLDDevice();
+ }
+ i2c->read(StatusReg_1, statusValue_1);
+
+ if (statusValue_1 < 0)
+ {
+ std::cerr << "i2c->read() reads data failed \n";
+ result = 0;
+ }
+
+ if ((statusValue_1 >> 5) & 1)
+ {
+ // If power_on-interrupt-bit is read as 1,
+ // switch on the flag.
+ result = 1;
+ }
+ else
+ {
+ result = 0;
+ }
+
+ // Return the flag.
+ return result;
+}
+
+// Read CPLD_register error code and return the result to analyze.
+int MihawkCPLD::readFromCPLDErrorCode(int statusReg)
+{
+ uint16_t statusValue_2;
+
+ if (!i2c)
+ {
+ openCPLDDevice();
+ }
+ i2c->read(statusReg, statusValue_2);
+
+ if (statusValue_2 < 0 ||
+ ((statusValue_2 > static_cast<int>(ErrorCode::_35)) &&
+ (statusValue_2 != static_cast<int>(ErrorCode::_36))))
+ {
+ statusValue_2 = 0;
+ }
+
+ // Return the data via i2c->read().
+ return statusValue_2;
+}
+
+// Check for PowerreadyFault
+bool MihawkCPLD::checkPowerreadyFault()
+{
+ uint16_t statusValue_3;
+ bool result;
+
+ if (!i2c)
+ {
+ openCPLDDevice();
+ }
+ i2c->read(StatusReg_1, statusValue_3);
+
+ if (statusValue_3 < 0)
+ {
+ std::cerr << "i2c->read() reads data failed \n";
+ result = 0;
+ }
+
+ if ((statusValue_3 >> 6) & 1)
+ {
+ // If power_ready-interrupt-bit is read as 1,
+ // switch on the flag.
+ result = 1;
+ }
+ else
+ {
+ result = 0;
+ }
+
+ // Return the flag.
+ return result;
+}
+
+// Clear CPLD_register after reading.
+void MihawkCPLD::clearCPLDregister()
+{
+ uint16_t data = 0x01;
+
+ if (!i2c)
+ {
+ openCPLDDevice();
+ }
+
+ // Write 0x01 to StatusReg_1 for clearing
+ // CPLD_register.
+ i2c->write(StatusReg_1, data);
+}
+
+// Open i2c device(CPLD_register)
+void MihawkCPLD::openCPLDDevice()
+{
+ i2c = i2c::create(busId, slaveAddr);
+}
+
+} // namespace power
+} // namespace phosphor
diff --git a/power-sequencer/mihawk-cpld.hpp b/power-sequencer/mihawk-cpld.hpp
new file mode 100644
index 0000000..4e0858e
--- /dev/null
+++ b/power-sequencer/mihawk-cpld.hpp
@@ -0,0 +1,355 @@
+#pragma once
+
+#include "device.hpp"
+#include "pmbus.hpp"
+#include "tools/i2c/i2c_interface.hpp"
+
+#include <sdbusplus/bus.hpp>
+
+#include <algorithm>
+#include <filesystem>
+
+namespace phosphor
+{
+namespace power
+{
+
+/**
+ * @class MihawkCPLD
+ *
+ * This class implements fault analysis for Mihawk's CPLD
+ * power sequencer device.
+ *
+ */
+class MihawkCPLD : public Device
+{
+ public:
+ MihawkCPLD() = delete;
+ ~MihawkCPLD() = default;
+ MihawkCPLD(const MihawkCPLD&) = delete;
+ MihawkCPLD& operator=(const MihawkCPLD&) = delete;
+ MihawkCPLD(MihawkCPLD&&) = default;
+ MihawkCPLD& operator=(MihawkCPLD&&) = default;
+
+ /**
+ * Constructor
+ *
+ * @param[in] instance - the device instance number
+ * @param[in] bus - D-Bus bus object
+ */
+ MihawkCPLD(size_t instance, sdbusplus::bus::bus& bus);
+
+ /**
+ * Analyzes the device for errors when the device is
+ * known to be in an error state. A log will be created.
+ */
+ void onFailure() override;
+
+ /**
+ * Checks the device for errors and only creates a log
+ * if one is found.
+ */
+ void analyze() override;
+
+ /**
+ * Clears faults in the device
+ */
+ void clearFaults() override
+ {
+ }
+
+ private:
+ /**
+ * If checkPoweronFault() or checkPowerreadyFault()
+ * returns "true", use readFromCPLDErrorCode()
+ * to read CPLD-error-code-register
+ * to analyze the fail reason.
+ *
+ * @param[in] statusReg - I2C's statusReg, slaveAddr
+ * offset.
+ * ex.Mihawk's CPLD-register is on slaveAddr ox40 of
+ * i2c-11, but poweron_errcode-register is on slaveAddr
+ * offset 0x21, power_ready-errorcode-register is on
+ * slaveAddr offset 0x22.
+ *
+ * @return int - the error-code value which is read on
+ * CPLD-error-code-register.
+ */
+ int readFromCPLDErrorCode(int statusReg);
+
+ /**
+ * Checks for PoweronFault on Mihawk's
+ * CPLD-power_on-error-interrupt-bit-register
+ * whether is transfered to "1".
+ *
+ * @return bool - true if power_on fail.
+ */
+ bool checkPoweronFault();
+
+ /**
+ * Clear CPLD intrupt record after reading CPLD_register.
+ */
+ void clearCPLDregister();
+
+ /**
+ * Check for PowerreadyFault on Mihawk's
+ * CPLD-power_ready-error-interrupt-bit-register
+ * whether is transfered to "1".
+ *
+ * @return bool - true if power_ready fail.
+ */
+ bool checkPowerreadyFault();
+
+ /**
+ * Use I2CInterface to read & write CPLD_register.
+ */
+ std::unique_ptr<i2c::I2CInterface> i2c;
+
+ /**
+ * The D-Bus bus object
+ */
+ sdbusplus::bus::bus& bus;
+
+ /**
+ * Open CPLD_register via i2c.
+ */
+ void openCPLDDevice();
+
+ /**
+ * The parameter which is checked CPLD's the same error
+ * whether is created again.
+ */
+ bool errorcodeMask;
+
+ enum class ErrorCode : int
+ {
+ /**
+ * All of powerOnErrorcode are the definition of error-code
+ * which are read on CPLD-error-code-register.
+ */
+ /**
+ * The definition of error-code:
+ * Read CPLD-error-code-register fail.
+ */
+ _0 = 0,
+
+ /**
+ * The definition of error-code:
+ * PSU0_PGOOD fail.
+ */
+ _1 = 1,
+
+ /**
+ * The definition of error-code:
+ * PSU1_PGOOD fail.
+ */
+ _2 = 2,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_A fail.
+ */
+ _3 = 3,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_B fail.
+ */
+ _4 = 4,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_C fail.
+ */
+ _5 = 5,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_D fail.
+ */
+ _6 = 6,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_E fail.
+ */
+ _7 = 7,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_F fail.
+ */
+ _8 = 8,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_G fail.
+ */
+ _9 = 9,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_H fail.
+ */
+ _10 = 10,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_J fail.
+ */
+ _11 = 11,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_K fail.
+ */
+ _12 = 12,
+
+ /**
+ * The definition of error-code:
+ * 240Va_Fault_L fail.
+ */
+ _13 = 13,
+
+ /**
+ * The definition of error-code:
+ * P5V_PGOOD fail.
+ */
+ _14 = 14,
+
+ /**
+ * The definition of error-code:
+ * P3V3_PGOOD fail.
+ */
+ _15 = 15,
+
+ /**
+ * The definition of error-code:
+ * P1V8_PGOOD fail.
+ */
+ _16 = 16,
+
+ /**
+ * The definition of error-code:
+ * P1V1_PGOOD fail.
+ */
+ _17 = 17,
+
+ /**
+ * The definition of error-code:
+ * P0V9_PGOOD fail.
+ */
+ _18 = 18,
+
+ /**
+ * The definition of error-code:
+ * P2V5A_PGOOD fail.
+ */
+ _19 = 19,
+
+ /**
+ * The definition of error-code:
+ * P2V5B_PGOOD fail.
+ */
+ _20 = 20,
+
+ /**
+ * The definition of error-code:
+ * Vdn0_PGOOD fail.
+ */
+ _21 = 21,
+
+ /**
+ * The definition of error-code:
+ * Vdn1_PGOOD fail.
+ */
+ _22 = 22,
+
+ /**
+ * The definition of error-code:
+ * P1V5_PGOOD fail.
+ */
+ _23 = 23,
+
+ /**
+ * The definition of error-code:
+ * Vio0_PGOOD fail.
+ */
+ _24 = 24,
+
+ /**
+ * The definition of error-code:
+ * Vio1_PGOOD fail.
+ */
+ _25 = 25,
+
+ /**
+ * The definition of error-code:
+ * Vdd0_PGOOD fail.
+ */
+ _26 = 26,
+
+ /**
+ * The definition of error-code:
+ * Vcs0_PGOOD fail.
+ */
+ _27 = 27,
+
+ /**
+ * The definition of error-code:
+ * Vdd1_PGOOD fail.
+ */
+ _28 = 28,
+
+ /**
+ * The definition of error-code:
+ * Vcs1_PGOOD fail.
+ */
+ _29 = 29,
+
+ /**
+ * The definition of error-code:
+ * Vddr0_PGOOD fail.
+ */
+ _30 = 30,
+
+ /**
+ * The definition of error-code:
+ * Vtt0_PGOOD fail.
+ */
+ _31 = 31,
+
+ /**
+ * The definition of error-code:
+ * Vddr1_PGOOD fail.
+ */
+ _32 = 32,
+
+ /**
+ * The definition of error-code:
+ * Vtt1_PGOOD fail.
+ */
+ _33 = 33,
+
+ /**
+ * The definition of error-code:
+ * GPU0_PGOOD fail.
+ */
+ _34 = 34,
+
+ /**
+ * The definition of error-code:
+ * GPU1_PGOOD fail.
+ */
+ _35 = 35,
+
+ /**
+ * The definition of error-code:
+ * PSU0PSU1_PGOOD fail.
+ */
+ _36 = 170
+ };
+};
+
+} // namespace power
+} // namespace phosphor
diff --git a/power-sequencer/pgood_monitor.cpp b/power-sequencer/pgood_monitor.cpp
index c208c0a..3c74fdb 100644
--- a/power-sequencer/pgood_monitor.cpp
+++ b/power-sequencer/pgood_monitor.cpp
@@ -67,7 +67,7 @@
if (pgoodPending())
{
-#ifdef UCD90160_DEVICE_ACCESS
+#ifdef DEVICE_ACCESS
device->onFailure();
#endif
report<PowerOnFailure>();
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index 9dd4550..f706655 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -33,7 +33,7 @@
int RuntimeMonitor::run()
{
-#ifdef UCD90160_DEVICE_ACCESS
+#ifdef DEVICE_ACCESS
return DeviceMonitor::run();
#else
return EXIT_SUCCESS;
@@ -48,7 +48,7 @@
{
timer.setEnabled(false);
-#ifdef UCD90160_DEVICE_ACCESS
+#ifdef DEVICE_ACCESS
device->onFailure();
#endif
// Note: This application only runs when the system has