power-sequencer: make pgood timeout configurable
The IBM system1 utilizes a FPGA to power on and off the chassis. This
FPGA can take up to 10 seconds to power on and on occasion it hits the
default 10s timeout, causing an error log to be logged.
Make the pgood timeout configurable so systems can override the timeout
if needed.
Tested:
- Confirmed by default config.h had 10 for the PGOOD_TIMEOUT
- Confirmed when overrode to 30 in a bbappend that it changed to 30
within the config.h
Change-Id: I31ef65ee9f331c4690d68789e435241539804221
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/phosphor-power-sequencer/src/power_control.hpp b/phosphor-power-sequencer/src/power_control.hpp
index d6f17d2..7bc2cd5 100644
--- a/phosphor-power-sequencer/src/power_control.hpp
+++ b/phosphor-power-sequencer/src/power_control.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "config.h"
+
#include "compatible_system_types_finder.hpp"
#include "device_finder.hpp"
#include "power_interface.hpp"
@@ -151,7 +153,7 @@
/**
* Power good timeout constant
*/
- static constexpr std::chrono::seconds pgoodTimeout{10};
+ static constexpr std::chrono::seconds pgoodTimeout{PGOOD_TIMEOUT};
/**
* Point in time at which power good timeout will take place