Add Bus class to reset OCC bus driver

For some systems, the OCC is accessed over the SBEFIFO, acting as a bus.
If the SBE experiences a failure, the SBEFIFO driver is unable to
recover. Therefore, the OCC control application  must force a reset of
the SBEFIFO driver when the OCC goes active.

Add a Bus class and reset method to unbind and bind the appropriate
SBEFIFO devices when the OCC devices are bound.

Testing: Powered on the system successfully. Injected SBE error through
a putscom. Without this fix, I intermittently saw SBEFIFO errors on the
BMC after the injection. With the fix, I saw no errors despite ~20
iterations.

Resolves openbmc/openbmc#3156

Change-Id: I0f9a230c57d0a3a7b59a874f62cdb1d93c6dcdfb
Signed-off-by: Eddie James <eajames@us.ibm.com>
diff --git a/occ_bus.cpp b/occ_bus.cpp
new file mode 100644
index 0000000..27be21b
--- /dev/null
+++ b/occ_bus.cpp
@@ -0,0 +1,21 @@
+#include "occ_device.hpp"
+#include "occ_bus.hpp"
+
+namespace open_power
+{
+namespace occ
+{
+
+fs::path Bus::bindPath = fs::path(OCC_BUS_PATH) / "bind";
+fs::path Bus::unBindPath = fs::path(OCC_BUS_PATH) / "unbind";
+
+void Bus::reset() const
+{
+#ifndef I2C_OCC
+    Device::write(unBindPath, config);
+    Device::write(bindPath, config);
+#endif
+}
+
+} // namespace occ
+} // namespace open_power