Remove MBEDTLS_GCM_ALT

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h
index 4528899..a318523 100644
--- a/include/mbedtls/mbedtls_config.h
+++ b/include/mbedtls/mbedtls_config.h
@@ -354,7 +354,6 @@
 //#define MBEDTLS_CAMELLIA_ALT
 //#define MBEDTLS_CMAC_ALT
 //#define MBEDTLS_DES_ALT
-//#define MBEDTLS_GCM_ALT
 //#define MBEDTLS_NIST_KW_ALT
 //#define MBEDTLS_MD5_ALT
 //#define MBEDTLS_RIPEMD160_ALT
diff --git a/tests/include/alt-dummy/gcm_alt.h b/tests/include/alt-dummy/gcm_alt.h
deleted file mode 100644
index cfa73d2..0000000
--- a/tests/include/alt-dummy/gcm_alt.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* gcm_alt.h with dummy types for MBEDTLS_GCM_ALT */
-/*
- *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
- */
-
-#ifndef GCM_ALT_H
-#define GCM_ALT_H
-
-typedef struct mbedtls_gcm_context {
-    int dummy;
-}
-mbedtls_gcm_context;
-
-
-#endif /* gcm_alt.h */
diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h
index 5bab8e4..062beaf 100644
--- a/tests/include/test/psa_crypto_helpers.h
+++ b/tests/include/test/psa_crypto_helpers.h
@@ -293,8 +293,7 @@
  *  \param  alg             The AEAD algorithm.
  *  \param  nonce_length    The nonce length in number of bytes.
  */
-#if defined(MBEDTLS_GCM_ALT) || \
-    defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
+#if defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
 #define MBEDTLS_TEST_HAVE_ALT_GCM  1
 #else
 #define MBEDTLS_TEST_HAVE_ALT_GCM  0
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/gcm.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/gcm.h
index 98faa43..72632fa 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/gcm.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/gcm.h
@@ -44,8 +44,6 @@
 extern "C" {
 #endif
 
-#if !defined(MBEDTLS_GCM_ALT)
-
 #if defined(MBEDTLS_GCM_LARGE_TABLE)
 #define MBEDTLS_GCM_HTABLE_SIZE 256
 #else
@@ -74,10 +72,6 @@
 }
 mbedtls_gcm_context;
 
-#else  /* !MBEDTLS_GCM_ALT */
-#include "gcm_alt.h"
-#endif /* !MBEDTLS_GCM_ALT */
-
 /**
  * \brief           This function initializes the specified GCM context,
  *                  to make references valid, and prepares the context
diff --git a/tf-psa-crypto/drivers/builtin/src/gcm.c b/tf-psa-crypto/drivers/builtin/src/gcm.c
index bf21943..dda1ff2 100644
--- a/tf-psa-crypto/drivers/builtin/src/gcm.c
+++ b/tf-psa-crypto/drivers/builtin/src/gcm.c
@@ -39,8 +39,6 @@
 #include "aesce.h"
 #endif
 
-#if !defined(MBEDTLS_GCM_ALT)
-
 /* Used to select the acceleration mechanism */
 #define MBEDTLS_GCM_ACC_SMALLTABLE  0
 #define MBEDTLS_GCM_ACC_LARGETABLE  1
@@ -780,8 +778,6 @@
     mbedtls_platform_zeroize(ctx, sizeof(mbedtls_gcm_context));
 }
 
-#endif /* !MBEDTLS_GCM_ALT */
-
 #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_CCM_GCM_CAN_AES)
 /*
  * AES-GCM test vectors from:
@@ -1024,9 +1020,6 @@
     size_t olen;
 
     if (verbose != 0) {
-#if defined(MBEDTLS_GCM_ALT)
-        mbedtls_printf("  GCM note: alternative implementation.\n");
-#else /* MBEDTLS_GCM_ALT */
 #if defined(MBEDTLS_AESNI_HAVE_CODE)
         if (mbedtls_aesni_has_support(MBEDTLS_AESNI_CLMUL)) {
             mbedtls_printf("  GCM note: using AESNI.\n");
@@ -1040,7 +1033,6 @@
 #endif
 
         mbedtls_printf("  GCM note: built-in implementation.\n");
-#endif /* MBEDTLS_GCM_ALT */
     }
 
     static const int loop_limit =
@@ -1080,14 +1072,6 @@
                                             add_len_test_data[i],
                                             pt_test_data[pt_index_test_data[i]],
                                             buf, 16, tag_buf);
-#if defined(MBEDTLS_GCM_ALT)
-            /* Allow alternative implementations to only support 12-byte nonces. */
-            if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED &&
-                iv_len_test_data[i] != 12) {
-                mbedtls_printf("skipped\n");
-                break;
-            }
-#endif /* defined(MBEDTLS_GCM_ALT) */
             if (ret != 0) {
                 goto exit;
             }