From 5e8a661422012def8aecd8c8ec06da62200e48c7 Mon Sep 17 00:00:00 2001
From: Florian Sylvestre <fsylvestre@baylibre.com>
Date: Fri, 5 May 2023 18:46:14 +0200
Subject: [PATCH 09/20] CR52: Update interrupt vectors for Spider boards (only
 ARM timer and ICCOM support)

---
 .../config/cortex-a/armv8/spider/config.oil   | 37 ++-----------------
 .../armv8/spider/interruptSources.oil         | 37 +------------------
 2 files changed, 4 insertions(+), 70 deletions(-)

diff --git a/goil/templates/config/cortex-a/armv8/spider/config.oil b/goil/templates/config/cortex-a/armv8/spider/config.oil
index 3cf1ad7d..de105663 100755
--- a/goil/templates/config/cortex-a/armv8/spider/config.oil
+++ b/goil/templates/config/cortex-a/armv8/spider/config.oil
@@ -5,7 +5,7 @@
  */
 CPU spider {
   INTERRUPT_COUNT nb_it {
-    IT_TABLE_SIZE = 32;
+    IT_TABLE_SIZE = 1024;
   };
 
   INTERRUPT_VECTOR Reset                 { VECTOR_NUM = 0; VECTOR_KIND = HANDLER { NAME =  ""; }; };
@@ -18,39 +18,8 @@ CPU spider {
   INTERRUPT_VECTOR FIQ_Interrupt         { VECTOR_NUM = 7; VECTOR_KIND = HANDLER { NAME =  ""; }; };
 
   // TO BE UPDATED
-  INTERRUPT_SOURCE ARM_TIMER             { SOURCE_NUM = 0; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE ARM_MAILBOX           { SOURCE_NUM = 1; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE ARM_DOORBELL_0        { SOURCE_NUM = 2; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE ARM_DOORBELL_1        { SOURCE_NUM = 3; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU0_HALTED           { SOURCE_NUM = 4; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU1_HALTED           { SOURCE_NUM = 5; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE ILLEGAL_ACCESS_TYPE_1 { SOURCE_NUM = 6; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE ILLEGAL_ACCESS_TYPE_0 { SOURCE_NUM = 7; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE AUX_INT               { SOURCE_NUM = 8; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE I2C_SPI_SLV_INT       { SOURCE_NUM = 9; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE PWA0                  { SOURCE_NUM = 10; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE PWA1                  { SOURCE_NUM = 11; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE SMI                   { SOURCE_NUM = 12; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPIO_INT_0            { SOURCE_NUM = 13; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPIO_INT_1            { SOURCE_NUM = 14; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPIO_INT_2            { SOURCE_NUM = 15; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPIO_INT_3            { SOURCE_NUM = 16; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE I2C_INT               { SOURCE_NUM = 17; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE SPI_INT               { SOURCE_NUM = 18; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE PCM_INT               { SOURCE_NUM = 19; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE UART_INT              { SOURCE_NUM = 20; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_7             { SOURCE_NUM = 21; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_9             { SOURCE_NUM = 22; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_10            { SOURCE_NUM = 23; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_18            { SOURCE_NUM = 24; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_19            { SOURCE_NUM = 25; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_53            { SOURCE_NUM = 26; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_54            { SOURCE_NUM = 27; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_55            { SOURCE_NUM = 28; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_56            { SOURCE_NUM = 29; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_57            { SOURCE_NUM = 30; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-  INTERRUPT_SOURCE GPU_IRQ_62            { SOURCE_NUM = 31; VECTOR = IRQ_Interrupt; ACK = TRUE; };
-
+  INTERRUPT_SOURCE ARM_TIMER             { SOURCE_NUM = 27; VECTOR = IRQ_Interrupt; ACK = TRUE; };
+  INTERRUPT_SOURCE ICCOM_INT             { SOURCE_NUM = 353; VECTOR = IRQ_Interrupt; ACK = TRUE; };
 
   PLATFORM_FILES spider {
     PATH = "cortex-a/armv8/spider";
diff --git a/goil/templates/config/cortex-a/armv8/spider/interruptSources.oil b/goil/templates/config/cortex-a/armv8/spider/interruptSources.oil
index d0189cf5..07aef502 100755
--- a/goil/templates/config/cortex-a/armv8/spider/interruptSources.oil
+++ b/goil/templates/config/cortex-a/armv8/spider/interruptSources.oil
@@ -4,40 +4,5 @@
 ENUM [
   /* ARM IRQs */
   ARM_TIMER,              /* 0 */
-  ARM_MAILBOX,            /* 1 */
-  ARM_DOORBELL_0,         /* 2 */
-  ARM_DOORBELL_1,         /* 3 */
-  GPU0_HALTED,            /* 4 */
-  GPU1_HALTED,            /* 5 */
-  ILLEGAL_ACCESS_TYPE_1,  /* 6 */
-  ILLEGAL_ACCESS_TYPE_0,  /* 7 */
-  /* VC IRQs 0-31 */
-  /* IRQ pending source 31:0 */
-  AUX_INT,                /* 8 */
-  /* GPU IRQs 32-63 */
-  /* IRQ pending source 63:32 */
-  I2C_SPI_SLV_INT,        /* 9 */
-  PWA0,                   /* 10 */
-  PWA1,                   /* 11 */
-  SMI,                    /* 12 */
-  GPIO_INT_0,             /* 13 */
-  GPIO_INT_1,             /* 14 */
-  GPIO_INT_2,             /* 15 */
-  GPIO_INT_3,             /* 16 */
-  I2C_INT,                /* 17 */
-  SPI_INT,                /* 18 */
-  PCM_INT,                /* 19 */
-  UART_INT,               /* 20 */
-  /* Other GPU IRQs */
-  GPU_IRQ_7,              /* 21 */
-  GPU_IRQ_9,              /* 22 */
-  GPU_IRQ_10,             /* 23 */
-  GPU_IRQ_18,             /* 24 */
-  GPU_IRQ_19,             /* 25 */
-  GPU_IRQ_53,             /* 26 */
-  GPU_IRQ_54,             /* 27 */
-  GPU_IRQ_55,             /* 28 */
-  GPU_IRQ_56,             /* 29 */
-  GPU_IRQ_57,             /* 30 */
-  GPU_IRQ_62              /* 31 */
+  ICCOM_INT               /* 1 */
 ] SOURCE;
-- 
2.34.1

