change log for rtems (2010-04-30)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Apr 30 15:11:16 UTC 2010


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* Makefile.am, preinstall.am: Added generic interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c, network/network.c: Interrupt support changes.
	* console/uart.c: Fixed warnings.

M   1.51  c/src/lib/libbsp/arm/rtl22xx/ChangeLog
M   1.18  c/src/lib/libbsp/arm/rtl22xx/Makefile.am
M    1.7  c/src/lib/libbsp/arm/rtl22xx/console/uart.c
M   1.11  c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
M    1.4  c/src/lib/libbsp/arm/rtl22xx/network/network.c
M    1.4  c/src/lib/libbsp/arm/rtl22xx/preinstall.am
M   1.16  c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/ChangeLog:1.50 rtems/c/src/lib/libbsp/arm/rtl22xx/ChangeLog:1.51
--- rtems/c/src/lib/libbsp/arm/rtl22xx/ChangeLog:1.50	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/ChangeLog	Fri Apr 30 09:24:03 2010
@@ -1,5 +1,12 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* Makefile.am, preinstall.am: Added generic interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c, network/network.c: Interrupt support changes.
+	* console/uart.c: Fixed warnings.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/rtl22xx.cfg: Use VFP floating point model.
 
 2010-04-09	Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/Makefile.am:1.17 rtems/c/src/lib/libbsp/arm/rtl22xx/Makefile.am:1.18
--- rtems/c/src/lib/libbsp/arm/rtl22xx/Makefile.am:1.17	Sat Nov 28 00:24:46 2009
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/Makefile.am	Fri Apr 30 09:24:03 2010
@@ -13,6 +13,8 @@
 include_HEADERS = include/bsp.h
 include_HEADERS += ../../shared/include/tm27.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 DISTCLEANFILES = include/bspopts.h
@@ -40,6 +42,14 @@
     ../../shared/gnatinstallhandler.c
 # console
 libbsp_a_SOURCES += ../../shared/console.c
+# IRQ
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c
 # simple_abort
 libbsp_a_SOURCES += ../shared/abort/simple_abort.c
 # debugio

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/console/uart.c:1.6 rtems/c/src/lib/libbsp/arm/rtl22xx/console/uart.c:1.7
--- rtems/c/src/lib/libbsp/arm/rtl22xx/console/uart.c:1.6	Sun Nov 29 08:53:01 2009
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/console/uart.c	Fri Apr 30 09:24:03 2010
@@ -39,7 +39,7 @@
 static int     uart_first_open(int major, int minor, void *arg);
 static int     uart_last_close(int major, int minor, void *arg);
 static int     uart_read(int minor);
-static int     uart_write(int minor, const char *buf, int len);
+static ssize_t uart_write(int minor, const char *buf, size_t len);
 static void    uart_init(int minor);
 static void    uart_write_polled(int minor, char c);
 static int     uart_set_attributes(int minor, const struct termios *t);
@@ -180,9 +180,9 @@
  *
  * return 1 on success, -1 on error
  */
