interrupts: new static IRQ API

The interrupt API has been redesigned:

- irq_connect() for dynamic interrupts renamed to irq_connect_dynamic().
  It will be used in situations where the new static irq_connect()
  won't work, i.e. the value of arguments can't be computed at build time
- a new API for static interrupts replaces irq_connect(). it is used
  exactly the same way as its dynamic counterpart. The old static irq
  macros will be removed
- Separate stub assembly files are no longer needed as the stubs are now
  generated inline with irq_connect()

ReST documentation updated for the changed API. Some detail about the
IDT in ROM added, and an oblique reference to the internal-only
_irq_handler_set() API removed; we don't talk about internal APIs in
the official documentation.

Change-Id: I280519993da0e0fe671eb537a876f67de33d3cd4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
diff --git a/drivers/spi/intel_spi.c b/drivers/spi/intel_spi.c
index 765c6dd..12eacc8 100644
--- a/drivers/spi/intel_spi.c
+++ b/drivers/spi/intel_spi.c
@@ -420,7 +420,7 @@
 		return DEV_NOT_CONFIG;
 	}
 
-	info->config_func(dev);
+	info->config_func();
 
 	_spi_config_cs(dev);
 
@@ -448,7 +448,7 @@
 /* system bindings */
 #ifdef CONFIG_SPI_INTEL_PORT_0
 
-void spi_config_0_irq(struct device *dev);
+void spi_config_0_irq(void);
 
 struct spi_intel_data spi_intel_data_port_0;
 
@@ -476,23 +476,18 @@
 /* SPI may use GPIO pin for CS, thus it needs to be initialized after GPIO */
 SYS_DEFINE_DEVICE(spi_intel_port_0, &spi_intel_data_port_0, SECONDARY,
 		  CONFIG_SPI_INTEL_INIT_PRIORITY);
-struct device *spi_intel_isr_port_0 = SYS_GET_DEVICE(spi_intel_port_0);
 
-IRQ_CONNECT_STATIC(spi_intel_irq_port_0, CONFIG_SPI_INTEL_PORT_0_IRQ,
-		   CONFIG_SPI_INTEL_PORT_0_PRI, spi_intel_isr, 0,
-		   SPI_INTEL_IRQ_FLAGS);
-
-void spi_config_0_irq(struct device *dev)
+void spi_config_0_irq(void)
 {
-	struct spi_intel_config *config = dev->config->config_info;
-
-	IRQ_CONFIG(spi_intel_irq_port_0, config->irq);
+	irq_connect(CONFIG_SPI_INTEL_PORT_0_IRQ, CONFIG_SPI_INTEL_PORT_0_PRI,
+		    spi_intel_isr, SYS_GET_DEVICE(spi_intel_port_0),
+		    SPI_INTEL_IRQ_FLAGS);
 }
 
 #endif /* CONFIG_SPI_INTEL_PORT_0 */
 #ifdef CONFIG_SPI_INTEL_PORT_1
 
-void spi_config_1_irq(struct device *dev);
+void spi_config_1_irq(void);
 
 struct spi_intel_data spi_intel_data_port_1;
 
@@ -520,17 +515,12 @@
 /* SPI may use GPIO pin for CS, thus it needs to be initialized after GPIO */
 SYS_DEFINE_DEVICE(spi_intel_port_1, &spi_intel_data_port_1, SECONDARY,
 		  CONFIG_SPI_INTEL_INIT_PRIORITY);
-struct device *spi_intel_isr_port_1 = SYS_GET_DEVICE(spi_intel_port_1);
 
-IRQ_CONNECT_STATIC(spi_intel_irq_port_1, CONFIG_SPI_INTEL_PORT_1_IRQ,
-		   CONFIG_SPI_INTEL_PORT_1_PRI, spi_intel_isr, 0,
-		   SPI_INTEL_IRQ_FLAGS);
-
-void spi_config_1_irq(struct device *dev)
+void spi_config_1_irq(void);
 {
-	struct spi_intel_config *config = dev->config->config_info;
-
-	IRQ_CONFIG(spi_intel_irq_port_1, config->irq);
+	irq_connect(CONFIG_SPI_INTEL_PORT_1_IRQ, CONFIG_SPI_INTEL_PORT_1_PRI,
+		    spi_intel_isr, SYS_GET_DEVICE(spi_intel_port_1),
+		    SPI_INTEL_IRQ_FLAGS);
 }
 
 #endif /* CONFIG_SPI_INTEL_PORT_1 */