1 /*
2  * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
3  * Copyright 2019-2020 NXP. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  */
8 
9 #ifndef __TFM_PERIPHERALS_DEF_H__
10 #define __TFM_PERIPHERALS_DEF_H__
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /*
17  * Quantized default IRQ priority, the value is:
18  * (Number of configurable priority) / 4: (1UL << __NVIC_PRIO_BITS) / 4
19  */
20 #define DEFAULT_IRQ_PRIORITY    (1UL << (__NVIC_PRIO_BITS - 2))
21 
22 #define CTIMER                  CTIMER2                     /* Timer 2 */
23 #define CTIMER_CLK_FREQ         CLOCK_GetCTimerClkFreq(2U)
24 #define CTIMER_CLK_ATTACH       kFRO_HF_to_CTIMER2
25 #define CTIMER_IRQ_HANDLER      CTIMER2_IRQHandler
26 #define TFM_TIMER0_IRQ          CTIMER2_IRQn                /* (tfm_core_irq_signal_data_t->irq_line) */
27 
28 #define CTIMER_NS               CTIMER3                     /* Timer 3 */
29 #define CTIMER_NS_CLK_FREQ      CLOCK_GetCTimerClkFreq(3U)
30 #define CTIMER_NS_CLK_ATTACH    kFRO_HF_to_CTIMER3
31 #define CTIMER_NS_IRQ_HANDLER   CTIMER3_IRQHandler
32 #define TFM_TIMER1_IRQ          CTIMER3_IRQn                /* use by tfm_core_test_irq() */
33 
34 struct platform_data_t;
35 
36 extern struct platform_data_t tfm_peripheral_std_uart;
37 extern struct platform_data_t tfm_peripheral_timer0;
38 
39 #define TFM_PERIPHERAL_STD_UART     (&tfm_peripheral_std_uart)
40 #define TFM_PERIPHERAL_TIMER0       (&tfm_peripheral_timer0)
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif /* __TFM_PERIPHERALS_DEF_H__ */
47