-static int uart_write(int minor, const char *buf, int len)
+static ssize_t uart_write(int minor, const char *buf, size_t len)
 {
-    int i;
+    size_t i;
 
     if (minor == 0) {
         for (i = 0; i < len; i++) {

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h:1.10 rtems/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h:1.11
--- rtems/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h:1.10	Wed Apr  7 16:49:20 2010
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h	Fri Apr 30 09:24:03 2010
@@ -25,6 +25,7 @@
 #include <rtems/console.h>
 #include <rtems/clockdrv.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
 
 #define CONFIG_ARM_CLK 60000000L
 /* cclk=cco/(2*P) */

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/network/network.c:1.3 rtems/c/src/lib/libbsp/arm/rtl22xx/network/network.c:1.4
--- rtems/c/src/lib/libbsp/arm/rtl22xx/network/network.c:1.3	Fri Apr  9 15:24:57 2010
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/network/network.c	Fri Apr 30 09:24:03 2010
@@ -1,7 +1,7 @@
 /*Note: this file is copy from 7312 BSP, and untested yet*/
 #include <rtems.h>
 #include <sys/mbuf.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <libchip/cs8900.h>
 
 #define CS8900_BASE 0x20000300
@@ -10,7 +10,7 @@
 cs8900_device *g_cs;
 void cs8900_isr(rtems_irq_hdl_param unused);
 rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,
-                                         (rtems_irq_hdl)cs8900_isr,
+                                         cs8900_isr,
 					  NULL,
 					  NULL,
 					  NULL,

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/preinstall.am:1.3 rtems/c/src/lib/libbsp/arm/rtl22xx/preinstall.am:1.4
--- rtems/c/src/lib/libbsp/arm/rtl22xx/preinstall.am:1.3	Thu Oct  2 16:37:42 2008
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/preinstall.am	Fri Apr 30 09:24:03 2010
@@ -69,3 +69,11 @@
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/uart.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/uart.h
 
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+

diff -u rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c:1.15 rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c:1.16
--- rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c:1.15	Fri Apr  9 15:24:57 2010
+++ rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c	Fri Apr 30 09:24:03 2010
@@ -11,12 +11,12 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <lpc22xx.h>
 
 /*
  * Function prototypes
  */
-extern void rtems_irq_mngt_init(void);
 extern void rtems_exception_init_mngt(void);
 extern void  UART0_Ini(void);
 extern void printi(unsigned long);
@@ -77,15 +77,6 @@
   // MAMTIM = 3;
   //MAMCR = 2;
 
-  /* init VIC */
-  VICIntEnClr = 0xffffffff;
-  VICVectAddr = 0;
-  VICIntSelect = 0;
-
-  /* disable interrupts */
-  /* Setup interrupt controller.*/
-  VICProtection = 0;
-
   UART0_Ini();
 
   /*
@@ -96,7 +87,9 @@
   /*
    * Init rtems interrupt management
    */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 } /* bsp_start */
 
 /*


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* Makefile.am, preinstall.am: Added generic interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c, rtl8019/rtl8019.c: Interrupt support changes.

M   1.23  c/src/lib/libbsp/arm/gumstix/ChangeLog
M    1.8  c/src/lib/libbsp/arm/gumstix/Makefile.am
M    1.5  c/src/lib/libbsp/arm/gumstix/include/bsp.h
M    1.4  c/src/lib/libbsp/arm/gumstix/preinstall.am
M    1.4  c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c
M    1.4  c/src/lib/libbsp/arm/gumstix/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/gumstix/ChangeLog:1.22 rtems/c/src/lib/libbsp/arm/gumstix/ChangeLog:1.23
--- rtems/c/src/lib/libbsp/arm/gumstix/ChangeLog:1.22	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/gumstix/ChangeLog	Fri Apr 30 09:27:24 2010
@@ -1,5 +1,11 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* Makefile.am, preinstall.am: Added generic interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c, rtl8019/rtl8019.c: Interrupt support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/gumstix.cfg: Use VFP floating point model.
 
 2010-04-09	Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>

diff -u rtems/c/src/lib/libbsp/arm/gumstix/Makefile.am:1.7 rtems/c/src/lib/libbsp/arm/gumstix/Makefile.am:1.8
--- rtems/c/src/lib/libbsp/arm/gumstix/Makefile.am:1.7	Sat Nov 28 00:24:46 2009
+++ rtems/c/src/lib/libbsp/arm/gumstix/Makefile.am	Fri Apr 30 09:27:24 2010
@@ -14,6 +14,8 @@
 include_HEADERS = include/bsp.h
 include_HEADERS += include/tm27.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 DISTCLEANFILES = include/bspopts.h
@@ -38,6 +40,14 @@
 
 #console
 libbsp_a_SOURCES += console/uarts.c ../../shared/console.c
+# IRQ
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c
 #abort
 libbsp_a_SOURCES += ../shared/abort/abort.c
 #framebuffer

diff -u rtems/c/src/lib/libbsp/arm/gumstix/include/bsp.h:1.4 rtems/c/src/lib/libbsp/arm/gumstix/include/bsp.h:1.5
--- rtems/c/src/lib/libbsp/arm/gumstix/include/bsp.h:1.4	Wed Sep 16 15:43:40 2009
+++ rtems/c/src/lib/libbsp/arm/gumstix/include/bsp.h	Fri Apr 30 09:27:24 2010
@@ -22,6 +22,8 @@
 #include <rtems/clockdrv.h>
 #include <libchip/serial.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
+
 #define BSP_HAS_FRAME_BUFFER 1
 
 /* What is the input clock freq in hertz */

diff -u rtems/c/src/lib/libbsp/arm/gumstix/preinstall.am:1.3 rtems/c/src/lib/libbsp/arm/gumstix/preinstall.am:1.4
--- rtems/c/src/lib/libbsp/arm/gumstix/preinstall.am:1.3	Fri Sep 18 03:05:14 2009
+++ rtems/c/src/lib/libbsp/arm/gumstix/preinstall.am	Fri Apr 30 09:27:24 2010
@@ -65,6 +65,14 @@
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+
 if ON_SKYEYE
 endif
 if ON_SKYEYE

diff -u rtems/c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c:1.3 rtems/c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c:1.4
--- rtems/c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c:1.3	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gumstix/rtl8019/rtl8019.c	Fri Apr 30 09:27:24 2010
@@ -11,7 +11,7 @@
  */
 
 #include <bsp.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include "wd80x3.h"
 
 #include <stdio.h>

diff -u rtems/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c:1.3 rtems/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c:1.4
--- rtems/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c:1.3	Sat Aug 22 08:55:51 2009
+++ rtems/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c	Fri Apr 30 09:27:24 2010
@@ -9,13 +9,13 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <rtems/libcsupport.h>
 #include <rtems/libio.h>
 #include <pxa255.h>
 
 /* Function prototypes */
 void rtems_exception_init_mngt(void);
-void  rtems_irq_mngt_init(void);
 
 /*
  *
@@ -36,7 +36,9 @@
   /* disable interrupts */
   XSCALE_INT_ICMR = 0x0;
   rtems_exception_init_mngt();
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 } /* bsp_start */
 
 /*


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* Makefile.am, preinstall.am: Added generic interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c: Interrupt support changes.

M   1.61  c/src/lib/libbsp/arm/gp32/ChangeLog
M   1.24  c/src/lib/libbsp/arm/gp32/Makefile.am
M   1.13  c/src/lib/libbsp/arm/gp32/include/bsp.h
M    1.8  c/src/lib/libbsp/arm/gp32/preinstall.am
M   1.20  c/src/lib/libbsp/arm/gp32/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/gp32/ChangeLog:1.60 rtems/c/src/lib/libbsp/arm/gp32/ChangeLog:1.61
--- rtems/c/src/lib/libbsp/arm/gp32/ChangeLog:1.60	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/gp32/ChangeLog	Fri Apr 30 09:30:09 2010
@@ -1,5 +1,11 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* Makefile.am, preinstall.am: Added generic interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c: Interrupt support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/gp32.cfg: Use VFP floating point model.
 
 2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>

diff -u rtems/c/src/lib/libbsp/arm/gp32/Makefile.am:1.23 rtems/c/src/lib/libbsp/arm/gp32/Makefile.am:1.24
--- rtems/c/src/lib/libbsp/arm/gp32/Makefile.am:1.23	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gp32/Makefile.am	Fri Apr 30 09:30:09 2010
@@ -14,6 +14,8 @@
 include_HEADERS += smc/smc.h
 include_HEADERS += ../../shared/include/tm27.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 DISTCLEANFILES = include/bspopts.h
@@ -38,6 +40,14 @@
     ../../shared/gnatinstallhandler.c
 # console
 libbsp_a_SOURCES += console/uart.c ../../shared/console.c
+# IRQ
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c
 # abort
 libbsp_a_SOURCES += ../shared/abort/abort.c
 # smc

diff -u rtems/c/src/lib/libbsp/arm/gp32/include/bsp.h:1.12 rtems/c/src/lib/libbsp/arm/gp32/include/bsp.h:1.13
--- rtems/c/src/lib/libbsp/arm/gp32/include/bsp.h:1.12	Sun Nov 29 08:53:00 2009
+++ rtems/c/src/lib/libbsp/arm/gp32/include/bsp.h	Fri Apr 30 09:30:09 2010
@@ -30,6 +30,8 @@
 #include <rtems/clockdrv.h>
 #include <s3c24xx.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
+
 #define gp32_initButtons() {rPBCON=0x0;}
 #define gp32_getButtons() \
     ( (((~rPEDAT >> 6) & 0x3 )<<8) | (((~rPBDAT >> 8) & 0xFF)<<0) )

diff -u rtems/c/src/lib/libbsp/arm/gp32/preinstall.am:1.7 rtems/c/src/lib/libbsp/arm/gp32/preinstall.am:1.8
--- rtems/c/src/lib/libbsp/arm/gp32/preinstall.am:1.7	Thu Oct  2 16:37:37 2008
+++ rtems/c/src/lib/libbsp/arm/gp32/preinstall.am	Fri Apr 30 09:30:09 2010
@@ -69,3 +69,11 @@
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+

diff -u rtems/c/src/lib/libbsp/arm/gp32/startup/bspstart.c:1.19 rtems/c/src/lib/libbsp/arm/gp32/startup/bspstart.c:1.20
--- rtems/c/src/lib/libbsp/arm/gp32/startup/bspstart.c:1.19	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gp32/startup/bspstart.c	Fri Apr 30 09:30:09 2010
@@ -15,13 +15,13 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <rtems/bspIo.h>
 #include <s3c24xx.h>
 
 /*
  * External Prototypes
  */
-extern void rtems_irq_mngt_init(void);
 extern void rtems_exception_init_mngt(void);
 
 /*
@@ -94,7 +94,9 @@
   /*
    * Init rtems interrupt management
    */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 }
 
 /*


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* Makefile.am, preinstall.am: Added generic interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c, console/uart.c, network/network.c: Interrupt
	support changes.

M   1.68  c/src/lib/libbsp/arm/csb336/ChangeLog
M   1.26  c/src/lib/libbsp/arm/csb336/Makefile.am
M    1.9  c/src/lib/libbsp/arm/csb336/console/uart.c
M    1.8  c/src/lib/libbsp/arm/csb336/include/bsp.h
M    1.8  c/src/lib/libbsp/arm/csb336/network/network.c
M    1.8  c/src/lib/libbsp/arm/csb336/preinstall.am
M   1.17  c/src/lib/libbsp/arm/csb336/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/csb336/ChangeLog:1.67 rtems/c/src/lib/libbsp/arm/csb336/ChangeLog:1.68
--- rtems/c/src/lib/libbsp/arm/csb336/ChangeLog:1.67	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/csb336/ChangeLog	Fri Apr 30 09:41:12 2010
@@ -1,5 +1,12 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* Makefile.am, preinstall.am: Added generic interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c, console/uart.c, network/network.c: Interrupt
+	support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/csb336.cfg: Use VFP floating point model.
 
 2010-04-09	Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>

diff -u rtems/c/src/lib/libbsp/arm/csb336/Makefile.am:1.25 rtems/c/src/lib/libbsp/arm/csb336/Makefile.am:1.26
--- rtems/c/src/lib/libbsp/arm/csb336/Makefile.am:1.25	Sat Nov 28 00:24:46 2009
+++ rtems/c/src/lib/libbsp/arm/csb336/Makefile.am	Fri Apr 30 09:40:16 2010
@@ -13,6 +13,8 @@
 include_HEADERS = include/bsp.h
 include_HEADERS += ../../shared/include/tm27.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 DISTCLEANFILES = include/bspopts.h
@@ -39,6 +41,14 @@
 libbsp_a_SOURCES += console/uart.c
 # abort
 libbsp_a_SOURCES += ../shared/abort/abort.c
+# IRQ
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c
 
 if HAS_NETWORKING
 network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__

diff -u rtems/c/src/lib/libbsp/arm/csb336/console/uart.c:1.8 rtems/c/src/lib/libbsp/arm/csb336/console/uart.c:1.9
--- rtems/c/src/lib/libbsp/arm/csb336/console/uart.c:1.8	Wed Apr  7 16:48:14 2010
+++ rtems/c/src/lib/libbsp/arm/csb336/console/uart.c	Fri Apr 30 09:40:16 2010
@@ -17,7 +17,7 @@
 #include <rtems/bspIo.h>
 #include <termios.h>
 #include <rtems/irq.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <mc9328mxl.h>
 
 

diff -u rtems/c/src/lib/libbsp/arm/csb336/include/bsp.h:1.7 rtems/c/src/lib/libbsp/arm/csb336/include/bsp.h:1.8
--- rtems/c/src/lib/libbsp/arm/csb336/include/bsp.h:1.7	Sun Nov 29 08:52:59 2009
+++ rtems/c/src/lib/libbsp/arm/csb336/include/bsp.h	Fri Apr 30 09:40:16 2010
@@ -27,6 +27,8 @@
 #include <rtems/clockdrv.h>
 #include <mc9328mxl.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
+
 /* What is the input clock freq in hertz? */
 #define BSP_OSC_FREQ  16000000    /* 16 MHz oscillator */
 #define BSP_XTAL_FREQ 32768       /* 32.768 KHz crystal */

diff -u rtems/c/src/lib/libbsp/arm/csb336/network/network.c:1.7 rtems/c/src/lib/libbsp/arm/csb336/network/network.c:1.8
--- rtems/c/src/lib/libbsp/arm/csb336/network/network.c:1.7	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/csb336/network/network.c	Fri Apr 30 09:40:17 2010
@@ -33,7 +33,7 @@
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
 
-#include <irq.h>
+#include <bsp/irq.h>
 
 /*  RTEMS event used by interrupt handler to start receive daemon. */
 #define START_RECEIVE_EVENT  RTEMS_EVENT_1

diff -u rtems/c/src/lib/libbsp/arm/csb336/preinstall.am:1.7 rtems/c/src/lib/libbsp/arm/csb336/preinstall.am:1.8
--- rtems/c/src/lib/libbsp/arm/csb336/preinstall.am:1.7	Thu Oct  2 16:37:29 2008
+++ rtems/c/src/lib/libbsp/arm/csb336/preinstall.am	Fri Apr 30 09:40:16 2010
@@ -65,3 +65,11 @@
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+

