1 /* 2 * Copyright (c) 2018-2022, Arm Limited. All rights reserved. 3 * Copyright (c) 2020, Cypress Semiconductor Corporation. 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 #include "platform_irq.h" 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 /* 19 * Quantized default IRQ priority, the value is: 20 * (Number of configurable priority) / 4: (1UL << __NVIC_PRIO_BITS) / 4 21 */ 22 #define DEFAULT_IRQ_PRIORITY (1UL << (__NVIC_PRIO_BITS - 2)) 23 24 #define TFM_TIMER0_IRQ (TIMER0_IRQn) 25 #define TFM_TIMER1_IRQ (TIMER1_IRQn) 26 #define FF_TEST_UART_IRQ (UART1_Tx_IRQn) 27 #define FF_TEST_UART_IRQ_Handler UARTTX1_Handler 28 #define TFM_FPU_S_TEST_IRQ (TFM_FPU_S_TEST_IRQn) 29 #define TFM_FPU_NS_TEST_IRQ (TFM_FPU_NS_TEST_IRQn) 30 31 struct platform_data_t; 32 33 extern struct platform_data_t tfm_peripheral_std_uart; 34 extern struct platform_data_t tfm_peripheral_timer0; 35 extern struct platform_data_t tfm_peripheral_timer1; 36 37 #define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart) 38 #define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0) 39 #define TFM_PERIPHERAL_TIMER1 (&tfm_peripheral_timer1) 40 41 #ifdef PSA_API_TEST_IPC 42 extern struct platform_data_t tfm_peripheral_FF_TEST_UART_REGION; 43 extern struct platform_data_t tfm_peripheral_FF_TEST_WATCHDOG_REGION; 44 extern struct platform_data_t tfm_peripheral_FF_TEST_NVMEM_REGION; 45 extern struct platform_data_t tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO; 46 extern struct platform_data_t tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO; 47 #define FF_TEST_UART_REGION (&tfm_peripheral_FF_TEST_UART_REGION) 48 #define FF_TEST_WATCHDOG_REGION (&tfm_peripheral_FF_TEST_WATCHDOG_REGION) 49 #define FF_TEST_NVMEM_REGION (&tfm_peripheral_FF_TEST_NVMEM_REGION) 50 #define FF_TEST_SERVER_PARTITION_MMIO (&tfm_peripheral_FF_TEST_SERVER_PARTITION_MMIO) 51 #define FF_TEST_DRIVER_PARTITION_MMIO (&tfm_peripheral_FF_TEST_DRIVER_PARTITION_MMIO) 52 #endif /* PSA_API_TEST_IPC */ 53 54 #ifdef __cplusplus 55 } 56 #endif 57 58 #endif /* __TFM_PERIPHERALS_DEF_H__ */ 59