summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-05-22 14:46:34 -0500
committerAndrew Geissler <andrewg@us.ibm.com>2017-05-22 14:46:34 -0500
commit9070d1b8bdcc61d0cc84e7754adb52323ce364fb (patch)
tree693822a1e31d0e0cfbd1cdf62623e81a73c03a2d
parent0a3eeb8f2728294ccae8ea0f20b31d643ee93a4e (diff)
downloadpyphosphor-9070d1b8bdcc61d0cc84e7754adb52323ce364fb.tar.gz
pyphosphor-9070d1b8bdcc61d0cc84e7754adb52323ce364fb.zip
Increase boot count for SBE side switch
The host gets one additional boot try when switching over to the alternate SBE seeprom side Change-Id: Ia692fffdb6720a1b80d9cf2c9cdc279acf84efe5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
-rw-r--r--obmc/sensors.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/obmc/sensors.py b/obmc/sensors.py
index f34c711..8e21a6e 100644
--- a/obmc/sensors.py
+++ b/obmc/sensors.py
@@ -272,7 +272,16 @@ class OccStatusSensor(VirtualSensor):
class BootCountSensor(VirtualSensor):
def __init__(self, bus, name):
VirtualSensor.__init__(self, bus, name)
- self.setValue(2)
+ # Default boot count is 2. Add 1 onto this to allow for an
+ # SBE side switch boot attempt
+ self.setValue(3)
+
+ ## override setValue method for debug purposes
+ @dbus.service.method(
+ SensorValue.IFACE_NAME, in_signature='v', out_signature='')
+ def setValue(self, value):
+ print "Setting boot count to " + str(value)
+ SensorValue.setValue(self,value)
class OperatingSystemStatusSensor(VirtualSensor):
OpenPOWER on IntegriCloud