diff -u rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c:1.16 rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c:1.17
--- rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c:1.16	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c	Fri Apr 30 09:40:17 2010
@@ -12,10 +12,10 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <rtems/bspIo.h>
 #include <mc9328mxl.h>
 
-extern void rtems_irq_mngt_init(void);
 extern void rtems_exception_init_mngt(void);
 
 extern void mmu_set_cpu_async_mode(void);
@@ -65,7 +65,9 @@
   /*
    * Init rtems interrupt management
    */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 } /* bsp_start */
 
 /* Calcuate the frequency for perclk1 */


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* Makefile.am, preinstall.am: Added generic interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c, network/network.c: Interrupt support changes.

M   1.72  c/src/lib/libbsp/arm/csb337/ChangeLog
M   1.33  c/src/lib/libbsp/arm/csb337/Makefile.am
M    1.9  c/src/lib/libbsp/arm/csb337/include/bsp.h
M    1.9  c/src/lib/libbsp/arm/csb337/network/network.c
M   1.14  c/src/lib/libbsp/arm/csb337/preinstall.am
M   1.20  c/src/lib/libbsp/arm/csb337/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/csb337/ChangeLog:1.71 rtems/c/src/lib/libbsp/arm/csb337/ChangeLog:1.72
--- rtems/c/src/lib/libbsp/arm/csb337/ChangeLog:1.71	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/csb337/ChangeLog	Fri Apr 30 09:44:17 2010
@@ -1,5 +1,11 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* Makefile.am, preinstall.am: Added generic interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c, network/network.c: Interrupt support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/csb337.cfg: Use VFP floating point model.
 
 2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>

diff -u rtems/c/src/lib/libbsp/arm/csb337/Makefile.am:1.32 rtems/c/src/lib/libbsp/arm/csb337/Makefile.am:1.33
--- rtems/c/src/lib/libbsp/arm/csb337/Makefile.am:1.32	Mon Nov 30 16:00:34 2009
+++ rtems/c/src/lib/libbsp/arm/csb337/Makefile.am	Fri Apr 30 09:44:17 2010
@@ -16,6 +16,8 @@
 include_HEADERS += include/sed1356.h
 endif
 
+include_bsp_HEADERS =
+
 if ENABLE_UMON
 include_umondir = $(includedir)/umon
 include_umon_HEADERS  = ../../shared/umon/cli.h
@@ -60,6 +62,14 @@
     ../../shared/gnatinstallhandler.c
 # console
 libbsp_a_SOURCES += ../../shared/console.c console/uarts.c
+# IRQ
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c
 if ENABLE_LCD
 libbsp_a_SOURCES += console/sed1356.c console/fbcons.c
 endif

diff -u rtems/c/src/lib/libbsp/arm/csb337/include/bsp.h:1.8 rtems/c/src/lib/libbsp/arm/csb337/include/bsp.h:1.9
--- rtems/c/src/lib/libbsp/arm/csb337/include/bsp.h:1.8	Sun Nov 29 08:53:00 2009
+++ rtems/c/src/lib/libbsp/arm/csb337/include/bsp.h	Fri Apr 30 09:44:17 2010
@@ -26,6 +26,7 @@
 #include <rtems/clockdrv.h>
 #include <libchip/serial.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
 
 /* What is the input clock freq in hertz? */
 #define BSP_MAIN_FREQ 3686400      /* 3.6864 MHz */

diff -u rtems/c/src/lib/libbsp/arm/csb337/network/network.c:1.8 rtems/c/src/lib/libbsp/arm/csb337/network/network.c:1.9
--- rtems/c/src/lib/libbsp/arm/csb337/network/network.c:1.8	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/csb337/network/network.c	Fri Apr 30 09:44:17 2010
@@ -35,7 +35,7 @@
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
 
-#include <irq.h>
+#include <bsp/irq.h>
 #include <bspopts.h>
 
 /* enable debugging of the PHY code */

diff -u rtems/c/src/lib/libbsp/arm/csb337/preinstall.am:1.13 rtems/c/src/lib/libbsp/arm/csb337/preinstall.am:1.14
--- rtems/c/src/lib/libbsp/arm/csb337/preinstall.am:1.13	Mon Nov 30 16:00:35 2009
+++ rtems/c/src/lib/libbsp/arm/csb337/preinstall.am	Fri Apr 30 09:44:17 2010
@@ -106,3 +106,11 @@
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+

diff -u rtems/c/src/lib/libbsp/arm/csb337/startup/bspstart.c:1.19 rtems/c/src/lib/libbsp/arm/csb337/startup/bspstart.c:1.20
--- rtems/c/src/lib/libbsp/arm/csb337/startup/bspstart.c:1.19	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/csb337/startup/bspstart.c	Fri Apr 30 09:44:17 2010
@@ -17,6 +17,7 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <at91rm9200.h>
 #include <at91rm9200_pmc.h>
 #include <at91rm9200_emac.h>
@@ -24,7 +25,6 @@
 #include <at91rm9200_usart.h>
 
 /* Function prototypes */
-extern void rtems_irq_mngt_init(void);
 extern void rtems_exception_init_mngt(void);
 void bsp_libc_init( void *, uint32_t, int );
 static void fix_mac_addr(void);
@@ -65,7 +65,9 @@
   /*
    * Init rtems interrupt management
    */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 
 } /* bsp_start */
 


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* irq/bsp_irq_init.c: Removed file.
	* Makefile.am, preinstall.am: Reflect change above.  Added generic
	interrupt support modules.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* startup/bspstart.c, irq/bsp_irq_asm.S, clock/clockdrv.c,
	network/network.c: Interrupt support changes.

M  1.114  c/src/lib/libbsp/arm/edb7312/ChangeLog
M   1.40  c/src/lib/libbsp/arm/edb7312/Makefile.am
M   1.13  c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
M   1.13  c/src/lib/libbsp/arm/edb7312/include/bsp.h
M    1.5  c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_asm.S
R    1.7  c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
M    1.8  c/src/lib/libbsp/arm/edb7312/irq/irq.h
M    1.6  c/src/lib/libbsp/arm/edb7312/irq/irq.c
M    1.9  c/src/lib/libbsp/arm/edb7312/network/network.c
M   1.10  c/src/lib/libbsp/arm/edb7312/preinstall.am
M   1.16  c/src/lib/libbsp/arm/edb7312/startup/bspstart.c

diff -u rtems/c/src/lib/libbsp/arm/edb7312/ChangeLog:1.113 rtems/c/src/lib/libbsp/arm/edb7312/ChangeLog:1.114
--- rtems/c/src/lib/libbsp/arm/edb7312/ChangeLog:1.113	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/edb7312/ChangeLog	Fri Apr 30 09:48:52 2010
@@ -1,5 +1,14 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* irq/bsp_irq_init.c: Removed file.
+	* Makefile.am, preinstall.am: Reflect change above.  Added generic
+	interrupt support modules.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* startup/bspstart.c, irq/bsp_irq_asm.S, clock/clockdrv.c,
+	network/network.c: Interrupt support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/edb7312.cfg: Use VFP floating point model.
 
 2010-04-10	Ralf Corsépius <ralf.corsepius at rtems.org>

diff -u rtems/c/src/lib/libbsp/arm/edb7312/Makefile.am:1.39 rtems/c/src/lib/libbsp/arm/edb7312/Makefile.am:1.40
--- rtems/c/src/lib/libbsp/arm/edb7312/Makefile.am:1.39	Sat Nov 28 00:24:46 2009
+++ rtems/c/src/lib/libbsp/arm/edb7312/Makefile.am	Fri Apr 30 09:48:52 2010
@@ -13,6 +13,8 @@
 include_HEADERS = include/bsp.h
 include_HEADERS += ../../shared/include/tm27.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 DISTCLEANFILES = include/bspopts.h
@@ -47,11 +49,17 @@
 # abort
 libbsp_a_SOURCES += ../shared/abort/abort.c
 
-include_HEADERS += irq/irq.h
 # irq
-libbsp_a_SOURCES += irq/irq.c irq/bsp_irq_init.c \
-    ../../arm/shared/irq/irq_init.c irq/bsp_irq_asm.S \
-    irq/irq.h
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h \
+	irq/irq.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c \
+	irq/irq.c \
+	irq/bsp_irq_asm.S
 
 if HAS_NETWORKING
 network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__

diff -u rtems/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c:1.12 rtems/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c:1.13
--- rtems/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c:1.12	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c	Fri Apr 30 09:48:52 2010
@@ -14,7 +14,7 @@
 #include <rtems.h>
 #include <ep7312.h>
 #include <bsp.h>
-#include <irq.h>
+#include <bsp/irq.h>
 
 #if ON_SKYEYE==1
   #define CLOCK_DRIVER_USE_FAST_IDLE

