Add method to turn off UCD90160 hardware accesses

As the fault monitoring functionality is going in toward
the end of a release, a flag is being provided to quickly
turn off the hardware accesses while still leaving the
ability to create general errors on PGOOD fails, as
well as issuing a shutdown on a runtime PGOOD fail.

This is meant to used if it turns out there are problems
with the hardware that end up taking a lot of time to debug.

The flag is --enable-turn-off-ucd90160-access.

Change-Id: I03f0ab5dc4010bf20ef2871f2e737ce310b4398f
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/configure.ac b/configure.ac
index 28719bd..cb986cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,18 @@
 # Checks for library functions.
 LT_INIT # Required for systemd linking
 
+AC_ARG_ENABLE([turn-off-ucd90160-access],
+    AS_HELP_STRING([--enable-turn-off-ucd90160-access], [Turn off UCD90160 hardware access])
+)
+
+AC_ARG_VAR(UCD90160_DEVICE_ACCESS, [Turn off UCD90160 hardware access])
+
+# Always define UCD90160_DEVICE_ACCESS unless explicitly turned off
+AS_IF([test "x$enable_turn_off_ucd90160_access" != "xyes"],
+      [UCD90160_DEVICE_ACCESS="yes"]
+      AC_DEFINE_UNQUOTED([UCD90160_DEVICE_ACCESS], ["$UCD90160_DEVICE_ACCESS"], [Turn off UCD90160 hardware access])
+)
+
 # Create configured output
 AC_CONFIG_FILES([Makefile power-sequencer/Makefile])
 AC_OUTPUT