Allow delete functional PNOR if only 1 PNOR is allowed

When a system only supports 1 PNOR (e.g. 64MiB chip), it shall define
ACTIVE_PNOR_MAX_ALLOWED to 1.
In this case, the PNOR code update shall delete the exising functional
PNOR to free the space for the new PNOR, otherwise there will be not
enough space for the new PNOR, and the code update will fail.

So change the logic in freeSpace() to allow delete functional PNOR if
ACTIVE_PNOR_MAX_ALLOWED is defined to 1.

Tested: Enable openpower-ubi on Romulus and verify PNOR code update
        succeeds.

Change-Id: Ib46c8a542d6baf02b60c3453686d7fe831468e6e
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index fcb7aca..f920661 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -536,8 +536,10 @@
         {
             count++;
             // Don't put the functional version on the queue since we can't
-            // remove the "running" PNOR version.
-            if (isVersionFunctional(iter.second->versionId))
+            // remove the "running" PNOR version if it allows multiple PNORs
+            // But removing functional version if there is only one PNOR.
+            if (ACTIVE_PNOR_MAX_ALLOWED > 1 &&
+                isVersionFunctional(iter.second->versionId))
             {
                 continue;
             }