diff -u rtems/c/src/lib/libbsp/arm/edb7312/include/bsp.h:1.12 rtems/c/src/lib/libbsp/arm/edb7312/include/bsp.h:1.13
--- rtems/c/src/lib/libbsp/arm/edb7312/include/bsp.h:1.12	Fri Aug 21 12:58:26 2009
+++ rtems/c/src/lib/libbsp/arm/edb7312/include/bsp.h	Fri Apr 30 09:48:52 2010
@@ -25,6 +25,8 @@
 #include <rtems/console.h>
 #include <rtems/clockdrv.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
+
 /*
  *  Define the interrupt mechanism for Time Test 27
  *

diff -u rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_asm.S:1.4 rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_asm.S:1.5
--- rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_asm.S:1.4	Fri Jul 17 08:53:04 2009
+++ rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_asm.S	Fri Apr 30 09:48:52 2010
@@ -16,7 +16,7 @@
 #define __asm__
 #include "irq.h"
 
-#define VECTOR_TABLE 0x40
+	.extern edb7312_interrupt_dispatch
 
 /*
  * Function to obtain, execute an IT handler and acknowledge the IT
@@ -45,7 +45,7 @@
   and   r6, r4, r5 /* only look at interrupts which are enabled */
   tst   r6, #0x0001
   beq   check_extfiq
-  ldr	r0, =(VECTOR_TABLE + (4 * 21)) /* load the vector number */
+  mov   r0, #BSP_DAIINT
   b     get_handler
 
 /*
@@ -57,7 +57,7 @@
   and   r6, r4, r5 /* only look at interrupts which are enabled */
   tst   r6, #0x0001
   beq   check_bl
-  ldr	r0, =(VECTOR_TABLE + (4 * 0)) /* load the vector number */
+  mov   r0, #BSP_EXTFIQ
   b     get_handler
 
 check_bl:
@@ -69,7 +69,7 @@
 #endif
   tst   r6, #0x0002
   beq   check_we
-  ldr	r0, =(VECTOR_TABLE + (4 * 1)) /* load the vector number */
+  mov   r0, #BSP_BLINT
   b     get_handler
 
 check_we:
@@ -81,7 +81,7 @@
 #endif
   tst   r6, #0x0004
   beq   check_mc
-  ldr	r0, =(VECTOR_TABLE + (4 * 2)) /* load the vector number */
+  mov   r0, #BSP_WEINT
   b     get_handler
 
 check_mc:
@@ -93,7 +93,7 @@
 #endif
   tst   r6, #0x0008
   beq   check_cs
-  ldr	r0, =(VECTOR_TABLE + (4 * 3)) /* load the vector number */
+  mov   r0, #BSP_MCINT
   b     get_handler
 
 check_cs:
@@ -105,7 +105,7 @@
 #endif
   tst   r6, #0x0010
   beq   check_e1
-  ldr	r0, =(VECTOR_TABLE + (4 * 4)) /* load the vector number */
+  mov   r0, #BSP_CSINT
   b     get_handler
 
 check_e1:
@@ -117,7 +117,7 @@
 #endif
   tst   r6, #0x0020
   beq   check_e2
-  ldr	r0, =(VECTOR_TABLE + (4 * 5)) /* load the vector number */
+  mov   r0, #BSP_EINT1
   b     get_handler
 
 check_e2:
@@ -129,7 +129,7 @@
 #endif
   tst   r6, #0x0040
   beq   check_e3
-  ldr	r0, =(VECTOR_TABLE + (4 * 6)) /* load the vector number */
+  mov   r0, #BSP_EINT2
   b     get_handler
 
 check_e3:
@@ -141,7 +141,7 @@
 #endif
   tst   r6, #0x0080
   beq   check_tc1
-  ldr	r0, =(VECTOR_TABLE + (4 * 7)) /* load the vector number */
+  mov   r0, #BSP_EINT3
   b     get_handler
 
 check_tc1:
@@ -153,7 +153,7 @@
 #endif
   tst   r6, #0x0100
   beq   check_tc2
-  ldr	r0, =(VECTOR_TABLE + (4 * 8)) /* load the vector number */
+  mov   r0, #BSP_TC1OI
   b     get_handler
 
 check_tc2:
@@ -165,7 +165,7 @@
 #endif
   tst   r6, #0x0200
   beq   check_rtc
-  ldr	r0, =(VECTOR_TABLE + (4 * 9)) /* load the vector number */
+  mov   r0, #BSP_TC2OI
   b     get_handler
 
 check_rtc:
@@ -177,7 +177,7 @@
 #endif
   tst   r6, #0x0400
   beq   check_tick
-  ldr	r0, =(VECTOR_TABLE + (4 * 10)) /* load the vector number */
+  mov   r0, #BSP_RTCMI
   b     get_handler
 
 check_tick:
@@ -189,7 +189,7 @@
 #endif
   tst   r6, #0x0800
   beq   check_utx1
-  ldr	r0, =(VECTOR_TABLE + (4 * 11)) /* load the vector number */
+  mov   r0, #BSP_TINT
   b     get_handler
 
 check_utx1:
@@ -201,7 +201,7 @@
 #endif
   tst   r6, #0x1000
   beq   check_urx1
-  ldr	r0, =(VECTOR_TABLE + (4 * 12)) /* load the vector number */
+  mov   r0, #BSP_UTXINT1
   b     get_handler
 
 check_urx1:
@@ -213,7 +213,7 @@
 #endif
   tst   r6, #0x2000
   beq   check_ums
-  ldr	r0, =(VECTOR_TABLE + (4 * 13)) /* load the vector number */
+  mov   r0, #BSP_URXINT1
   b     get_handler
 
 check_ums:
@@ -225,7 +225,7 @@
 #endif
   tst   r6, #0x4000
   beq   check_sse
-  ldr	r0, =(VECTOR_TABLE + (4 * 14)) /* load the vector number */
+  mov   r0, #BSP_UMSINT
   b     get_handler
 
 check_sse:
@@ -237,7 +237,7 @@
 #endif
   tst   r6, #0x8000
   beq   check_kbd
-  ldr	r0, =(VECTOR_TABLE + (4 * 15)) /* load the vector number */
+  mov   r0, #BSP_SSEOTI
   b     get_handler
 
 /*
@@ -249,7 +249,7 @@
   and   r6, r4, r5 /* only look at interrupts which are enabled */
   tst   r6, #0x0001
   beq   check_ss2rx
-  ldr	r0, =(VECTOR_TABLE + (4 * 16)) /* load the vector number */
+  mov   r0, #BSP_KBDINT
   b     get_handler
 
 check_ss2rx:
@@ -261,7 +261,7 @@
 #endif
   tst   r6, #0x0002
   beq   check_ss2tx
-  ldr	r0, =(VECTOR_TABLE + (4 * 17)) /* load the vector number */
+  mov   r0, #BSP_SS2RX
   b     get_handler
 
 check_ss2tx:
@@ -273,7 +273,7 @@
 #endif
   tst   r6, #0x0004
   beq   check_utx2
-  ldr	r0, =(VECTOR_TABLE + (4 * 18)) /* load the vector number */
+  mov   r0, #BSP_SS2TX
   b     get_handler
 
 check_utx2:
@@ -285,7 +285,7 @@
 #endif
   tst   r6, #0x1000
   beq   check_urx2
-  ldr	r0, =(VECTOR_TABLE + (4 * 19)) /* load the vector number */
+  mov   r0, #BSP_UTXINT2
   b     get_handler
 
 check_urx2:
@@ -297,15 +297,13 @@
 #endif
   tst   r6, #0x2000
   beq   IRQ_NoInterrupt
-  ldr	r0, =(VECTOR_TABLE + (4 * 20)) /* load the vector number */
+  mov   r0, #BSP_URXINT2
   b     get_handler
 
 get_handler:
 
   ldmia	  sp!,{r4, r5, r6}
 
-  ldr	r0, [r0]		/* extract the IT handler @ */
-
   /*
    * re-enable interrupts at processor level as the current
    * interrupt source is now masked via VEGA logic
@@ -316,12 +314,8 @@
   msr	cpsr, r1
 */
 
-  stmdb	  sp!,{lr}
-  ldr     lr, =IRQ_return         /* prepare the return from handler  */
-
-  mov     pc, r0			/* EXECUTE INT HANDLER */
-
-IRQ_return:
+  stmdb sp!,{lr}
+  bl    edb7312_interrupt_dispatch
   ldmia sp!,{lr}
 
 IRQ_NoInterrupt:

diff -u rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.h:1.7 rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.h:1.8
--- rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.h:1.7	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.h	Fri Apr 30 09:48:52 2010
@@ -1,6 +1,8 @@
 /*
  * Cirrus EP7312 Intererrupt handler
  *
+ * Copyright (c) 2010 embedded brains GmbH.
+ *
  * Copyright (c) 2002 by Jay Monkman <jtm at smoothsmoothie.com>
  *
  * Copyright (c) 2002 by Charlie Steader <charlies at poliac.com>
@@ -17,29 +19,14 @@
 #ifndef __IRQ_H__
 #define __IRQ_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-  /* define that can be useful (the values are just examples) */
-#define VECTOR_TABLE	 0x40
-
 #ifndef __asm__
 
-/*
- * Include some preprocessor value also used by assember code
- */
-
-#include <rtems/irq.h>
 #include <rtems.h>
