HAL: Migrate legacy interrupt API to new HAL API

This patch migrates the legacy interrupt APIs to the current HAL.
Only three of them are migrated, they are:
 - tfm_spm_hal_enable_irq
 - tfm_spm_hal_disable_irq
 - tfm_spm_hal_clear_pending_irq
The implementations are the same, and are same across most platforms.
So a common implementation bases on NVIC is provided.
Platforms can choose to use it directly or have a dedicated version.

The old ones are kept for Library Model.

Others APIs will be replaced by interrupt binding API.

Change-Id: I5842db8cd983bc6323aa24329822b13e3fbc9691
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/ffm/psa_api.c b/secure_fw/spm/ffm/psa_api.c
index f41dc4c..6e35c57 100644
--- a/secure_fw/spm/ffm/psa_api.c
+++ b/secure_fw/spm/ffm/psa_api.c
@@ -20,6 +20,7 @@
 #include "ffm/spm_error_base.h"
 #include "tfm_rpc.h"
 #include "tfm_spm_hal.h"
+#include "tfm_hal_interrupt.h"
 #include "tfm_hal_platform.h"
 #include "tfm_psa_call_param.h"
 
@@ -840,8 +841,8 @@
 
     partition->signals_asserted &= ~irq_signal;
 
-    tfm_spm_hal_clear_pending_irq((IRQn_Type)(irq_info->source));
-    tfm_spm_hal_enable_irq((IRQn_Type)(irq_info->source));
+    tfm_hal_irq_clear_pending(irq_info->source);
+    tfm_hal_irq_enable(irq_info->source);
 }
 
 void tfm_spm_partition_psa_panic(void)
@@ -868,7 +869,7 @@
         tfm_core_panic();
     }
 
-    tfm_spm_hal_enable_irq((IRQn_Type)(irq_info->source));
+    tfm_hal_irq_enable(irq_info->source);
 }
 
 psa_irq_status_t tfm_spm_partition_irq_disable(psa_signal_t irq_signal)
@@ -886,7 +887,7 @@
         tfm_core_panic();
     }
 
-    tfm_spm_hal_disable_irq((IRQn_Type)(irq_info->source));
+    tfm_hal_irq_disable(irq_info->source);
 
     return 1;
 }