Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 706a1e6

Browse files
LDong-Armevedon
authored andcommitted
Platform: Fix platform init function of Musca S1
The commit 0eb7c91 HAL: Rename platform init function combined `tfm_spm_hal_post_init` and `tfm_spm_hal_post_init_platform` into a single weak function `tfm_hal_platform_init` which platforms can override. But Musca S1 was missed out from the refactoring, leading to issues such as IRQ and timers performances. This commit completes the platform init refactoring for Musca S1 to resolve the issues.
1 parent f17ce5d commit 706a1e6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

platform/ext/target/musca_s1/target_cfg.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2020 Arm Limited. All rights reserved.
2+
* Copyright (c) 2018-2021 Arm Limited. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020
#include "platform_description.h"
2121
#include "device_definition.h"
2222
#include "region_defs.h"
23+
#include "tfm_hal_platform.h"
2324
#include "tfm_plat_defs.h"
2425
#include "region.h"
2526
#include "cmsis_driver_config.h"
@@ -685,11 +686,14 @@ void ppc_clear_irq(void)
685686
Driver_APB_PPCEXP1.ClearInterrupt();
686687
}
687688

688-
enum tfm_plat_err_t tfm_spm_hal_post_init_platform(void)
689+
enum tfm_hal_status_t tfm_hal_platform_init(void)
689690
{
690691
musca_s1_scc_mram_fast_read_enable(&MUSCA_S1_SCC_DEV);
691692

692693
arm_cache_enable_blocking(&SSE_200_CACHE_DEV);
693694

694-
return TFM_PLAT_ERR_SUCCESS;
695-
}
695+
__enable_irq();
696+
stdio_init();
697+
698+
return TFM_HAL_SUCCESS;
699+
}

0 commit comments

Comments
 (0)