+#include <rtems/irq.h>
+#include <rtems/irq-extension.h>
 
-extern void default_int_handler(rtems_irq_hdl_param unused);
-/*-------------------------------------------------------------------------+
-| Constants
-+--------------------------------------------------------------------------*/
+#endif /* __asm__ */
 
-  /* enum of the possible interrupt sources */
-typedef unsigned int rtems_irq_number;
   /* int interrupt status/mask register 1 */
 #define BSP_EXTFIQ     0
 #define BSP_BLINT      1
@@ -67,23 +54,8 @@
 #define BSP_DAIINT    21
 #define BSP_MAX_INT   22
 
-/*-------------------------------------------------------------------------+
-| Function Prototypes.
-+--------------------------------------------------------------------------*/
-/*
- * ------------------- RTEMS Single Irq Handler Mngt Routines ----------------
- */
-
-/*
- * function to initialize the interrupt for a specific BSP
- */
-void BSP_rtems_irq_mngt_init();
-
-
-#endif /* __asm__ */
+#define BSP_INTERRUPT_VECTOR_MIN 0
 
-#ifdef __cplusplus
-}
-#endif
+#define BSP_INTERRUPT_VECTOR_MAX (BSP_MAX_INT - 1)
 
 #endif /* __IRQ_H__ */

diff -u rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.c:1.5 rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.c:1.6
--- rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.c:1.5	Wed Sep 12 10:15:31 2007
+++ rtems/c/src/lib/libbsp/arm/edb7312/irq/irq.c	Fri Apr 30 09:48:52 2010
@@ -1,6 +1,8 @@
 /*
  * Cirrus EP7312 Intererrupt handler
  *
+ * Copyright (c) 2010 embedded brains GmbH.
+ *
  * Copyright (c) 2002 by Jay Monkman <jtm at smoothsmoothie.com>
  *
  * Copyright (c) 2002 by Charlie Steader <charlies at poliac.com>
@@ -13,141 +15,171 @@
  *
  *  $Id$
 */
+
 #include <bsp.h>
-#include <irq.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/apiext.h>
-#include <ep7312.h>
+#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
 
-/*
- * This function check that the value given for the irq line
- * is valid.
- */
+#include <ep7312.h>
 
-static int isValidInterrupt(int irq)
+void edb7312_interrupt_dispatch(rtems_vector_number vector)
 {
-  if ( (irq < 0) || (irq > BSP_MAX_INT))
-    return 0;
-  return 1;
+  bsp_interrupt_handler_dispatch(vector);
 }
 
-/*
- * -------------------- RTEMS Single Irq Handler Mngt Routines ----------------
- */
-
-int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
-    rtems_irq_hdl *HdlTable;
-    rtems_interrupt_level level;
-
-    if (!isValidInterrupt(irq->name)) {
-      return 0;
-    }
-    /*
-     * Check if default handler is actually connected. If not issue an error.
-     */
-    HdlTable = (rtems_irq_hdl *) VECTOR_TABLE;
-    if (*(HdlTable + irq->name) != default_int_handler) {
-      return 0;
-    }
-
-    rtems_interrupt_disable(level);
-
-    /*
-     * store the new handler
-     */
-    *(HdlTable + irq->name) = irq->hdl;
-
-    /*
-     * unmask interrupt
-     */
-    if(irq->name >= BSP_EXTFIQ && irq->name <= BSP_SSEOTI)
+    if(vector >= BSP_EXTFIQ && vector <= BSP_SSEOTI)
     {
         /* interrupt managed by INTMR1 and INTSR1 */
-        *EP7312_INTMR1 |= (1 << irq->name);
+        *EP7312_INTMR1 |= (1 << vector);
     }
-    else if(irq->name >= BSP_KBDINT && irq->name <= BSP_SS2TX)
+    else if(vector >= BSP_KBDINT && vector <= BSP_SS2TX)
     {
         /* interrupt managed by INTMR2 and INTSR2 */
-        *EP7312_INTMR2 |= (1 << (irq->name - 16));
+        *EP7312_INTMR2 |= (1 << (vector - 16));
     }
-    else if(irq->name >= BSP_UTXINT2 && irq->name <= BSP_URXINT2)
+    else if(vector >= BSP_UTXINT2 && vector <= BSP_URXINT2)
     {
         /* interrupt managed by INTMR2 and INTSR2 */
-        *EP7312_INTMR2 |= (1 << (irq->name - 7));
+        *EP7312_INTMR2 |= (1 << (vector - 7));
     }
-    else if(irq->name == BSP_DAIINT)
+    else if(vector == BSP_DAIINT)
     {
         /* interrupt managed by INTMR3 and INTSR3 */
-        *EP7312_INTMR3 |= (1 << (irq->name - 21));
-    }
-
-    /*
-     * Enable interrupt on device
-     */
-    if(irq->on)
-    {
-    	irq->on(irq);
+        *EP7312_INTMR3 |= (1 << (vector - 21));
     }
 
-    rtems_interrupt_enable(level);
-
-    return 1;
+  return RTEMS_SUCCESSFUL;
 }
 
-int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
+rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
 {
-    rtems_irq_hdl *HdlTable;
-    rtems_interrupt_level level;
-
-    if (!isValidInterrupt(irq->name)) {
-      return 0;
-    }
-    /*
-     * Check if the handler is actually connected. If not issue an error.
-     */
-    HdlTable = (rtems_irq_hdl *) VECTOR_TABLE;
-    if (*(HdlTable + irq->name) != irq->hdl) {
-      return 0;
-    }
-    rtems_interrupt_disable(level);
-
-    /*
-     * mask interrupt
-     */
-    if(irq->name >= BSP_EXTFIQ && irq->name <= BSP_SSEOTI)
+    if(vector >= BSP_EXTFIQ && vector <= BSP_SSEOTI)
     {
         /* interrupt managed by INTMR1 and INTSR1 */
-        *EP7312_INTMR1 &= ~(1 << irq->name);
+        *EP7312_INTMR1 &= ~(1 << vector);
     }
-    else if(irq->name >= BSP_KBDINT && irq->name <= BSP_SS2TX)
+    else if(vector >= BSP_KBDINT && vector <= BSP_SS2TX)
     {
         /* interrupt managed by INTMR2 and INTSR2 */
-        *EP7312_INTMR2 &= ~(1 << (irq->name - 16));
+        *EP7312_INTMR2 &= ~(1 << (vector - 16));
     }
-    else if(irq->name >= BSP_UTXINT2 && irq->name <= BSP_URXINT2)
+    else if(vector >= BSP_UTXINT2 && vector <= BSP_URXINT2)
     {
         /* interrupt managed by INTMR2 and INTSR2 */
-        *EP7312_INTMR2 &= ~(1 << (irq->name - 7));
+        *EP7312_INTMR2 &= ~(1 << (vector - 7));
     }
-    else if(irq->name == BSP_DAIINT)
+    else if(vector == BSP_DAIINT)
     {
         /* interrupt managed by INTMR3 and INTSR3 */
-        *EP7312_INTMR3 &= ~(1 << (irq->name - 21));
+        *EP7312_INTMR3 &= ~(1 << (vector - 21));
     }
 
-    /*
-     * Disable interrupt on device
-     */
-    if(irq->off)
-        irq->off(irq);
+  return RTEMS_SUCCESSFUL;
+}
 
-    /*
-     * restore the default irq value
-     */
-    *(HdlTable + irq->name) = default_int_handler;
+rtems_status_code bsp_interrupt_facility_initialize(void)
+{
+  uint32_t int_stat = 0;
 
-    rtems_interrupt_enable(level);
+  /* mask all interrupts */
+  *EP7312_INTMR1 = 0x0;
+  *EP7312_INTMR2 = 0x0;
+  *EP7312_INTMR3 = 0x0;
+  
+  /* clear all pending interrupt status' */
+  int_stat = *EP7312_INTSR1;
+  if(int_stat & EP7312_INTR1_EXTFIQ)
+  {
+  }
+  if(int_stat & EP7312_INTR1_BLINT)
+  {
+      *EP7312_BLEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_WEINT)
+  {
+      *EP7312_TEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_MCINT)
+  {
+  }
+  if(int_stat & EP7312_INTR1_CSINT)
+  {
+      *EP7312_COEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_EINT1)
+  {
+  }
+  if(int_stat & EP7312_INTR1_EINT2)
+  {
+  }
+  if(int_stat & EP7312_INTR1_EINT3)
+  {
+  }
+  if(int_stat & EP7312_INTR1_TC1OI)
+  {
+      *EP7312_TC1EOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_TC2OI)
+  {
+      *EP7312_TC2EOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_RTCMI)
+  {
+      *EP7312_RTCEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_TINT)
+  {
+      *EP7312_TEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_URXINT1)
+  {
+  }
+  if(int_stat & EP7312_INTR1_UTXINT1)
+  {
+  }
+  if(int_stat & EP7312_INTR1_UMSINT)
+  {
+      *EP7312_UMSEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR1_SSEOTI)
+  {
+      *EP7312_SYNCIO;
+  }
+  int_stat = *EP7312_INTSR1;
+  
+  int_stat = *EP7312_INTSR2;
+  if(int_stat & EP7312_INTR2_KBDINT)
+  {
+      *EP7312_KBDEOI = 0xFFFFFFFF;
+  }
+  if(int_stat & EP7312_INTR2_SS2RX)
+  {
+  }
+  if(int_stat & EP7312_INTR2_SS2TX)
+  {
+  }
+  if(int_stat & EP7312_INTR2_URXINT2)
+  {
+  }
+  if(int_stat & EP7312_INTR2_UTXINT2)
+  {
+  }
+  int_stat = *EP7312_INTSR2;
+  
+  int_stat = *EP7312_INTSR3;
+  if(int_stat & EP7312_INTR2_DAIINT)
+  {
+  }
+  int_stat = *EP7312_INTSR3;
 
-    return 1;
+  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, arm_exc_interrupt, NULL);
+
+  return RTEMS_SUCCESSFUL;
+}
+
+void bsp_interrupt_handler_default(rtems_vector_number vector)
+{
+  printk("spurious interrupt: %u\n", vector);
 }

