aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlamy Liu <alamy.liu@cypress.com>2019-11-21 19:41:36 -0800
committerDavid Hu <david.hu@arm.com>2020-01-21 08:14:58 +0000
commit044d7ffcc8c9cf435a6dd0c309b6014a2a1e1682 (patch)
treee6f071339c3d55220f1777f32aa79197c124c1a3
parentd33851fddfe440e7ea8f09f4a259570c05cd5b63 (diff)
downloadtrusted-firmware-m-044d7ffcc8c9cf435a6dd0c309b6014a2a1e1682.tar.gz
Platform: PSoC64: S-IRQ: define TFM_PERIPHERAL_TIMER0
IRQ test (for Secure IRQ), in <tf-m>/secure_fw/spm/tfm_spm_db.inc, needs the timer structure (TFM_PERIPHERAL_TIMER0) to be defined Change-Id: I78d2cbd71b21416d04a65b1564d3e1b9e5c8c732 Signed-off-by: Alamy Liu <alamy.liu@cypress.com>
-rw-r--r--platform/ext/target/cypress/psoc64/target_cfg.c9
-rw-r--r--platform/ext/target/cypress/psoc64/tfm_peripherals_def.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/platform/ext/target/cypress/psoc64/target_cfg.c b/platform/ext/target/cypress/psoc64/target_cfg.c
index 629256022..302db9980 100644
--- a/platform/ext/target/cypress/psoc64/target_cfg.c
+++ b/platform/ext/target/cypress/psoc64/target_cfg.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018 Arm Limited
- * Copyright (c) 2019, Cypress Semiconductor Corporation. All rights reserved.
+ * Copyright (c) 2019-2020, Cypress Semiconductor Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,6 +71,13 @@ struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart = {
-1
};
+struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0 = {
+ TCPWM0_BASE,
+ TCPWM0_BASE + (sizeof(TCPWM_Type) - 1),
+ -1,
+ -1
+};
+
void enable_fault_handlers(void)
{
/* Fault handles enable registers are not present in Cortex-M0+ */
diff --git a/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h b/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
index 724db32fe..d99c0d34d 100644
--- a/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
+++ b/platform/ext/target/cypress/psoc64/tfm_peripherals_def.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2020, Cypress Semiconductor Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -12,9 +13,11 @@ struct tfm_spm_partition_platform_data_t;
extern struct tfm_spm_partition_platform_data_t tfm_peripheral_std_uart;
extern struct tfm_spm_partition_platform_data_t tfm_peripheral_uart1;
+extern struct tfm_spm_partition_platform_data_t tfm_peripheral_timer0;
#define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart)
#define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1)
+#define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0)
#define TFM_PERIPHERAL_FPGA_IO (0)
#endif /* __TFM_PERIPHERALS_DEF_H__ */