Build: Fix CC312 init skip issue on Musca-B1/S1

Accidentally the initialization of CC312 crypto accelerator
was skipped on Musca boards. Therefore at execution the
CPU stuck in an infinite loop.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I29e8c8b1ace300a7d44efb1dcd1ffe86e1becb21
diff --git a/bl2/ext/mcuboot/bl2_main.c b/bl2/ext/mcuboot/bl2_main.c
index fcaab36..d0f1577 100644
--- a/bl2/ext/mcuboot/bl2_main.c
+++ b/bl2/ext/mcuboot/bl2_main.c
@@ -96,6 +96,7 @@
 
     /* Perform platform specific initialization */
     if (boot_platform_init() != 0) {
+        BOOT_LOG_ERR("Platform init failed");
         while (1)
             ;
     }
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt
index 77ef0e4..701f719 100644
--- a/platform/CMakeLists.txt
+++ b/platform/CMakeLists.txt
@@ -34,7 +34,7 @@
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/common>
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/driver>
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/cmsis>
-        $<$<BOOL:${CRYPTO_HW_ACCELERATOR}>:${CMAKE_CURRENT_SOURCE_DIR}/ext/accelerators/interface>
+        $<$<BOOL:${CRYPTO_HW_ACCELERATOR}>:${CMAKE_CURRENT_SOURCE_DIR}/ext/accelerator/interface>
 )
 
 target_sources(platform_s
@@ -97,7 +97,7 @@
             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/driver>
             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/common>
             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext>
-            $<$<BOOL:${CRYPTO_HW_ACCELERATOR}>:${CMAKE_CURRENT_SOURCE_DIR}/ext/accelerators/interface>
+            $<$<BOOL:${CRYPTO_HW_ACCELERATOR}>:${CMAKE_CURRENT_SOURCE_DIR}/ext/accelerator/interface>
     )
 
     target_sources(platform_bl2
diff --git a/platform/ext/accelerator/cc312/CMakeLists.txt b/platform/ext/accelerator/cc312/CMakeLists.txt
index a947a6d..ab71bd5 100644
--- a/platform/ext/accelerator/cc312/CMakeLists.txt
+++ b/platform/ext/accelerator/cc312/CMakeLists.txt
@@ -16,6 +16,7 @@
 target_compile_definitions(platform_bl2
     PRIVATE
         $<$<STREQUAL:${CRYPTO_HW_ACCELERATOR_OTP_STATE},ENABLED>:CRYPTO_HW_ACCELERATOR_OTP_ENABLED>
+        CRYPTO_HW_ACCELERATOR
 )
 
 ################################ BL2 ###########################################
diff --git a/platform/ext/target/musca_b1/boot_hal.c b/platform/ext/target/musca_b1/boot_hal.c
index 1956bec..de99b34 100644
--- a/platform/ext/target/musca_b1/boot_hal.c
+++ b/platform/ext/target/musca_b1/boot_hal.c
@@ -5,6 +5,7 @@
  *
  */
 
+#include <stdio.h>
 #include "cmsis.h"
 #include "region.h"
 #include "target_cfg.h"
@@ -60,7 +61,6 @@
 #ifdef CRYPTO_HW_ACCELERATOR
     result = crypto_hw_accelerator_init();
     if (result) {
-        BOOT_LOG_ERR("Error while initializing cryptographic accelerator.");
         return 1;
     }
 #endif /* CRYPTO_HW_ACCELERATOR */
@@ -70,13 +70,13 @@
  * this is usually done on the factory floor during chip manufacturing.
  */
 #ifdef CRYPTO_HW_ACCELERATOR_OTP_PROVISIONING
-    BOOT_LOG_INF("OTP provisioning started.");
+    printf("OTP provisioning started.\r\n");
     result = crypto_hw_accelerator_otp_provisioning();
     if (result) {
-        BOOT_LOG_ERR("OTP provisioning FAILED: 0x%X", result);
+        printf("OTP provisioning FAILED: 0x%X"\r\n, result);
         return 1;
     } else {
-        BOOT_LOG_INF("OTP provisioning succeeded. TF-M won't be loaded.");
+        printf("OTP provisioning succeeded. TF-M won't be loaded.\r\n");
 
         /* We don't need to boot - the only aim is provisioning. */
         while (1);
diff --git a/platform/ext/target/musca_s1/boot_hal.c b/platform/ext/target/musca_s1/boot_hal.c
index 1956bec..4b600d4 100644
--- a/platform/ext/target/musca_s1/boot_hal.c
+++ b/platform/ext/target/musca_s1/boot_hal.c
@@ -5,6 +5,7 @@
  *
  */
 
+#include <stdio.h>
 #include "cmsis.h"
 #include "region.h"
 #include "target_cfg.h"
@@ -60,7 +61,6 @@
 #ifdef CRYPTO_HW_ACCELERATOR
     result = crypto_hw_accelerator_init();
     if (result) {
-        BOOT_LOG_ERR("Error while initializing cryptographic accelerator.");
         return 1;
     }
 #endif /* CRYPTO_HW_ACCELERATOR */
@@ -70,13 +70,13 @@
  * this is usually done on the factory floor during chip manufacturing.
  */
 #ifdef CRYPTO_HW_ACCELERATOR_OTP_PROVISIONING
-    BOOT_LOG_INF("OTP provisioning started.");
+    printf("OTP provisioning started.\r\n");
     result = crypto_hw_accelerator_otp_provisioning();
     if (result) {
-        BOOT_LOG_ERR("OTP provisioning FAILED: 0x%X", result);
+        printf("OTP provisioning FAILED: 0x%X\r\n", result);
         return 1;
     } else {
-        BOOT_LOG_INF("OTP provisioning succeeded. TF-M won't be loaded.");
+        printf("OTP provisioning succeeded. TF-M won't be loaded.\r\n");
 
         /* We don't need to boot - the only aim is provisioning. */
         while (1);