diff -u rtems/c/src/lib/libbsp/arm/edb7312/network/network.c:1.8 rtems/c/src/lib/libbsp/arm/edb7312/network/network.c:1.9
--- rtems/c/src/lib/libbsp/arm/edb7312/network/network.c:1.8	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/edb7312/network/network.c	Fri Apr 30 09:48:52 2010
@@ -1,6 +1,6 @@
 #include <rtems.h>
 #include <sys/mbuf.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <libchip/cs8900.h>
 
 #define CS8900_BASE 0x20000300

diff -u rtems/c/src/lib/libbsp/arm/edb7312/preinstall.am:1.9 rtems/c/src/lib/libbsp/arm/edb7312/preinstall.am:1.10
--- rtems/c/src/lib/libbsp/arm/edb7312/preinstall.am:1.9	Thu Oct  2 16:37:33 2008
+++ rtems/c/src/lib/libbsp/arm/edb7312/preinstall.am	Fri Apr 30 09:48:52 2010
@@ -73,7 +73,15 @@
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/uart.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/uart.h
 
-$(PROJECT_INCLUDE)/irq.h: irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/irq.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+
+$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
 

diff -u rtems/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c:1.15 rtems/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c:1.16
--- rtems/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c:1.15	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c	Fri Apr 30 09:48:52 2010
@@ -11,13 +11,13 @@
  */
 
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <ep7312.h>
 #include <uart.h>
 
 /*
  * Function prototypes
  */
-extern void rtems_irq_mngt_init(void);
 extern void rtems_exception_init_mngt(void);
 
 /*
@@ -45,7 +45,9 @@
   /*
    * Init rtems interrupt management
    */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 } /* bsp_start */
 
 /*


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* irq/irq_asm.S, irq/irq_init.c, irq/bsp_irq_asm.S,
	irq/bsp_irq_init.c: Removed files.
	* Makefile.am, preinstall.am: Reflect changes above.  Added generic
	interrupt support modules.
	* irq/irq.h, irq/irq.c: The previous interrupt warning fix changed the
	interrupt handler API.  To fix this problem the generic interrupt
	support framework will be used now.  This eliminates a lot of copy and
	paste code.  The interrupt header file is now <bsp/irq.h>.
	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
	* start/start.S, startup/bspstart.c, clock/clockdrv.c,
	console/console.c, timer/timer.c: Interrupt support changes.

M   1.66  c/src/lib/libbsp/arm/gba/ChangeLog
M   1.22  c/src/lib/libbsp/arm/gba/Makefile.am
M    1.6  c/src/lib/libbsp/arm/gba/clock/clockdrv.c
M    1.6  c/src/lib/libbsp/arm/gba/console/console.c
M    1.4  c/src/lib/libbsp/arm/gba/include/bsp.h
R    1.2  c/src/lib/libbsp/arm/gba/irq/bsp_irq_asm.S
R    1.3  c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c
M    1.3  c/src/lib/libbsp/arm/gba/irq/irq.h
M    1.6  c/src/lib/libbsp/arm/gba/irq/irq.c
R    1.3  c/src/lib/libbsp/arm/gba/irq/irq_asm.S
R    1.3  c/src/lib/libbsp/arm/gba/irq/irq_init.c
M    1.8  c/src/lib/libbsp/arm/gba/preinstall.am
M    1.5  c/src/lib/libbsp/arm/gba/start/start.S
M   1.13  c/src/lib/libbsp/arm/gba/startup/bspstart.c
M    1.6  c/src/lib/libbsp/arm/gba/timer/timer.c

diff -u rtems/c/src/lib/libbsp/arm/gba/ChangeLog:1.65 rtems/c/src/lib/libbsp/arm/gba/ChangeLog:1.66
--- rtems/c/src/lib/libbsp/arm/gba/ChangeLog:1.65	Fri Apr 30 08:40:13 2010
+++ rtems/c/src/lib/libbsp/arm/gba/ChangeLog	Fri Apr 30 09:55:49 2010
@@ -1,5 +1,19 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* irq/irq_asm.S, irq/irq_init.c, irq/bsp_irq_asm.S,
+	irq/bsp_irq_init.c: Removed files.
+	* Makefile.am, preinstall.am: Reflect changes above.  Added generic
+	interrupt support modules.
+	* irq/irq.h, irq/irq.c: The previous interrupt warning fix changed the
+	interrupt handler API.  To fix this problem the generic interrupt
+	support framework will be used now.  This eliminates a lot of copy and
+	paste code.  The interrupt header file is now <bsp/irq.h>.
+	* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
+	* start/start.S, startup/bspstart.c, clock/clockdrv.c,
+	console/console.c, timer/timer.c: Interrupt support changes.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* make/custom/gba.cfg: Use VFP floating point model.
 
 2010-04-09	Thomas Doerfler <Thomas.Doerfler at embedded-brains.de>

diff -u rtems/c/src/lib/libbsp/arm/gba/Makefile.am:1.21 rtems/c/src/lib/libbsp/arm/gba/Makefile.am:1.22
--- rtems/c/src/lib/libbsp/arm/gba/Makefile.am:1.21	Fri Jul 17 08:53:04 2009
+++ rtems/c/src/lib/libbsp/arm/gba/Makefile.am	Fri Apr 30 09:55:51 2010
@@ -18,6 +18,8 @@
 include_HEADERS += ../../shared/include/tm27.h
 include_HEADERS += include/gba.h
 
+include_bsp_HEADERS =
+
 nodist_include_HEADERS = include/bspopts.h
 nodist_include_HEADERS += ../../shared/include/coverhd.h
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
@@ -48,10 +50,16 @@
 # timer
 libbsp_a_SOURCES += timer/timer.c
 
-include_HEADERS += irq/irq.h
 # irq
-libbsp_a_SOURCES += irq/irq.c irq/bsp_irq_init.c irq/irq_init.c \
-    irq/bsp_irq_asm.S irq/irq_asm.S
+include_bsp_HEADERS += ../../shared/include/irq-generic.h \
+	../../shared/include/irq-info.h \
+	irq/irq.h
+libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
+	../../shared/src/irq-legacy.c \
+	../../shared/src/irq-info.c \
+	../../shared/src/irq-shell.c \
+	../../shared/src/irq-server.c \
+	irq/irq.c
 
 include $(srcdir)/preinstall.am
 include $(top_srcdir)/../../../../automake/local.am

diff -u rtems/c/src/lib/libbsp/arm/gba/clock/clockdrv.c:1.5 rtems/c/src/lib/libbsp/arm/gba/clock/clockdrv.c:1.6
--- rtems/c/src/lib/libbsp/arm/gba/clock/clockdrv.c:1.5	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gba/clock/clockdrv.c	Fri Apr 30 09:55:51 2010
@@ -17,7 +17,7 @@
 
 #include <rtems.h>
 #include <bsp.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <gba.h>
 
 

diff -u rtems/c/src/lib/libbsp/arm/gba/console/console.c:1.5 rtems/c/src/lib/libbsp/arm/gba/console/console.c:1.6
--- rtems/c/src/lib/libbsp/arm/gba/console/console.c:1.5	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gba/console/console.c	Fri Apr 30 09:55:51 2010
@@ -24,7 +24,7 @@
 #include <rtems/libio.h>
 #include <rtems/termiostypes.h>
 #include <termios.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <gba.h>
 #include <conio.h>
 

diff -u rtems/c/src/lib/libbsp/arm/gba/include/bsp.h:1.3 rtems/c/src/lib/libbsp/arm/gba/include/bsp.h:1.4
--- rtems/c/src/lib/libbsp/arm/gba/include/bsp.h:1.3	Fri Aug 21 12:58:27 2009
+++ rtems/c/src/lib/libbsp/arm/gba/include/bsp.h	Fri Apr 30 09:55:51 2010
@@ -30,6 +30,8 @@
 #include <rtems/console.h>
 #include <rtems/clockdrv.h>
 
+#define BSP_FEATURE_IRQ_EXTENSION
+
 /** Define operation count for Tests */
 #define OPERATION_COUNT 10
 

