Thread (16 messages) flat view 16 messages, 5 authors, 2007-06-15

Re: 83xx GPIO/EXT int in arch/powerpc/

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-06-06 22:31:43

On Wed, 2007-06-06 at 11:47 +0200, Segher Boessenkool wrote:
  - You can do it in your interrupt-map. That's probably the cleanest 
quoted
way
to do it.
Not really.  If the device interrupt is physically connected
directly to a GPIO or a PIC or whatever, if it doesn't go
through the PCI bus; then it shouldn't be represented in
the device tree as if it did.  The higher-up bridge has
nothing whatsoever to do with this device's interrupt.

It's a simple hack of course, it can be useful sometimes.
It's not "clean" at all however.
I disagree :-)

The "PCI bus" in that sense is just the INT lines. They are connected
wherever you want, doesn't matter. Look at Apple for example, they are
all connected to GPIOs too.

The interrupt-map simply provides for each slot where the interrupt
goes. It's perfectly fine and clean to use it when those interrupts are
hooked to GPIOs and has been a common practice. I really don't see a
problem with that.
Depending on the rest of the tree, this would often mean
you have to do a much bigger interrupt-map-mask than
without this hack, and the corresponding explosion in
interrupt-map size.
Not really again. Besides, devices normally use only int#A, only bridges
use more.
Almost always that's how it works yeah.  And the "GPIO"
stage isn't normally represented in the device tree, GPIO
settings are considered a part of the PCB layout ;-) (one
more reason why Linux shouldn't have to touch it).
quoted
If that's not the case, you may need some intermediary cascaded
interrupt controller or something around those lines.
Yeah, but that's just the more general case of the
general case :-)
Segher, I feel here that your inability to resist arguing about
everything in that case is confusing what is a fairly simple issue in
the first place :-) Poor guy trying to figure out the right way to do
his stuff will run away screaming and go back hard coding his number in
his platform code before we are finished :-)

So I would say, taking a dicator hat, that the right way to fix his
problem is also the simplest, which is to make sure the interrupt-map
entry for that slot points to the right GPIO interrupt :-)

Easy isn't it ?

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help