linux/drivers/of
Thomas Petazzoni 7a4228bbff of: irq: use of_irq_get() in of_irq_to_resource()
of_irq_to_resource() currently uses irq_of_parse_and_map() to
translate a DT interrupt specification into a Linux virtual interrupt
number. While this works in most cases, irq_of_parse_and_map() doesn't
properly handle the case where the interrupt controller is not yet
available (due to deferred probing for example).

So instead, use of_irq_get(), which is implemented exactly like
irq_of_parse_and_map(), with the exception that if the interrupt
controller is not yet available, it returns -EPROBE_DEFER. Obviously,
we also handle this error and bail out from of_irq_to_resource() when
of_irq_get() returns an error.

This allows to avoid silly error messages at boot time caused by
irq_create_of_mapping() when the interrupt controller is not
available:

[    0.153168] irq: no irq domain found for /ap806/config-space@f0000000/interrupt-controller@3f0100 !
[    0.154041] irq: no irq domain found for /cp110-master/config-space@f2000000/interrupt-controller@1e0000 !
[    0.154124] irq: no irq domain found for /cp110-master/config-space@f2000000/interrupt-controller@1e0000 !
[    0.154207] irq: no irq domain found for /cp110-master/config-space@f2000000/interrupt-controller@1e0000 !
[    0.154437] irq: no irq domain found for /cp110-master/config-space@f2000000/interrupt-controller@1e0000 !
[    0.154518] irq: no irq domain found for /cp110-master/config-space@f2000000/interrupt-controller@1e0000 !

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-05-16 09:11:22 -05:00
..
unittest-data of: Add unit tests for applying overlays 2017-04-27 17:26:06 -05:00
address.c of: fix sparse warning in of_pci_range_parser_one 2017-05-04 12:58:48 -05:00
base.c DeviceTree for 4.12: 2017-05-05 19:33:07 -07:00
device.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
dynamic.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
fdt_address.c of: use pr_fmt prefix for all console printing 2016-07-18 16:57:42 -05:00
fdt.c powerpc updates for 4.12 part 2 2017-05-12 10:04:09 -07:00
irq.c of: irq: use of_irq_get() in of_irq_to_resource() 2017-05-16 09:11:22 -05:00
Kconfig mtd: Kill the OF_MTD Kconfig option 2016-09-23 09:35:16 +02:00
Makefile MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
of_mdio.c mdio_bus: Issue GPIO RESET to PHYs. 2017-04-24 12:40:24 -04:00
of_net.c of_net: factor out repetitive code from of_get_mac_address() 2015-03-29 08:56:17 +01:00
of_numa.c of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() 2017-04-18 11:04:12 -05:00
of_pci_irq.c of/irq: improve error report on irq discovery process failure 2017-01-09 09:52:17 -06:00
of_pci.c of/pci: Remove unused MSI controller helpers 2017-03-14 15:10:11 -05:00
of_private.h of: fix unittest build without CONFIG_OF_OVERLAY 2017-04-28 16:17:56 -05:00
of_reserved_mem.c of: fix sparse warnings in fdt, irq, reserved mem, and resolver code 2017-05-04 14:01:13 -05:00
overlay.c of: remove redundant memset in overlay 2017-01-09 14:21:23 -06:00
pdt.c of: Eliminate of_allnodes list 2014-11-04 13:29:38 +00:00
platform.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
resolver.c of: fix sparse warnings in fdt, irq, reserved mem, and resolver code 2017-05-04 14:01:13 -05:00
unittest.c of/unittest: Missing unlocks on error 2017-05-04 11:07:38 -05:00