<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/of_irq.h, branch v3.17</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-05-23T02:40:25Z</updated>
<entry>
<title>of/irq: do irq resolution in platform_get_irq_byname()</title>
<updated>2014-05-23T02:40:25Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2014-05-20T10:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ad69674e73a18dc3a8da557f4059ccf9389531a5'/>
<id>urn:sha1:ad69674e73a18dc3a8da557f4059ccf9389531a5</id>
<content type='text'>
The commit 9ec36cafe43bf835f8f29273597a5b0cbc8267ef
"of/irq: do irq resolution in platform_get_irq" from Rob Herring -
moves resolving of the interrupt resources in platform_get_irq().
But this solution isn't complete because platform_get_irq_byname()
need to be modified the same way.

Hence, fix it by adding interrupt resolution code at the
platform_get_irq_byname() function too.

Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of/irq: do irq resolution in platform_get_irq</title>
<updated>2014-04-24T20:40:22Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2014-04-23T22:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9ec36cafe43bf835f8f29273597a5b0cbc8267ef'/>
<id>urn:sha1:9ec36cafe43bf835f8f29273597a5b0cbc8267ef</id>
<content type='text'>
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 &lt;linux@arm.linux.org.uk&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>dt/irq: add empty of_irq_count for !OF_IRQ</title>
<updated>2013-11-08T16:47:28Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-11-07T18:13:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8d3f362f52b65207cacbfb4c50f75e9d4751ef6'/>
<id>urn:sha1:a8d3f362f52b65207cacbfb4c50f75e9d4751ef6</id>
<content type='text'>
Add an empty version of of_irq_count for !OF_IRQ. This fixes build error
on sparc in linux-next:

drivers/gpio/gpio-bcm-kona.c:542: undefined reference to `of_irq_count'

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>of/irq: Refactor interrupt-map parsing</title>
<updated>2013-10-24T10:43:04Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-09-15T21:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2361613206e66ce59cc0e08efa8d98ec15b84ed1'/>
<id>urn:sha1:2361613206e66ce59cc0e08efa8d98ec15b84ed1</id>
<content type='text'>
All the users of of_irq_parse_raw pass in a raw interrupt specifier from
the device tree and expect it to be returned (possibly modified) in an
of_phandle_args structure. However, the primary function of
of_irq_parse_raw() is to check for translations due to the presence of
one or more interrupt-map properties. The actual placing of the data
into an of_phandle_args structure is trivial. If it is refactored to
accept an of_phandle_args structure directly, then it becomes possible
to consume of_phandle_args from other sources. This is important for an
upcoming patch that allows a device to be connected to more than one
interrupt parent. It also simplifies the code a bit.

The biggest complication with this patch is that the old version works
on the interrupt specifiers in __be32 form, but the of_phandle_args
structure is intended to carry it in the cpu-native version. A bit of
churn was required to make this work. In the end it results in tighter
code, so the churn is worth it.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>of/irq: simplify args to irq_create_of_mapping</title>
<updated>2013-10-24T10:42:57Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-09-15T15:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e6d30ab1e7d1281784672c0fc2ffa385cfb7279e'/>
<id>urn:sha1:e6d30ab1e7d1281784672c0fc2ffa385cfb7279e</id>
<content type='text'>
All the callers of irq_create_of_mapping() pass the contents of a struct
of_phandle_args structure to the function. Since all the callers already
have an of_phandle_args pointer, why not pass it directly to
irq_create_of_mapping()?

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>of/irq: Replace of_irq with of_phandle_args</title>
<updated>2013-10-24T10:42:51Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-09-15T15:39:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=530210c7814e83564c7ca7bca8192515042c0b63'/>
<id>urn:sha1:530210c7814e83564c7ca7bca8192515042c0b63</id>
<content type='text'>
struct of_irq and struct of_phandle_args are exactly the same structure.
This patch makes the kernel use of_phandle_args everywhere. This in
itself isn't a big deal, but it makes some follow-on patches simpler.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>of/irq: Rename of_irq_map_* functions to of_irq_parse_*</title>
<updated>2013-10-24T10:40:59Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-09-19T16:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0c02c8007ea5554d028f99fd3e29fc201fdeeab3'/>
<id>urn:sha1:0c02c8007ea5554d028f99fd3e29fc201fdeeab3</id>
<content type='text'>
The OF irq handling code has been overloading the term 'map' to refer to
both parsing the data in the device tree and mapping it to the internal
linux irq system. This is probably because the device tree does have the
concept of an 'interrupt-map' function for translating interrupt
references from one node to another, but 'map' is still confusing when
the primary purpose of some of the functions are to parse the DT data.

This patch renames all the of_irq_map_* functions to of_irq_parse_*
which makes it clear that there is a difference between the parsing
phase and the mapping phase. Kernel code can make use of just the
parsing or just the mapping support as needed by the subsystem.

The patch was generated mechanically with a handful of sed commands.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>of: clean-up ifdefs in of_irq.h</title>
<updated>2013-09-25T02:12:32Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-09-04T15:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0b8c960ffcc5bfc82d1a09ad931673e3a36c15a'/>
<id>urn:sha1:b0b8c960ffcc5bfc82d1a09ad931673e3a36c15a</id>
<content type='text'>
Much of of_irq.h is needlessly ifdef'ed. Clean this up and minimize the
amount ifdef'ed code. This fixes some  build warnings when CONFIG_OF
is not enabled (seen on i386 and x86_64):

include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]

Compile tested on i386, sparc and arm.

Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>of/irq: sparse fixes</title>
<updated>2012-10-17T20:53:02Z</updated>
<author>
<name>Kim Phillips</name>
<email>kim.phillips@freescale.com</email>
</author>
<published>2012-10-09T00:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d2e4151821dc4d1db414de287f6e3503c1718815'/>
<id>urn:sha1:d2e4151821dc4d1db414de287f6e3503c1718815</id>
<content type='text'>
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 *&lt;noident&gt;
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 *&lt;noident&gt;

Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>of/irq: Create stub for of_irq_find_parent when !CONFIG_OF</title>
<updated>2012-09-20T10:32:30Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2012-08-08T12:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62861095dc3f40594958f45257f2551c1d7e2655'/>
<id>urn:sha1:62861095dc3f40594958f45257f2551c1d7e2655</id>
<content type='text'>
of_irq_find_parent is a handy function to use outside the confines of
the Open Firmware subsystem. One such use-case is when the IRQ Domain
wishes to find an IRQ domain for a given device node. Currently it can
not take any notice of the 'interrupt-parent' property. Instead it
just uses the first IRQ controller as it climbs the Device Tree. If
we were to use this as a precursor the resultant controller is more
likely to be correct.

Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
