Kevin Hilman wrote:
Currently, the davinci code uses a fixed base address for the interrupt controller. Change this so the the base address is determined at runtime to support some new SoC that will be added. Use the SoC infrastructure to pass the base address to the common code and then put the address in a global so that get_irqnr_preamble() can access it.
Signed-off-by: Mark A. Greer <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
--- I still need to figure out the best way to have 2 versions of get_irqnr_and_base().
I'm ok with some #ifdef'ery here: A single (slower) version that checks the INTC type when multiple devices are supported, and then optimized fast versions if only a single INTC type is config'd in.
I was envisioning a hidden Kconfig option for the different INTC types (CONFIG_DAVINCI_INTC_xyz) that is selected by each CPU type in Kconfig. Then, this #ifdef'ery could use those CONFIG_DAVINCI_INTC_* ifdefs.
But frankly, I haven't thought this through entirely. There maybe some gotchas that I haven't thought of.
Well, I think the following in entry-macro.S should do it: #ifdef CONFIG_CP_INTC #ifdef CONFIG_DAVINCI_INTC) /* adaptive code */ #else /* cp_intc only code */ #endif
I guess the primary concern is performance, and my main point is that I'm OK with the cost of a few extra instructions per interrupt if I can get a single binary for multiple devices.
As I've pointed out you can't get full featured single binary because of USB (and you're on your own if you want this).
WBR, Sergei _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
