Platform: Fix CC312 enabled build without BL2

Enabling CC312 is not required to have BL2 support
turned on.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I896182bbdc9e13a371ae8769f23d7d20706b8f55
diff --git a/platform/ext/common/cc312/cc312.c b/platform/ext/common/cc312/cc312.c
index 29fe268..503110f9 100644
--- a/platform/ext/common/cc312/cc312.c
+++ b/platform/ext/common/cc312/cc312.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -204,6 +204,7 @@
     return 0;
 }
 
+#ifdef BL2
 int crypto_hw_accelerator_get_rotpk_hash(uint8_t image_id,
                                          uint8_t *rotpk_hash,
                                          uint32_t *rotpk_hash_size)
@@ -240,3 +241,4 @@
 
     return 0;
 }
+#endif  /* BL2 */