Hello, I 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_AINTC)

   Oops, forgot to kill a paren.

/* adaptive code */
#else
/* cp_intc only code */
#endif

   ... and forgot the #else branch:

#else
/* AINTC only code */
#endif

WBR, Sergei

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to