Add CPLD recovery image support

Support added to expose the CPLD recovery image
inventory details.

Tested:
Verified that CPLD recovery inventory object is
exposed in Redfish Software inventory query.

Change-Id: Ifd92e31f7c940647c7cb2cfb353ec58220032545
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
diff --git a/libpfr/inc/pfr.hpp b/libpfr/inc/pfr.hpp
index 542cb51..8bf3082 100644
--- a/libpfr/inc/pfr.hpp
+++ b/libpfr/inc/pfr.hpp
@@ -24,7 +24,8 @@
 
 enum class ImageType
 {
-    cpld,
+    cpldActive,
+    cpldRecovery,
     biosActive,
     biosRecovery,
     bmcActive,
diff --git a/libpfr/src/pfr.cpp b/libpfr/src/pfr.cpp
index 5e43d48..a5316ba 100644
--- a/libpfr/src/pfr.cpp
+++ b/libpfr/src/pfr.cpp
@@ -155,8 +155,10 @@
 {
     switch (imgType)
     {
-        case (ImageType::cpld):
+        case (ImageType::cpldActive):
+        case (ImageType::cpldRecovery):
         {
+            // TO-DO: Need to update once CPLD supported Firmware is available
             return readVersionFromCPLD(cpldROTVersion, cpldROTSvn);
         }
         case (ImageType::biosActive):
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index 761b25e..c92a5d0 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -50,7 +50,11 @@
                         versionPurposeHost),
         std::make_tuple("bios_recovery", ImageType::biosRecovery,
                         versionPurposeHost),
-        std::make_tuple("cpld", ImageType::cpld, versionPurposeOther)};
+        std::make_tuple("cpld_active", ImageType::cpldActive,
+                        versionPurposeOther),
+        std::make_tuple("cpld_recovery", ImageType::cpldRecovery,
+                        versionPurposeOther),
+};
 
 // Recovery reason map.
 // {<CPLD association>,{<Redfish MessageID>, <Recovery Reason>}}
diff --git a/service/src/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index 318abe2..ed97fd2 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -61,7 +61,8 @@
      * "RequestedActivation" to None. */
     std::string activation =
         (imgType == ImageType::bmcRecovery ||
-         imgType == ImageType::biosRecovery)
+         imgType == ImageType::biosRecovery ||
+         imgType == ImageType::cpldRecovery)
             ? "xyz.openbmc_project.Software.Activation.Activations.StandbySpare"
             : "xyz.openbmc_project.Software.Activation.Activations.Active";
     std::string reqActNone =