From: "Martin Laabs" <martin.laabs@mailbox.tu-dresden.de>
To: ecos-devel@ecos.sourceware.org
Subject: Patch for CYGPKG_IO_SERIAL_ARM_LPC2XXX
Date: Sat, 22 Nov 2008 16:06:00 -0000 [thread overview]
Message-ID: <op.uk02z1bx724k7f@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
Hi,
the CYGPKG_IO_SERIAL_ARM_LPC2XXX package support up to two serial
devices. Therefore it uses the VIC (vectored interrupt controller)
of the LPC devices. If both channels are enables in the configtool
both will also get the same interrupt priority. This is not possible
with the LPC VIC and causes, that only the last interrupt is
enables and the first one generates "spurious interrupts" (from eCos
point of view) that leads to data fetch and illegal instruction
exeptions.
I added support to assign the priority in the configtool/driver.
Greetings,
Martin
PS: Is it possible to avoid assignment of equal priorities
to different IRQs at same time in configtool/cdl.
[-- Attachment #2: prio.patch --]
[-- Type: application/octet-stream, Size: 2938 bytes --]
diff -urp /tmp/lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl
--- /tmp/lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl 2008-11-13 20:49:42.000000000 +0100
+++ lpc2xxx/current/cdl/ser_arm_lpc2xxx.cdl 2008-11-22 12:19:58.000000000 +0100
@@ -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,19 @@ 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
+ 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 +181,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 {
diff -urp /tmp/lpc2xxx/current/include/arm_lpc2xxx_ser.inl lpc2xxx/current/include/arm_lpc2xxx_ser.inl
--- /tmp/lpc2xxx/current/include/arm_lpc2xxx_ser.inl 2008-11-13 20:49:42.000000000 +0100
+++ lpc2xxx/current/include/arm_lpc2xxx_ser.inl 2008-11-22 12:20:24.000000000 +0100
@@ -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
next reply other threads:[~2008-11-22 16:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 16:06 Martin Laabs [this message]
2008-11-22 19:12 ` Andrew Lunn
2008-11-23 22:20 ` Bart Veer
2008-11-23 13:53 ` Andrew Lunn
2008-11-23 14:52 ` Martin Laabs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.uk02z1bx724k7f@localhost \
--to=martin.laabs@mailbox.tu-dresden.de \
--cc=ecos-devel@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).