Platform: Add timer to the platform test interface
Add timer to the platform test interface so that it can be used from
the IRQ tests as an interrupt source.
Detailed changes:
* Add timer_cmsdk driver files to unpriv code
* Align the timer interrupt handler names in the startup assemblies
accross platforms
* Add timer handling function declarations in tfm_plat_test.h and
implement them in the platform directories
* Create platform data for timer0 in tfm_peripherals_def.h
* Add option to configure timer0 as secure peripheral in PPC
* Fix MUSCA_A and MUSCA_B1 cmake files for building timer driver
Change-Id: I04757d2a961e044218c78aa09b754aaf82ac8a35
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/platform/include/tfm_plat_test.h b/platform/include/tfm_plat_test.h
index a71c0fc..c3d7317 100644
--- a/platform/include/tfm_plat_test.h
+++ b/platform/include/tfm_plat_test.h
@@ -46,4 +46,35 @@
TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_CORE_TEST")
uint32_t tfm_plat_test_get_userled_mask(void);
+/**
+ * \brief starts Secure timer
+ *
+ * Configures a timer to start counting, and generate a timer interrupt after a
+ * certain amount of time. For the test case to be useful, the timeout value of
+ * the timer should be long enough so that the test service can go to the state
+ * where it starts waiting for the interrupt.
+ */
+void tfm_plat_test_secure_timer_start(void);
+
+/**
+ * \brief Stops the Secure timer and clears the timer interrupt.
+ */
+void tfm_plat_test_secure_timer_stop(void);
+
+/**
+ * \brief starts Non-secure timer
+ *
+ * Configures a timer to start counting, and generate a timer interrupt after a
+ * certain amount of time. For the test case to be useful, the timeout value of
+ * the timer should be long enough so that the test service can go to the state
+ * where it starts waiting for the interrupt.
+ */
+void tfm_plat_test_non_secure_timer_start(void);
+
+/**
+ * \brief Stops the non-Secure timer and clears the timer interrupt.
+ */
+void tfm_plat_test_non_secure_timer_stop(void);
+
+
#endif /* __TFM_PLAT_TEST_H__ */