lkml.org 
[lkml]   [2013]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: early init dt for earlyprintk (was Re: [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART)
On Monday 14 January 2013 03:18 PM, James Hogan wrote:
> Hi Vineet
>
> On 14/01/13 07:35, Vineet Gupta wrote:
>> 2. We really need a Documentation/dt-for-new-linux-arches.txt, as the existing
>> refs - while very helpful - fail to mention subtleties such as you absolutely need
>> a intc instance and a default irq domain ..... before the driver can start using
>> the DT.
>
> Sounds like a good idea. I'm curious about what you say about default
> IRQ domains though. Do you mean irq_set_default_host? In what way is
> that required to use DT?
>
> Cheers
> James
>

Nope, the fact that we need a irq_domain_add_*( ) call corresponding to atleast
one interrupt-controller node in the DT. In absence of that, the following
callstack returns - with RESOURCE_IRQ unpopulated - causing driver to eventually
fail the probe.

of_platform_populate
...
of_irq_to_resource
irq_of_parse_and_map
irq_create_of_mapping -> Needs "some" irq domain.

Prior to introducing DT in ARC Port, I didn't have any of CONFIG_IRQ_DOMAIN and
still it used to work fine. Enabling CONFIG_OF forced me to enable
CONFIG_IRQ_DOMAIN (merely to resolve link errors) but I had no clue (call me
stupid if you will) that I needed an actual domain setup.

The irq_set_default_host( ) is a nice design pattern though which avoids exporting
the root domain outside of the specific compilation unit.

-Vineet


\
 
 \ /
  Last update: 2013-01-14 11:43    [W:0.118 / U:2.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site