From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Thomas To: Warren Jasper Cc: eCos Discussion Subject: Re: [ECOS] interrupt handlers for the ARM SA1110 Date: Wed, 18 Jul 2001 13:48:00 -0000 Message-id: References: <200107182025.QAA10475@lx10.tx.ncsu.edu> X-SW-Source: 2001-07/msg00563.html Note: as a matter of policy, these discussions should be copied to the ecos-discuss list. Mail sent directly to developers without also being copied can and often will be ignored. [It's for the good of everyone] On 18-Jul-2001 Warren Jasper wrote: > Hi Gary, > >> >>On 18-Jul-2001 Warren Jasper wrote: >>> >>> This is a directed to Gary Thomas, but any comments are welcome. >>> >> >>Why me? > > Because your name is on the hal code that I'm interested in :) > > [snip] > >>This would be in hal/arm/sa11x0/travis/current/hal_platform_ints.h >>(yes, these files are not terribly consistent) You can add the additional >>interrupts from the DSP beyond the normal interrupts. > > OK, let me get this straight. If I have a file > > hal/arm/sa11x0/travis/current/include/hal_platform_ints.h > > then that will get included instead of [in addition to?] > > hal/arm/sa11x0/var/current/include/hal_var_ints.h ??? > > I've been grepping around, but I'm not clear on this little bit. > Look in hal/arm/arch/current/include/hal_intr.h - there is sufficient mechanism in there to allow a platform to override the variant defaults. > >>As for your cascaded interrupt, all of this support can be handled in >>your platform code (look at hal/arm/sa11x0/ipaq/current/src/ipaq_misc.c >>for some examples). >> >>Handling the actual interrupt vectors for your additional sources would >>involve some changes to the common (/var) code. This can be added >>without too much perturbation, something like this: >> >> >>void hal_interrupt_unmask(int vector) >>{ >>#ifdef HAL_EXTENDED_INTERRUPT_UNMASK >> HAL_EXTENDED_INTERRUPT_UNMASK(vector) >>#endif >> if (vector >= CYGNUM_HAL_INTERRUPT_GPIO11) { >> vector = CYGNUM_HAL_INTERRUPT_GPIO; >> } >> *SA11X0_ICMR |= (1 << vector); >>} >> >>Where (in your platform interrupt file) you'd define >> >>#define HAL_EXTENDED_INTERRUPT_UNMASK >> if (vector >= CYGNUM_HAL_INTERRUPT_DSP0) { >> // Do whatever is required >> return; >> } >> >>Hopefully you get the picture. Such additions to the common code would >>be accepted back into the mainline by us and you'd have the support you >>need. > > Yes, that is an excellent suggestion. I need a few days to check out > my HAL and debug it with the extended exception handler. Then I'll > send you my copy of the file: > > hal/arm/sa11x0/var/current/src/sa11x0_misc.c > > with the hooks for board extended functionality as you suggested. > I'll be glad to look at whatever you come up with.