changeset 2703:3f1ca3a57e72

* cdl/ser_arm_lpc2xxx.cdl: * include/arm_lpc2xxx_ser.inl: Ensure the serial interrupts are using different priorities, otherwise we get spurious interrupts.
author asl
date Tue, 23 Dec 2008 18:36:39 +0000
parents 933a098bce82
children 8419af81cd27
files packages/devs/serial/arm/lpc2xxx/current/ChangeLog packages/devs/serial/arm/lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl packages/devs/serial/arm/lpc2xxx/current/include/arm_lpc2xxx_ser.inl
diffstat 3 files changed, 42 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/serial/arm/lpc2xxx/current/ChangeLog
+++ b/packages/devs/serial/arm/lpc2xxx/current/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-23  Martin Laabs <martin.laabs@mailbox.tu-dresden.de>
+            Andrew Lunn  <andrew@lunn.ch>
+
+	* cdl/ser_arm_lpc2xxx.cdl:
+	* include/arm_lpc2xxx_ser.inl: Ensure the serial interrupts are
+	using different priorities, otherwise we get spurious interrupts.
+
 2007-06-22  Alexander Aganichev <aaganichev@gmail.com>
 
 	* cdl/ser_arm_lpc2xxx.cdl:
--- a/packages/devs/serial/arm/lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl
+++ b/packages/devs/serial/arm/lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl
@@ -53,6 +53,8 @@ cdl_package CYGPKG_IO_SERIAL_ARM_LPC2XXX
     parent        CYGPKG_IO_SERIAL_DEVICES
     active_if     CYGPKG_IO_SERIAL
     active_if     CYGPKG_HAL_ARM_LPC2XXX
+    implements    CYGINT_IO_SERIAL_GENERIC_16X5X_CHAN_INTPRIO                   
+
 
     requires      CYGPKG_ERROR
     include_dir   cyg/io
@@ -121,6 +123,23 @@ cdl_package CYGPKG_IO_SERIAL_ARM_LPC2XXX
                 This option specifies the size of the internal buffers
                 used for the ARM LPC2XXX port 0."
         }
+	
+	cdl_option CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL0_INTPRIO {
+	     display "Interrupt priority of the serial port 0 ISR"
+	     flavor  data
+	     legal_values 0 to 15
+	     default_value 14
+             requires { is_active(CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL1_INTPRIO)
+                   implies CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL0_INTPRIO !=
+                           CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL1_INTPRIO 
+             }
+	     description "
+	         This option specifies the interrupt priority of the
+		 ISR of the serial port 0 interrupt in the VIC.
+		 Slot 0 has the highest priority and slot 15 the lowest."
+	}
+
+
     }
 
     cdl_component CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL1 {
@@ -166,6 +185,18 @@ cdl_package CYGPKG_IO_SERIAL_ARM_LPC2XXX
                  This option specifies the size of the internal
                  buffers used for the ARM LPC2XXX port 1."
          }
+
+	
+	cdl_option CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL1_INTPRIO {
+	     display "Interrupt priority of the serial port 1 ISR"
+	     flavor  data
+	     legal_values 0 to 15
+	     default_value 15
+	     description "
+	         This option specifies the interrupt priority of the
+		 ISR of the serial port 1 interrupt in the VIC.
+		 Slot 0 has the highest priority and slot 15 the lowest."
+	}
     }
 
     cdl_component CYGPKG_IO_SERIAL_ARM_LPC2XXX_TESTING {
--- a/packages/devs/serial/arm/lpc2xxx/current/include/arm_lpc2xxx_ser.inl
+++ b/packages/devs/serial/arm/lpc2xxx/current/include/arm_lpc2xxx_ser.inl
@@ -87,7 +87,8 @@ static unsigned int select_baud[] = {
 #ifdef CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL0
 static pc_serial_info lpc2xxx_serial_info0 = 
   { CYGARC_HAL_LPC2XXX_REG_UART0_BASE,
-    CYGNUM_HAL_INTERRUPT_UART0
+    CYGNUM_HAL_INTERRUPT_UART0,
+    CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL0_INTPRIO
   };
 
 #if CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL0_BUFSIZE > 0
@@ -135,7 +136,8 @@ DEVTAB_ENTRY(lpc2xxx_serial_io0,
 #ifdef CYGPKG_IO_SERIAL_ARM_LPC2XXX_SERIAL1
 static pc_serial_info lpc2xxx_serial_info1 = 
   { CYGARC_HAL_LPC2XXX_REG_UART1_BASE,
-    CYGNUM_HAL_INTERRUPT_UART1
+    CYGNUM_HAL_INTERRUPT_UART1,
+    CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL1_INTPRIO
   };
 #if CYGNUM_IO_SERIAL_ARM_LPC2XXX_SERIAL1_BUFSIZE > 0
 static unsigned char