diff -u rtems/c/src/lib/libbsp/arm/gba/irq/irq.h:1.2 rtems/c/src/lib/libbsp/arm/gba/irq/irq.h:1.3
--- rtems/c/src/lib/libbsp/arm/gba/irq/irq.h:1.2	Fri Apr  9 15:24:56 2010
+++ rtems/c/src/lib/libbsp/arm/gba/irq/irq.h	Fri Apr 30 09:55:53 2010
@@ -7,6 +7,8 @@
 /*
  *  RTEMS GBA BSP
  *
+ *  Copyright (c) 2010 embedded brains GmbH.
+ *
  *  Copyright (c) 2004  Markku Puro <markku.puro at kopteri.net>
  *
  *  The license and distribution terms for this file may be
@@ -16,25 +18,16 @@
  *  $Id$
  */
 
-#ifndef _IRQ_H_
-#define _IRQ_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Include some preprocessor value also used by assember code
- */
-
-#define VECTOR_TABLE  (&irq_vector_table[0])
+#ifndef __asm__
 
-#include <stdint.h>
-#include <rtems/irq.h>
 #include <rtems.h>
+#include <rtems/irq.h>
+#include <rtems/irq-extension.h>
 
-extern void default_int_handler(rtems_irq_hdl_param unused);
+#endif /* __asm__ */
+
+#ifndef _IRQ_H_
+#define _IRQ_H_
 
 /*---------------------------------------------------------------------------*
  *  MACROS                                                                   *
@@ -48,44 +41,26 @@
 | Constants
 +--------------------------------------------------------------------------*/
 
-typedef enum {
-  BSP_IRQ_VBLANK    = 0,
-  BSP_IRQ_HBLANK    = 1,
-  BSP_IRQ_VCOUNTER  = 2,
-  BSP_IRQ_TIMER0    = 3,
-  BSP_IRQ_TIMER1    = 4,
-  BSP_IRQ_TIMER2    = 5,
-  BSP_IRQ_TIMER3    = 6,
-  BSP_IRQ_SERIAL    = 7,
-  BSP_IRQ_DMA0      = 8,
-  BSP_IRQ_DMA1      = 9,
-  BSP_IRQ_DMA2      = 10,
-  BSP_IRQ_DMA3      = 11,
-  BSP_IRQ_KEY       = 12,
-  BSP_IRQ_CART      = 13,
-  BSP_IRQ_NA14      = 14,
-  BSP_IRQ_NA15      = 15,
-  BSP_MAX_INT       = 16  /**< BSP_MAX_INT <= _irq_max_vector in linkcmds */
-} rtems_irq_symbolic_name;
-
-
-extern void        _irq_max_vector;               /**< defined in lincmds    */
-extern uint32_t    irq_vector_table[BSP_MAX_INT]; /**< allocated in linkcmds */
+#define BSP_IRQ_VBLANK   0
+#define BSP_IRQ_HBLANK   1
+#define BSP_IRQ_VCOUNTER 2
+#define BSP_IRQ_TIMER0   3
+#define BSP_IRQ_TIMER1   4
+#define BSP_IRQ_TIMER2   5
+#define BSP_IRQ_TIMER3   6
+#define BSP_IRQ_SERIAL   7
+#define BSP_IRQ_DMA0     8
+#define BSP_IRQ_DMA1     9
+#define BSP_IRQ_DMA2     10
+#define BSP_IRQ_DMA3     11
+#define BSP_IRQ_KEY      12
+#define BSP_IRQ_CART     13
+#define BSP_IRQ_NA14     14
+#define BSP_IRQ_NA15     15
+#define BSP_MAX_INT      16
 
-/*-------------------------------------------------------------------------+
-| Function Prototypes.
-+--------------------------------------------------------------------------*/
-/*
- * ------------------------ RTEMS Single Irq Handler Mngt Routines ----------------
- */
-
-/**
- * @brief function to initialize the interrupt for a specific BSP
- */
-void BSP_rtems_irq_mngt_init();
+#define BSP_INTERRUPT_VECTOR_MIN 0
 
-#ifdef __cplusplus
-}
-#endif
+#define BSP_INTERRUPT_VECTOR_MAX (BSP_MAX_INT - 1)
 
 #endif /* _IRQ_H_ */

diff -u rtems/c/src/lib/libbsp/arm/gba/irq/irq.c:1.5 rtems/c/src/lib/libbsp/arm/gba/irq/irq.c:1.6
--- rtems/c/src/lib/libbsp/arm/gba/irq/irq.c:1.5	Sat Sep  6 12:32:10 2008
+++ rtems/c/src/lib/libbsp/arm/gba/irq/irq.c	Fri Apr 30 09:55:52 2010
@@ -6,6 +6,8 @@
 /*
  *  RTEMS GBA BSP
  *
+ *  Copyright (c) 2010 embedded brains GmbH.
+ *
  *  Copyright (c) 2002 by Jay Monkman <jtm at smoothsmoothie.com>
  *
  *  Copyright (c) 2002 by Charlie Steader <charlies at poliac.com>
@@ -20,144 +22,51 @@
  */
 
 #include <bsp.h>
-#include <irq.h>
-#include <gba_registers.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/apiext.h>
+#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
 
+#include <gba_registers.h>
 
-/**
- *  @brief isValidInterrupt function check that the value given for the irq line is valid.
- *
- *  @param  irq irq number
- *  @return status code TRUE/FALSE (0/1)
- */
-static int isValidInterrupt(int irq)
+void bsp_interrupt_dispatch(void)
 {
-  if ( (irq < 0) || (irq > BSP_MAX_INT)) {
-     return 0;
-  }
-  return 1;
-}
+  unsigned reg_ie = GBA_REG_IE;
+  unsigned reg_if = GBA_REG_IF & reg_ie;
+  rtems_vector_number vector = 31 - __builtin_clz(reg_if);
 
-/*
- * ------------------------ RTEMS Single Irq Handler Mngt Routines ----------------
- */
+  bsp_interrupt_handler_dispatch(vector);
 
+  GBA_REG_IF = 1 << vector;
+}
 
-/**
- *  @brief BSP_install_rtems_irq_handler function install rtems irq handler.
- *
- *  @param  irq irq connect data
- *  @return status code TRUE/FALSE (0/1)
- */
-int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
-    rtems_irq_hdl *HdlTable;
-    rtems_interrupt_level level;
+  GBA_REG_IE |= 1 << vector;
 
-    if (!isValidInterrupt(irq->name)) {
-       return 0;
-    }
-    /*
-     * Check if default handler is actually connected. If not issue an error.
-     */
-    HdlTable = (rtems_irq_hdl *) (uint32_t)VECTOR_TABLE;
-    if (*(HdlTable + irq->name) != default_int_handler) {
-       return 0;
-    }
-
-    rtems_interrupt_disable(level);
-
-    /*
-     * store the new handler
-     */
-    *(HdlTable + irq->name) = irq->hdl;
-
-    /*
-     * ack pending interrupt
-     */
-    GBA_REG_IF |= (1 << (irq->name));
-
-    /*
-     * initialize the control register for the concerned interrupt
-     */
-    GBA_REG_IE |= (1 << (irq->name));
-
-    /*
-     * Enable interrupt on device
-     */
-	if (irq->on)
-    	irq->on(irq);
+  return RTEMS_SUCCESSFUL;
+}
 
-    rtems_interrupt_enable(level);
+rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
+{
+  GBA_REG_IE &= ~(1 << vector);
 
-    return 1;
+  return RTEMS_SUCCESSFUL;
 }
 
-/**
- *  @brief BSP_remove_rtems_irq_handler function removes rtems irq handler.
- *
- *  @param  irq irq connect data
- *  @return status code TRUE/FALSE (0/1)
- */
-int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
+rtems_status_code bsp_interrupt_facility_initialize(void)
 {
-    rtems_irq_hdl *HdlTable;
-    rtems_interrupt_level level;
+  /* clear all interrupt status flags */
+  GBA_REG_IF = 0xffff;
+  /* disable all interrupts */
+  GBA_REG_IE = 0;
+  /* set master interrupt enable */
+  GBA_REG_IME = 1;
 
-    if (!isValidInterrupt(irq->name)) {
-       return 0;
-    }
-    /*
-     * Check if the handler is actually connected. If not issue an error.
-     */
-    HdlTable = (rtems_irq_hdl *) (uint32_t)VECTOR_TABLE;
-    if (*(HdlTable + irq->name) != irq->hdl) {
-       return 0;
-    }
-    rtems_interrupt_disable(level);
-
-    /*
-     * mask at INT controller level
-     */
-    GBA_REG_IE &= ~(1 << irq->name);
-
-    /*
-     * Disable interrupt on device
-     */
-	if (irq->off)
-    	irq->off(irq);
-
-    /*
-     * restore the default irq value
-     */
-    *(HdlTable + irq->name) = default_int_handler;
+  /* Exception handler is already present in the ROM BIOS */
 
-    rtems_interrupt_enable(level);
-
-    return 1;
+  return RTEMS_SUCCESSFUL;
 }
 
