From: Kristoffer E. <kri...@gm...> - 2007-08-23 10:03:02
|
Big thanks to you and Markus. I'll pull down a fresh lethal.git tree and see where it fails, and push the fix upstreams. Whats broken in general? Best wishes Kristoffer On Thu, 23 Aug 2007 18:53:40 +0900 "Magnus Damm" <mag...@gm...> wrote: > Hi Kristoffer, > > On 8/24/07, Kristoffer Ericson <kri...@gm...> wrote: > > Greetings, > > > > Didn't get a reply on my last mail, so here goes again. Basicly how do I calculate the IRQ number using the INTC table in setup-sh770x.c. > > Hehe, your email are still on my todo list. > > I wanted to answer your question, but I hesitated a bit because i'm > still not really sure why the official tree is broken and what the > state is of your tree. I wish we could work together and fix up the > official 2.6.24 tree step by step. > > > For instance I want to know where IRQ4 ends up, If I check how the RTC IRQ's are calculated and use the I end up at IRQ 30. > > Not sure If I understand it properly. > > There is a private set of enum_ids for each set of tables passed to > the intc code using register_intc_controller(). The enum_id value zero > needs to be treated as unused and all other values are used to provide > mappings for the intc code between interrupts and bits or bit fields > in registers. For setup-sh770x.c the first useful enum_id is IRQ0. > These enum_ids are private data for the intc code and there is no > point in trying to use them somewhere else. > > What you are looking for is hidden inside vectors[] - the information > provided by INTC_VECT(). The first argument to INTC_VECT() is the > private enum_id and the second one the vector number specified by the > processor data sheet. This vector number is hard coded in the > processor chip and the intc tables are used to describe the > relationship between these vectors and certain registers. > > You should look at the evt2irq() macro in include/asm-sh/irq.h to > figure out the relationship between the processor vector number > (second argument to INTC_VECT()) and the IRQ number passed to > request_irq(). The PINT07 interrupt source for example is located on > vector 0x700 and using the evt2irq() macro this gives us IRQ 40. > > Hope this helps. I'd be happy to help out hacking up the new pint > controller but I feel we need to get the upstream kernel in a better > shape first. Hint: send patches! =) > > Happy hacking! > > / magnus -- Kristoffer Ericson <Kri...@Gm...> |