This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [patch] xscale irq-table
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Daniel Schmidt" <Daniel dot Schmidt3 at gmx dot de>
- Cc: Andrew Lunn <andrew at lunn dot ch>, ecos-patches at sources dot redhat dot com
- Date: 30 Sep 2004 11:22:32 +0100
- Subject: Re: [patch] xscale irq-table
- References: <20040930090417.GD25373@lunn.ch> <1541.1096536629@www62.gmx.net>
"Daniel Schmidt" <Daniel.Schmidt3@gmx.de> writes:
> Hello,
>
> after reading a littlebit more in the code:
> the GPIOS 81..85 are missing; I'll do this (I've used offsets only GPIOx+i)
>
> But then the the problem is not solved, which was the original start for my
> patch.(http://ecos.sourceware.org/ml/ecos-discuss/2004-08/msg00099.html)
>
> In:
> arm/arch/current/include/hal_intr.h:
> HAL_INTERRUPT_ATTACH(_vector_,_isr_,_data_,_object_)
> ...
> hal_interrupt_handlers[_vector_]=...
>
>
> vector is the CYGNUM_HAL_INTERRUPT_GPIO81; this means it is with the offset
> CYGNUM_HAL_ISR_MIN (=8)
>
> I don't know how to express but:
> hal_interrupt_handlers is an arry:
> 0..(CYGNUM_HAL_ISR_MAX-CYGNUM_HAL_ISR_MIN)
> but what it should be an array: CYGNUM_HAL_ISR_MIN..CYGNUM_HAL_ISR_MAX
Those macros should use the HAL_TRANSLATE_VECTOR() macro to convert
the vector number to a table index. However, they don't. The default
macro does a 1-1 translation, but the pxa2x0 HAL ought to supply a
version that subtracts 8.
No other ARM/XScale targets use the translate macro, and there is
little point in changing the architecture HAL just for this target. So
I suggest in the pxa2x0 hal_var_ints.h we just change
CYGNUM_HAL_ISR_MIN to zero, add the appropriate #defines for the
missing GPIO pins to the end of the list and define CYGNUM_HAL_ISR_MAX
and CYGNUM_HAL_ISR_COUNT appropriately.
Daniel, if you could test that this works and provide a patch, with
ChangeLog entry, I'm sure Andrew or I will check it in.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts