From: s-anna@ti•com (Suman Anna)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc
Date: Mon, 5 Jan 2015 13:53:48 -0600 [thread overview]
Message-ID: <54AAEBCC.2030900@ti.com> (raw)
In-Reply-To: <54AA4CD4.40105@ti.com>
On 01/05/2015 02:35 AM, Lokesh Vutla wrote:
> Hi Paul,
> On Saturday 03 January 2015 02:40 AM, Paul Walmsley wrote:
>> + Suman, lakml
>>
>> Hi Roger
>>
>> On Thu, 18 Dec 2014, Roger Quadros wrote:
>>
>>> Fixing up Paul's email id.
>>>
>>> cheers,
>>> -roger
>>>
>>> On 18/12/14 17:49, Roger Quadros wrote:
>>>> There are quite a few hwmods that don't have sysconfig register and so
>>>> _find_mpu_rt_port(oh) will return NULL thus preventing ready state check
>>>> on those modules after the module is enabled.
>>
>> Hmm. Any IP block that exposes registers that are accessible by the MPU
>> should have an MPU register target port, even if there's no SYSCONFIG
>> register. And if an IP block doesn't have registers that are accessible
>> from the MPU, then there shouldn't be much point to waiting for the module
>> to become ready.
>>
>> Looks like the real problem is the test for oh->class->sysc before the
>> call to _init_mpu_rt_base(). That was introduced by commit 6423d6df1440
>> ("ARM: OMAP2+: hwmod: check for module address space during init"). It's
>> not clear to me why that test was added, since _init_mpu_rt_base() doesn't
>> do anything with oh->class->sysc or SYSCONFIG registers.
> This was introduced by commit
> 97597b962529 (ARM: OMAP2+: hwmod: Don't call _init_mpu_rt_base if no sysc)
That's right, the test was present even before 6423d6df1440, I merely
made this a block.
> Patch description states that "there are few hwmod which doesn't have sysconfig registers and hence
> no need to ioremap() them in early init code".
> Isn't this correct?
> May be a dumb question: If IP doesn't have sysconfig, is there any case that hwmod does
> access the register address space of that IP? Why do we need to enable MPU register target port?
>
> Thanks and regards,
> Lokesh
>
>>
>> Could you please test the following patch?
>> I don't have an AM437x-gp-evm.
>>
>>
>> - Paul
>>
>> ---
>> arch/arm/mach-omap2/omap_hwmod.c | 12 ++++--------
>> 1 file changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
>> index cbb908dc5cf0..ce6d11f3eda7 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -2451,14 +2451,10 @@ static int __init _init(struct omap_hwmod *oh, void *data)
>> oh->name, np->name);
>> }
>>
>> - if (oh->class->sysc) {
>> - r = _init_mpu_rt_base(oh, NULL, index, np);
>> - if (r < 0) {
>> - WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n",
>> - oh->name);
>> - return 0;
>> - }
>> - }
>> + r = _init_mpu_rt_base(oh, NULL, index, np);
>> + if (r < 0)
>> + pr_debug("omap_hwmod: %s: doesn't have mpu register target base\n",
>> + oh->name);
>>
>> r = _init_clocks(oh, NULL);
>> if (r < 0) {
>>
>
next prev parent reply other threads:[~2015-01-05 19:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1418917790-1791-1-git-send-email-rogerq@ti.com>
[not found] ` <5492F84E.7020706@ti.com>
2015-01-02 21:10 ` [PATCH] ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc Paul Walmsley
2015-01-05 8:35 ` Lokesh Vutla
2015-01-05 19:53 ` Suman Anna [this message]
2015-01-05 22:19 ` Paul Walmsley
2015-01-05 22:19 ` Paul Walmsley
2015-01-05 22:31 ` santosh.shilimkar at oracle.com
2015-01-06 2:04 ` Paul Walmsley
2015-01-06 8:14 ` Lokesh Vutla
2015-01-06 17:14 ` Suman Anna
2015-01-06 17:27 ` Suman Anna
2015-01-06 22:10 ` Suman Anna
2015-01-13 23:45 ` Paul Walmsley
2015-01-13 23:29 ` Paul Walmsley
2015-01-14 1:56 ` Suman Anna
2015-01-07 11:20 ` Roger Quadros
2015-01-13 23:46 ` Paul Walmsley
2015-01-14 12:26 ` Roger Quadros
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=54AAEBCC.2030900@ti.com \
--to=s-anna@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox