PartitionTableUpdate: ignore retry count if mainline support is enabled

We don't have a working userspace bootctrl HAL for mainline yet, so
after 7 boots fastboot would assume the slot is unbootable and switch to
the other one.

Ignore the retry count so we don't have to deal with this.

Change-Id: I8c8ee261e122bd85c949ef7b08d4fd41fea68855
Co-developed-by: Caleb Connolly <caleb@connolly.tech>
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c b/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c
index fd5a837..9d37e94 100755
--- a/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c
+++ b/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c
@@ -28,6 +28,7 @@
  */
 #include "PartitionTableUpdate.h"
 #include "AutoGen.h"
+#include <DeviceInfo.h>
 #include <Library/Board.h>
 #include <Library/BootLinux.h>
 #include <Library/LinuxLoaderLib.h>
@@ -1632,7 +1633,10 @@
       (BootEntry->PartEntry.Attributes & PART_ATT_MAX_RETRY_COUNT_VAL) >>
       PART_ATT_MAX_RETRY_CNT_BIT;
 
-  if (Unbootable == 0 && BootSuccess == 1) {
+  if (IsMainlineSupportEnabled ()) {
+    DEBUG ((EFI_D_VERBOSE, "Mainline support is enabled, not checking, "
+                           "if slot %s is bootable\n", BootableSlot->Suffix));
+  } else if (Unbootable == 0 && BootSuccess == 1) {
     DEBUG (
         (EFI_D_VERBOSE, "Active Slot %s is bootable\n", BootableSlot->Suffix));
   } else if (Unbootable == 0 && BootSuccess == 0 && RetryCount > 0) {