* Problem with of_irq_to_resource() and IRQ flags
@ 2012-04-15 18:38 ` jonsmirl at gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: jonsmirl @ 2012-04-15 18:38 UTC (permalink / raw)
To: devicetree-discuss, ARM Linux Mailing List, Grant Likely
I'm trying to enable the dm9000 driver for DT support. I've run into
a problem with the interrupt flags. The dm9000 driver is expecting to
get them passed in on the resource flags:
unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK;
But of_irq_to_resource() is not adding them:
r->flags = IORESOURCE_IRQ;
Now if I trace into of_irq_to_resource() it calls
irq_of_parse_and_map() which calls irq_create_of_mapping() which then
calls domain->ops->dt_translate() to get the flags. So we have the
flags down the callstack but passing them back means adding a
parameter to a public API.
I can't see any API to ask an irq for its current flags. That would be
another way to get them and add them to the resource.
Any other options?
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Problem with of_irq_to_resource() and IRQ flags
@ 2012-04-15 18:38 ` jonsmirl at gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: jonsmirl at gmail.com @ 2012-04-15 18:38 UTC (permalink / raw)
To: linux-arm-kernel
I'm trying to enable the dm9000 driver for DT support. I've run into
a problem with the interrupt flags. The dm9000 driver is expecting to
get them passed in on the resource flags:
unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK;
But of_irq_to_resource() is not adding them:
r->flags = IORESOURCE_IRQ;
Now if I trace into of_irq_to_resource() it calls
irq_of_parse_and_map() which calls irq_create_of_mapping() which then
calls domain->ops->dt_translate() to get the flags. So we have the
flags down the callstack but passing them back means adding a
parameter to a public API.
I can't see any API to ask an irq for its current flags. That would be
another way to get them and add them to the resource.
Any other options?
--
Jon Smirl
jonsmirl at gmail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-15 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-15 18:38 Problem with of_irq_to_resource() and IRQ flags jonsmirl
2012-04-15 18:38 ` jonsmirl at gmail.com
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.