linux/drivers/of
Rob Herring 9ec36cafe4 of/irq: do irq resolution in platform_get_irq
Currently we get the following kind of errors if we try to use interrupt
phandles to irqchips that have not yet initialized:

irq: no irq domain found for /ocp/pinmux@48002030 !
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x144/0x184()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-00038-g42a9708 #1012
(show_stack+0x14/0x1c)
(dump_stack+0x6c/0xa0)
(warn_slowpath_common+0x64/0x84)
(warn_slowpath_null+0x1c/0x24)
(of_device_alloc+0x144/0x184)
(of_platform_device_create_pdata+0x44/0x9c)
(of_platform_bus_create+0xd0/0x170)
(of_platform_bus_create+0x12c/0x170)
(of_platform_populate+0x60/0x98)

This is because we're wrongly trying to populate resources that are not
yet available. It's perfectly valid to create irqchips dynamically, so
let's fix up the issue by resolving the interrupt resources when
platform_get_irq is called.

And then we also need to accept the fact that some irqdomains do not
exist that early on, and only get initialized later on. So we can
make the current WARN_ON into just into a pr_debug().

We still attempt to populate irq resources when we create the devices.
This allows current drivers which don't use platform_get_irq to continue
to function. Once all drivers are fixed, this code can be removed.

Suggested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-04-24 21:40:22 +01:00
..
testcase-data of: selftest: add deferred probe interrupt test 2014-04-24 16:58:55 +01:00
Kconfig Merge branch 'devicetree/next-reserved-mem' into devicetree/next 2014-03-19 15:01:53 +00:00
Makefile drivers: of: add initialization code for dynamic reserved memory 2014-03-11 17:26:58 +00:00
address.c Linux 3.14-rc5 2014-03-04 16:44:10 +08:00
base.c of: Clean up of_update_property 2014-04-15 15:21:22 -05:00
device.c platform: introduce OF style 'modalias' support for platform bus 2014-01-17 01:59:15 +01:00
fdt.c of: Fix the section mismatch warnings. 2014-04-14 12:26:12 -05:00
irq.c of/irq: do irq resolution in platform_get_irq 2014-04-24 21:40:22 +01:00
of_mdio.c of_mdio: Allow the DT to specify the phy ID and avoid autoprobing 2014-03-20 17:10:28 -04:00
of_mtd.c of_mtd: Add helpers to get ECC strength and ECC step size 2014-03-10 22:42:28 -07:00
of_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
of_pci.c of: implement pci_address_to_pio as weak function 2013-10-09 20:04:06 -05:00
of_pci_irq.c Merge remote-tracking branch 'grant/devicetree/next' into for-next 2013-11-07 10:34:46 -06:00
of_private.h of: Output devicetree alias names in uevent 2013-02-06 11:06:35 +00:00
of_reserved_mem.c drivers: of: add support for custom reserved memory drivers 2014-03-11 17:27:12 +00:00
pdt.c of: device_node kobject lifecycle fixes 2014-03-19 14:58:40 +00:00
platform.c of/irq: do irq resolution in platform_get_irq 2014-04-24 21:40:22 +01:00
selftest.c of: selftest: add deferred probe interrupt test 2014-04-24 16:58:55 +01:00