-
-/**
- *  @brief _ThreadProcessSignalsFromIrq function check that the value given for the irq line is valid.
- *
- *  @param  cxt exeption frame
- *  @return None
- */
-void _ThreadProcessSignalsFromIrq (CPU_Exception_frame* ctx)
+void bsp_interrupt_handler_default(rtems_vector_number vector)
 {
-  /*
-   * Process pending signals that have not already been
-   * processed by _Thread_Dispatch. This happens quite
-   * unfrequently : the ISR must have posted an action
-   * to the current running thread.
-   */
-  if ( _Thread_Do_post_task_switch_extension ||
-       _Thread_Executing->do_post_task_switch_extension )
-  {
-     _Thread_Executing->do_post_task_switch_extension = false;
-     _API_extensions_Run_postswitch();
-  }
+  printk("spurious interrupt: %u\n", vector);
 }

diff -u rtems/c/src/lib/libbsp/arm/gba/preinstall.am:1.7 rtems/c/src/lib/libbsp/arm/gba/preinstall.am:1.8
--- rtems/c/src/lib/libbsp/arm/gba/preinstall.am:1.7	Thu Oct  2 16:37:34 2008
+++ rtems/c/src/lib/libbsp/arm/gba/preinstall.am	Fri Apr 30 09:55:51 2010
@@ -85,7 +85,15 @@
 	$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
-$(PROJECT_INCLUDE)/irq.h: irq/irq.h $(PROJECT_INCLUDE)/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/irq.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
+$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
+
+$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
+
+$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
 

diff -u rtems/c/src/lib/libbsp/arm/gba/start/start.S:1.4 rtems/c/src/lib/libbsp/arm/gba/start/start.S:1.5
--- rtems/c/src/lib/libbsp/arm/gba/start/start.S:1.4	Wed Apr  7 16:49:47 2010
+++ rtems/c/src/lib/libbsp/arm/gba/start/start.S	Fri Apr 30 09:55:55 2010
@@ -165,7 +165,7 @@
     .align
     PUBLIC_ARM_FUNCTION(_gba_ISR_handler)
         ldmfd  r13!,{r0-r3,r12,r14}
-        b      _ISR_Handler
+        b      arm_exc_interrupt
     LABEL_END(_gba_ISR_handler)
 
 

diff -u rtems/c/src/lib/libbsp/arm/gba/startup/bspstart.c:1.12 rtems/c/src/lib/libbsp/arm/gba/startup/bspstart.c:1.13
--- rtems/c/src/lib/libbsp/arm/gba/startup/bspstart.c:1.12	Tue Sep 16 13:59:04 2008
+++ rtems/c/src/lib/libbsp/arm/gba/startup/bspstart.c	Fri Apr 30 09:55:55 2010
@@ -20,13 +20,11 @@
 
 #include <stdio.h>
 #include <bsp.h>
+#include <bsp/irq-generic.h>
 #include <rtems/bspIo.h>
 #include <gba.h>
 #include <conio.h>
 
-/* External Prototypes */
-extern void rtems_irq_mngt_init(void);
-
 /** Chip registers */
 volatile unsigned int *Regs = (unsigned int *)GBA_IO_REGS_ADDR;
 
@@ -50,7 +48,9 @@
   /* rtems_exception_init_mngt(); */
 
   /* Init rtems interrupt management */
-  rtems_irq_mngt_init();
+  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
+    _CPU_Fatal_halt(0xe);
+  }
 }
 
 /**

diff -u rtems/c/src/lib/libbsp/arm/gba/timer/timer.c:1.5 rtems/c/src/lib/libbsp/arm/gba/timer/timer.c:1.6
--- rtems/c/src/lib/libbsp/arm/gba/timer/timer.c:1.5	Thu Sep  4 23:36:16 2008
+++ rtems/c/src/lib/libbsp/arm/gba/timer/timer.c	Fri Apr 30 09:55:55 2010
@@ -29,7 +29,7 @@
 
 #include <rtems.h>
 #include <bsp.h>
-#include <irq.h>
+#include <bsp/irq.h>
 #include <gba.h>
 
 /*


 *sh*:
2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* at91rm9200/dbgu/dbgu.c, at91rm9200/usart/usart.c,
	pxa255/ffuart/ffuart.c: Fixed warnings due to Termios API change.

M   1.74  c/src/lib/libcpu/arm/ChangeLog
M    1.7  c/src/lib/libcpu/arm/at91rm9200/dbgu/dbgu.c
M    1.4  c/src/lib/libcpu/arm/at91rm9200/usart/usart.c
M    1.7  c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c

diff -u rtems/c/src/lib/libcpu/arm/ChangeLog:1.73 rtems/c/src/lib/libcpu/arm/ChangeLog:1.74
--- rtems/c/src/lib/libcpu/arm/ChangeLog:1.73	Fri Apr 30 08:15:48 2010
+++ rtems/c/src/lib/libcpu/arm/ChangeLog	Fri Apr 30 09:59:51 2010
@@ -1,5 +1,10 @@
 2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* at91rm9200/dbgu/dbgu.c, at91rm9200/usart/usart.c,
+	pxa255/ffuart/ffuart.c: Fixed warnings due to Termios API change.
+
+2010-04-30	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* at91rm9200/irq/irq.c, at91rm9200/irq/irq.h, lpc22xx/irq/irq.c,
 	lpc22xx/irq/irq.h, mc9328mxl/irq/irq.c, mc9328mxl/irq/irq.h,
 	pxa255/irq/irq.c, pxa255/irq/irq.h, s3c24xx/irq/irq.c,

diff -u rtems/c/src/lib/libcpu/arm/at91rm9200/dbgu/dbgu.c:1.6 rtems/c/src/lib/libcpu/arm/at91rm9200/dbgu/dbgu.c:1.7
--- rtems/c/src/lib/libcpu/arm/at91rm9200/dbgu/dbgu.c:1.6	Sun Nov 29 22:58:24 2009
+++ rtems/c/src/lib/libcpu/arm/at91rm9200/dbgu/dbgu.c	Fri Apr 30 09:59:51 2010
@@ -32,7 +32,7 @@
 static int     dbgu_first_open(int major, int minor, void *arg);
 static int     dbgu_last_close(int major, int minor, void *arg);
 static int     dbgu_read(int minor);
-static int     dbgu_write(int minor, const char *buf, int len);
+static ssize_t dbgu_write(int minor, const char *buf, size_t len);
 static void    dbgu_init(int minor);
 static void    dbgu_write_polled(int minor, char c);
 static int     dbgu_set_attributes(int minor, const struct termios *t);
@@ -111,7 +111,7 @@
  *
  * return 1 on success, -1 on error
  */
-static int dbgu_write(int minor, const char *buf, int len)
+static ssize_t dbgu_write(int minor, const char *buf, size_t len)
 {
     int i, x;
     char c;

diff -u rtems/c/src/lib/libcpu/arm/at91rm9200/usart/usart.c:1.3 rtems/c/src/lib/libcpu/arm/at91rm9200/usart/usart.c:1.4
--- rtems/c/src/lib/libcpu/arm/at91rm9200/usart/usart.c:1.3	Fri Apr  9 15:24:55 2010
+++ rtems/c/src/lib/libcpu/arm/at91rm9200/usart/usart.c	Fri Apr 30 09:59:51 2010
@@ -32,7 +32,7 @@
 static int     usart_first_open(int major, int minor, void *arg);
 static int     usart_last_close(int major, int minor, void *arg);
 static int     usart_read_polled(int minor);
-static int     usart_write_polled_support(int minor, const char *buf, int len);
+static ssize_t usart_write_polled_support(int minor, const char *buf, size_t len);
 static void    usart_init(int minor);
 static void    usart_write_polled(int minor, char c);
 static int     usart_set_attributes(int minor, const struct termios *t);
@@ -152,7 +152,7 @@
  *
  * return 1 on success, -1 on error
  */
-static int usart_write_polled_support(int minor, const char *buf, int len)
+static ssize_t usart_write_polled_support(int minor, const char *buf, size_t len)
 {
   at91rm9200_usart_regs_t *usart;
   int nwrite=0;

diff -u rtems/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c:1.6 rtems/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c:1.7
--- rtems/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c:1.6	Sun Nov 29 23:02:22 2009
+++ rtems/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c	Fri Apr 30 09:59:51 2010
@@ -25,7 +25,7 @@
 static int     ffuart_first_open(int major, int minor, void *arg);
 static int     ffuart_last_close(int major, int minor, void *arg);
 static int     ffuart_read(int minor);
-static int     ffuart_write(int minor, const char *buf, int len);
+static ssize_t ffuart_write(int minor, const char *buf, size_t len);
 static void    ffuart_init(int minor);
 static void    ffuart_write_polled(int minor, char c);
 static int     ffuart_set_attributes(int minor, const struct termios *t);
@@ -102,9 +102,9 @@
  *
  * return 1 on success, -1 on error
  */
-static int ffuart_write(int minor, const char *buf, int len)
+static ssize_t ffuart_write(int minor, const char *buf, size_t len)
 {
-    int i, x;
+    size_t i, x;
     char c;
     console_tbl *console_entry;
     ffuart_reg_t *ffuart;



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100430/56c96722/attachment-0001.html>


More information about the vc mailing list