From: Paul M. <le...@li...> - 2007-03-27 19:41:16
|
On Wed, Mar 28, 2007 at 02:46:25AM +0900, tak...@op... wrote: > There is a issue whether external interrupts should be initialized in CPU setup code, or not. > I initialize them in board setup code (boards/shmin/setup.c) now. > I don't know the answer, perhaps CPU do definition, and board should do all of initialization, or > ipr initialization and priority setting should be separated, or this is pin mux issue, or ... I don't know. > So, forget it now, please :) Here is another topic. > Agreed, this does need to be overhauled. For the IPR scheme, perhaps your macro solution is really the most sensible way to go. There's not much in the way of meaningful mapping we can accomplish with the map_ipridx_to_addr() approach, so there's not a lot of point in keeping it around. INTC2 is going to need something similar as well, since the new-style INTC2s place their mask/clear registers at completely different locations depending on the IRQ offset. Irritating, but not a lot we can do about it, it's just going to have to be something that's swalled up by the mapping code. SH7785 INTC2 has this problem, for example. I would rather not have this stuff visible in the board-level configuration, at least. Boards should only care about their special IRQ controllers, and whether they need to kick a parent IRQ in to a certain mode for cascade or not. |