18 Oct, 2012
1 commit
-
drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer
drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer
drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers)
drivers/of/irq.c:470:37: expected int ( *[usertype] irq_init_cb )( ... )
drivers/of/irq.c:470:37: got void const *const data
drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types)drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types)
drivers/of/of_pci_irq.c:91:40: expected unsigned int const [usertype] *intspec
drivers/of/of_pci_irq.c:91:40: got restricted __be32 *
drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types)
drivers/of/of_pci_irq.c:91:53: expected unsigned int const [usertype] *addr
drivers/of/of_pci_irq.c:91:53: got restricted __be32 *Signed-off-by: Kim Phillips
Signed-off-by: Rob Herring
07 Sep, 2012
1 commit
-
Trivial patch that exports the of_irq_to_resource_table() symbol so that
modules can use it.Signed-off-by: John Crispin
Signed-off-by: Rob Herring
06 Jul, 2012
1 commit
-
The pattern (np ? np->full_name : "") is rather common in the
kernel, but can also make for quite long lines. This patch adds a new
inline function, of_node_full_name() so that the test for a valid node
pointer doesn't need to be open coded at all call sites.Signed-off-by: Grant Likely
Cc: Paul Mundt
Cc: Benjamin Herrenschmidt
Cc: Thomas Gleixner
Signed-off-by: Rob Herring
04 Jan, 2012
1 commit
-
Add a interrupts-names property to allow the possibility to provide a name
to any interrupts entries. If the name is available, use it to name the
resource, otherwise keep the device full name.Signed-off-by: Benoit Cousson
Cc: Grant Likely
Cc: Rob Herring
[grant.likely: use "interrupt-names" and tidy documentation]
Signed-off-by: Grant Likely
08 Dec, 2011
1 commit
-
PPC32/64 defines NO_IRQ to zero, so no problems expected.
ARM defines NO_IRQ to -1, but OF code relies on IRQ domains support,
which returns correct ('0') value in 'no irq' case. So everything
should be fine.Other arches might break if some of their OF drivers rely on NO_IRQ
being not 0. If so, the drivers must be fixed, finally.[ Rob Herring points out that microblaze should be fixed, and has posted
a patch for testing for that. - Linus ]Signed-off-by: Anton Vorontsov
Acked-by: Wolfram Sang
Signed-off-by: Linus Torvalds
29 Nov, 2011
1 commit
-
With the revert of "of/irq: of_irq_find_parent: check for parent equal to
child" (dc9372808412edb), we need another way to handle parent node equal
to the child node. This can simply be handled in of_irq_init by checking
for this condition.Signed-off-by: Rob Herring
Tested-by: Pawel Moll
Tested-by: Stephen Warren
23 Nov, 2011
1 commit
-
This reverts commit dc9372808412edbc653a675a526c2ee6c0c14a91.
As requested by Ben Herrenschmidt:
"This breaks some powerpc platforms at least. The practice of having
a node provide an explicit "interrupt-parent" property pointing to
itself is an old trick that we've used in the past to allow a
device-node to have interrupts routed to different controllers.In that case, the node also contains an interrupt-map, so the node is
its own parent, the interrupt resolution hits the map, which then can
route each individual interrupt to a different parent."Grant says:
"Ah, nuts, yes that is broken then. Yes, please revert the commit and
Rob & I will come up with a better solution.Rob, I think it can be done by explicitly checking for np ==
desc->interrupt_parent in of_irq_init() instead of relying on
of_irq_find_parent() returning NULL."Requested-by: Benjamin Herrenschmidt
Acked-by: Grant Likely
Cc: Rob Herring
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linuxppc-dev
Cc: Tanmay Inamdar
Signed-off-by: Linus Torvalds
02 Nov, 2011
1 commit
-
* 'next/dt' of git://git.linaro.org/people/arnd/arm-soc:
ARM: gic: use module.h instead of export.h
ARM: gic: fix irq_alloc_descs handling for sparse irq
ARM: gic: add OF based initialization
ARM: gic: add irq_domain support
irq: support domains with non-zero hwirq base
of/irq: introduce of_irq_init
ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
ARM: at91: dt: at91sam9g45 family and board device tree files
arm/mx5: add device tree support for imx51 babbage
arm/mx5: add device tree support for imx53 boards
ARM: msm: Add devicetree support for msm8660-surf
msm_serial: Add devicetree support
msm_serial: Use relative resources for iomemFix up conflicts in arch/arm/mach-at91/{at91sam9260.c,at91sam9g45.c}
31 Oct, 2011
1 commit
-
of_irq_init will scan the devicetree for matching interrupt controller
nodes. Then it calls an initialization function for each found controller
in the proper order with parent nodes initialized before child nodes.Based on initial pseudo code from Grant Likely.
Changes in v4:
- Drop unnecessary empty list check
- Be more verbose on errors
- Simplify "if (!desc) WARN_ON(1)" to "if (WARN_ON(!desc))"Changes in v3:
- add missing kfree's found by Jamie
- Implement Grant's comments to simplify the init loop
- fix function commentsChanges in v2:
- Complete re-write of list searching code from Grant LikelySigned-off-by: Rob Herring
Reviewed-by: Jamie Iles
Tested-by: Thomas Abraham
Acked-by: Grant Likely
05 Oct, 2011
1 commit
-
An interrupt controller may often implicitly inherit itself from a parent
node when in fact the controller is the interrupt root controller. Guard
against the case of child == parent and return NULL in this case.This can also be fixed by adding an explicit "interrupt-parent;" to a root
interrupt controller node.Based on code from Grant Likely.
Signed-off-by: Rob Herring
Cc: Grant Likely
20 Apr, 2011
1 commit
-
We have platform code that needs to find a node's interrupt parent, so
export of_irq_find_parent() so we can use it.Signed-off-by: Michael Ellerman
Signed-off-by: Benjamin Herrenschmidt
13 Oct, 2010
1 commit
-
Instead of referencing NO_IRQ in platform.c, define some helper functions
in irq.c to call instead from platform.c. Keep NO_IRQ usage local to
irq.c, and define NO_IRQ if not defined in headers.Signed-off-by: Andres Salomon
Signed-off-by: Grant Likely
25 Jul, 2010
2 commits
-
This patch fixes some instances where interrupt specifiers are
dereferenced directly instead of doing a be32_to_cpu() conversion first.Signed-off-by: Grant Likely
-
The flat tree code wasn't fixing the endianness on phandle values when
unflattening the tree, and the code in drivers/of wasn't always doing a
be32_to_cpu before trying to dereference the phandle values. This patch
fixes them.Signed-off-by: Grant Likely
06 Jul, 2010
3 commits
-
Resource names appear in human readable output, so when extracting IRQ
and address resources from a device tree node, use the full node name
to give proper context in places like /proc/iomem.Signed-off-by: Grant Likely
CC: Michal Simek
CC: Stephen Rothwell
CC: Benjamin Herrenschmidt
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org -
Fix some endian issues in the irq mapping OF code.
Signed-off-by: Rob Herring
Signed-off-by: Grant Likely
CC: Michal Simek
CC: Wolfram Sang
CC: Stephen Rothwell
CC: Benjamin Herrenschmidt -
Merge common irq mapping code between PowerPC and Microblaze.
This patch merges of_irq_find_parent(), of_irq_map_raw() and
of_irq_map_one(). The functions are dependent on one another, so all
three are merged in a single patch. Other than cosmetic difference
(ie. DBG() vs. pr_debug()), the implementations are identical.of_irq_to_resource() is also merged, but in this case the
implementations are different. This patch drops the microblaze version
and uses the powerpc implementation unchanged. The microblaze version
essentially open-coded irq_of_parse_and_map() which it does not need
to do. Therefore the powerpc version is safe to adopt.Signed-off-by: Grant Likely
CC: Michal Simek
CC: Benjamin Herrenschmidt
CC: Stephen Rothwell
29 Jun, 2010
1 commit
-
Merge common code between PowerPC and Microblaze. SPARC implements
irq_of_parse_and_map(), but the implementation is different, so it
does not use this code.Signed-off-by: Grant Likely
Acked-by: Benjamin Herrenschmidt
Cc: Michal Simek
Cc: "David S. Miller"
Cc: Stephen Rothwell
Cc: Jeremy Kerr