Fix order of #includes

This fix modifies the order of system includes to meet the ARM TF coding
standard. There are some exceptions in order to retain header groupings,
minimise changes to imported headers, and where there are headers within
the #if and #ifndef statements.

Change-Id: I65085a142ba6a83792b26efb47df1329153f1624
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
diff --git a/include/drivers/arm/cryptocell/cc_pal_types_plat.h b/include/drivers/arm/cryptocell/cc_pal_types_plat.h
index d8ed3e1..8410024 100644
--- a/include/drivers/arm/cryptocell/cc_pal_types_plat.h
+++ b/include/drivers/arm/cryptocell/cc_pal_types_plat.h
@@ -11,8 +11,8 @@
 #define _CC_PAL_TYPES_PLAT_H
 /* Host specific types for standard (ISO-C99) compilant platforms */
 
-#include <stdint.h>
 #include <stddef.h>
+#include <stdint.h>
 
 typedef uint32_t CCStatus;
 
diff --git a/include/drivers/arm/cryptocell/nvm.h b/include/drivers/arm/cryptocell/nvm.h
index f806d3d..a70289f 100644
--- a/include/drivers/arm/cryptocell/nvm.h
+++ b/include/drivers/arm/cryptocell/nvm.h
@@ -13,8 +13,8 @@
 #endif
 
 #include "cc_crypto_boot_defs.h"
-#include "cc_sec_defs.h"
 #include "cc_pal_types.h"
+#include "cc_sec_defs.h"
 
 /*------------------------------------
     DEFINES
diff --git a/include/drivers/auth/mbedtls/mbedtls_config.h b/include/drivers/auth/mbedtls/mbedtls_config.h
index 0a05886..fdeb52b 100644
--- a/include/drivers/auth/mbedtls/mbedtls_config.h
+++ b/include/drivers/auth/mbedtls/mbedtls_config.h
@@ -69,12 +69,12 @@
 #define MBEDTLS_MPI_WINDOW_SIZE              2
 #define MBEDTLS_MPI_MAX_SIZE               256
 
+/* System headers required to build mbed TLS with the current configuration */
+#include <stdlib.h>
+
 /* Memory buffer allocator options */
 #define MBEDTLS_MEMORY_ALIGN_MULTIPLE        8
 
 #include "mbedtls/check_config.h"
 
-/* System headers required to build mbed TLS with the current configuration */
-#include <stdlib.h>
-
 #endif /* __MBEDTLS_CONFIG_H__ */