From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()
Date: Tue, 3 Jun 2014 14:12:31 +0300 [thread overview]
Message-ID: <538DAD9F.1030008@ti.com> (raw)
In-Reply-To: <20140603092050.F0FD0C40D3B@trevor.secretlab.ca>
Hi,
On 06/03/2014 12:20 PM, Grant Likely wrote:
> On Mon, 02 Jun 2014 07:48:59 -0700, Kevin Hilman <khilman@linaro.org> wrote:
>> Grygorii Strashko <grygorii.strashko@ti.com> writes:
>>
>>> Hi All,
>>>
>>> On 05/28/2014 12:03 PM, Grant Likely wrote:
>>
>> [...]
>>
>>>> The bisected patch causes platform_get_irq() to always parse the
>>>> devicetree to obtain the irq instead of using a precalculated value in
>>>> the platform_device. There are two possible scenarios for this problem
>>>> that I can think of:
>>>> 1) Platform_get_irq() is getting called multiple times (which would
>>>> happen on a deferred probe) but the setup code isn't handling it
>>>> properly, like trying to request the GPIO more than once
>>>> 2) the platform_device was preloaded with an irq number that differs
>>>> from what is determined when parsing the tree. This would happen if a
>>>> platform_device was created manually.
>>>>
>>>
>>> Could anyone try attached patch? It has to improve situation, but it
>>> might not fix all problems (see my previous e-mail).
>>
>> I can confirm it makes the STE Snowball boot again on top of next-20150602.
>>
>>> From 4a41912dba648c935982274966426fa430fd5aa4 Mon Sep 17 00:00:00 2001
>>> From: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Date: Wed, 28 May 2014 12:53:34 +0300
>>> Subject: [PATCH] mfd: ab8500: fix dt irq mapping
>>>
>>> The AD8500 defines itself as interrupt-controller in DT,
>>> but it doesn't assign DT node to IRQ domain when creates it.
>>> As result, of_irq_xx() helpers don't work because they can't
>>> find necessary IRQ domain.
>>>
>>> Hence, fix it by assigning AD8500 core device DT node to IRQ
>>> domain when it's created.
>>>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>
>> Tested-by: Kevin Hilman <khilman@linaro.org>
Thanks for testing it.
>
> So is that it, or were there other problems? If it is then you can add
This is minimal solution and some sub-devices of ab8500 MFD may still
not work.
For example, ab8500-debugfs may not work (ste-dbx5x0.dtsi):
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
};
and its DT definition may need to be updated to explicitly define IRQs,
smth like this:
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
interrupts = <0 IRQ_TYPE_LEVEL_HIGH
111 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "IRQ_FIRST", "IRQ_LAST";
};
> my acked-by when applying.
>
> Acked-by: Grant Likely <grant.likely@linaro.org>
>
I've reposted this patch already:
https://lkml.org/lkml/2014/6/2/379
Regards,
-grygorii
WARNING: multiple messages have this Message-ID (diff)
From: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
To: Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
linux-arm-kernel
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()
Date: Tue, 3 Jun 2014 14:12:31 +0300 [thread overview]
Message-ID: <538DAD9F.1030008@ti.com> (raw)
In-Reply-To: <20140603092050.F0FD0C40D3B-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
Hi,
On 06/03/2014 12:20 PM, Grant Likely wrote:
> On Mon, 02 Jun 2014 07:48:59 -0700, Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>> Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org> writes:
>>
>>> Hi All,
>>>
>>> On 05/28/2014 12:03 PM, Grant Likely wrote:
>>
>> [...]
>>
>>>> The bisected patch causes platform_get_irq() to always parse the
>>>> devicetree to obtain the irq instead of using a precalculated value in
>>>> the platform_device. There are two possible scenarios for this problem
>>>> that I can think of:
>>>> 1) Platform_get_irq() is getting called multiple times (which would
>>>> happen on a deferred probe) but the setup code isn't handling it
>>>> properly, like trying to request the GPIO more than once
>>>> 2) the platform_device was preloaded with an irq number that differs
>>>> from what is determined when parsing the tree. This would happen if a
>>>> platform_device was created manually.
>>>>
>>>
>>> Could anyone try attached patch? It has to improve situation, but it
>>> might not fix all problems (see my previous e-mail).
>>
>> I can confirm it makes the STE Snowball boot again on top of next-20150602.
>>
>>> From 4a41912dba648c935982274966426fa430fd5aa4 Mon Sep 17 00:00:00 2001
>>> From: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
>>> Date: Wed, 28 May 2014 12:53:34 +0300
>>> Subject: [PATCH] mfd: ab8500: fix dt irq mapping
>>>
>>> The AD8500 defines itself as interrupt-controller in DT,
>>> but it doesn't assign DT node to IRQ domain when creates it.
>>> As result, of_irq_xx() helpers don't work because they can't
>>> find necessary IRQ domain.
>>>
>>> Hence, fix it by assigning AD8500 core device DT node to IRQ
>>> domain when it's created.
>>>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
>>
>> Tested-by: Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Thanks for testing it.
>
> So is that it, or were there other problems? If it is then you can add
This is minimal solution and some sub-devices of ab8500 MFD may still
not work.
For example, ab8500-debugfs may not work (ste-dbx5x0.dtsi):
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
};
and its DT definition may need to be updated to explicitly define IRQs,
smth like this:
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
interrupts = <0 IRQ_TYPE_LEVEL_HIGH
111 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "IRQ_FIRST", "IRQ_LAST";
};
> my acked-by when applying.
>
> Acked-by: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>
I've reposted this patch already:
https://lkml.org/lkml/2014/6/2/379
Regards,
-grygorii
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Grant Likely <grant.likely@linaro.org>,
Kevin Hilman <khilman@linaro.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
Linus Walleij <linus.walleij@linaro.org>,
Lee Jones <lee.jones@linaro.org>, Rob Herring <robh@kernel.org>,
Russell King <linux@arm.linux.org.uk>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Tony Lindgren <tony@atomide.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, Olof Johansson <olof@lixom.net>,
Thierry Reding <thierry.reding@gmail.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()
Date: Tue, 3 Jun 2014 14:12:31 +0300 [thread overview]
Message-ID: <538DAD9F.1030008@ti.com> (raw)
In-Reply-To: <20140603092050.F0FD0C40D3B@trevor.secretlab.ca>
Hi,
On 06/03/2014 12:20 PM, Grant Likely wrote:
> On Mon, 02 Jun 2014 07:48:59 -0700, Kevin Hilman <khilman@linaro.org> wrote:
>> Grygorii Strashko <grygorii.strashko@ti.com> writes:
>>
>>> Hi All,
>>>
>>> On 05/28/2014 12:03 PM, Grant Likely wrote:
>>
>> [...]
>>
>>>> The bisected patch causes platform_get_irq() to always parse the
>>>> devicetree to obtain the irq instead of using a precalculated value in
>>>> the platform_device. There are two possible scenarios for this problem
>>>> that I can think of:
>>>> 1) Platform_get_irq() is getting called multiple times (which would
>>>> happen on a deferred probe) but the setup code isn't handling it
>>>> properly, like trying to request the GPIO more than once
>>>> 2) the platform_device was preloaded with an irq number that differs
>>>> from what is determined when parsing the tree. This would happen if a
>>>> platform_device was created manually.
>>>>
>>>
>>> Could anyone try attached patch? It has to improve situation, but it
>>> might not fix all problems (see my previous e-mail).
>>
>> I can confirm it makes the STE Snowball boot again on top of next-20150602.
>>
>>> From 4a41912dba648c935982274966426fa430fd5aa4 Mon Sep 17 00:00:00 2001
>>> From: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Date: Wed, 28 May 2014 12:53:34 +0300
>>> Subject: [PATCH] mfd: ab8500: fix dt irq mapping
>>>
>>> The AD8500 defines itself as interrupt-controller in DT,
>>> but it doesn't assign DT node to IRQ domain when creates it.
>>> As result, of_irq_xx() helpers don't work because they can't
>>> find necessary IRQ domain.
>>>
>>> Hence, fix it by assigning AD8500 core device DT node to IRQ
>>> domain when it's created.
>>>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>
>> Tested-by: Kevin Hilman <khilman@linaro.org>
Thanks for testing it.
>
> So is that it, or were there other problems? If it is then you can add
This is minimal solution and some sub-devices of ab8500 MFD may still
not work.
For example, ab8500-debugfs may not work (ste-dbx5x0.dtsi):
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
};
and its DT definition may need to be updated to explicitly define IRQs,
smth like this:
ab8500-debugfs {
compatible = "stericsson,ab8500-debug";
interrupts = <0 IRQ_TYPE_LEVEL_HIGH
111 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "IRQ_FIRST", "IRQ_LAST";
};
> my acked-by when applying.
>
> Acked-by: Grant Likely <grant.likely@linaro.org>
>
I've reposted this patch already:
https://lkml.org/lkml/2014/6/2/379
Regards,
-grygorii
next prev parent reply other threads:[~2014-06-03 11:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 10:42 [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname() Grygorii Strashko
2014-05-20 10:42 ` Grygorii Strashko
2014-05-20 10:42 ` Grygorii Strashko
2014-05-23 8:03 ` Grant Likely
2014-05-23 8:03 ` Grant Likely
2014-05-23 8:03 ` Grant Likely
2014-05-27 20:23 ` Kevin Hilman
2014-05-27 20:23 ` Kevin Hilman
2014-05-27 20:23 ` Kevin Hilman
2014-05-28 0:37 ` Rob Herring
2014-05-28 0:37 ` Rob Herring
2014-05-28 7:18 ` Lee Jones
2014-05-28 7:18 ` Lee Jones
2014-05-28 7:18 ` Lee Jones
2014-05-28 8:25 ` Linus Walleij
2014-05-28 8:25 ` Linus Walleij
2014-05-28 8:25 ` Linus Walleij
2014-05-28 8:49 ` Chen-Yu Tsai
2014-05-28 8:49 ` Chen-Yu Tsai
2014-05-28 9:03 ` Grant Likely
2014-05-28 9:03 ` Grant Likely
2014-05-28 9:03 ` Grant Likely
2014-05-28 10:07 ` Grygorii Strashko
2014-05-28 10:07 ` Grygorii Strashko
2014-05-28 10:07 ` Grygorii Strashko
2014-06-02 14:48 ` Kevin Hilman
2014-06-02 14:48 ` Kevin Hilman
2014-06-02 14:48 ` Kevin Hilman
2014-06-03 9:20 ` Grant Likely
2014-06-03 9:20 ` Grant Likely
2014-06-03 9:20 ` Grant Likely
2014-06-03 11:12 ` Grygorii Strashko [this message]
2014-06-03 11:12 ` Grygorii Strashko
2014-06-03 11:12 ` Grygorii Strashko
2014-06-11 14:04 ` Linus Walleij
2014-06-11 14:04 ` Linus Walleij
2014-06-11 14:04 ` Linus Walleij
2014-05-28 8:39 ` Grant Likely
2014-05-28 8:39 ` Grant Likely
2014-05-28 8:39 ` Grant Likely
2014-05-28 9:49 ` Grygorii Strashko
2014-05-28 9:49 ` Grygorii Strashko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=538DAD9F.1030008@ti.com \
--to=grygorii.strashko@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.