All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: pm.c correct the initcall for an early init.
@ 2010-12-01 11:01 Thara Gopinath
  2010-12-02 13:33 ` Kevin Hilman
  0 siblings, 1 reply; 5+ messages in thread
From: Thara Gopinath @ 2010-12-01 11:01 UTC (permalink / raw)
  To: linux-omap; +Cc: khilman, Thara Gopinath

omap2_common_pm_init is the API where generic system devices like
mpu, l3 etc get initialized. This has to happen really early on
during the boot and not at a later time. This is especially important
with the new opp changes as these devices need to be built before the
opp tables init happen. Today both are device initcalls and it works
just because of the order of compilation

Signed-off-by: Thara Gopinath <thara@ti.com>
---
 arch/arm/mach-omap2/pm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 59ca03b..6ec2ee1 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -143,5 +143,5 @@ static int __init omap2_common_pm_init(void)
 
 	return 0;
 }
-device_initcall(omap2_common_pm_init);
+postcore_initcall(omap2_common_pm_init);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
  2010-12-01 11:01 [PATCH] OMAP: pm.c correct the initcall for an early init Thara Gopinath
@ 2010-12-02 13:33 ` Kevin Hilman
  2010-12-03  8:47   ` Gopinath, Thara
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2010-12-02 13:33 UTC (permalink / raw)
  To: Thara Gopinath; +Cc: linux-omap

Thara Gopinath <thara@ti.com> writes:

> omap2_common_pm_init is the API where generic system devices like
> mpu, l3 etc get initialized. This has to happen really early on
> during the boot and not at a later time. This is especially important
> with the new opp changes as these devices need to be built before the
> opp tables init happen. Today both are device initcalls and it works
> just because of the order of compilation

Why postcore?  there are several other inicalls earlier than
device_initcall.

Also, does this actually work?  Is the driver core initialized at
postcore_initcall time such that omap_devices w/platform_device
creation actually works?

Kevin

> Signed-off-by: Thara Gopinath <thara@ti.com>
> ---
>  arch/arm/mach-omap2/pm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 59ca03b..6ec2ee1 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -143,5 +143,5 @@ static int __init omap2_common_pm_init(void)
>  
>  	return 0;
>  }
> -device_initcall(omap2_common_pm_init);
> +postcore_initcall(omap2_common_pm_init);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] OMAP: pm.c correct the initcall for an early init.
  2010-12-02 13:33 ` Kevin Hilman
@ 2010-12-03  8:47   ` Gopinath, Thara
  2010-12-14  1:06     ` Kevin Hilman
  0 siblings, 1 reply; 5+ messages in thread
From: Gopinath, Thara @ 2010-12-03  8:47 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap@vger.kernel.org



>>-----Original Message-----
>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>Sent: Thursday, December 02, 2010 7:03 PM
>>To: Gopinath, Thara
>>Cc: linux-omap@vger.kernel.org
>>Subject: Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
>>
>>Thara Gopinath <thara@ti.com> writes:
>>
>>> omap2_common_pm_init is the API where generic system devices like
>>> mpu, l3 etc get initialized. This has to happen really early on
>>> during the boot and not at a later time. This is especially important
>>> with the new opp changes as these devices need to be built before the
>>> opp tables init happen. Today both are device initcalls and it works
>>> just because of the order of compilation
>>
>>Why postcore?  there are several other inicalls earlier than
>>device_initcall.

Because the init in omap_device is a core_initcall. With respect
to opp layer, making this anything above device_initcall will work. But
then tomorrow some other module needs these generic devices in their init,
we will again have to bump up the init priority of this fn.
It is a good thing to do this early on in the boot cycle rather
than later.

>>
>>Also, does this actually work?  Is the driver core initialized at
>>postcore_initcall time such that omap_devices w/platform_device
>>creation actually works?

Yes by post_initcall the omap_device initializations would
have happened. In fact these initializations happen as
core_initcall.

>>
>>Kevin
>>
>>> Signed-off-by: Thara Gopinath <thara@ti.com>
>>> ---
>>>  arch/arm/mach-omap2/pm.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>>> index 59ca03b..6ec2ee1 100644
>>> --- a/arch/arm/mach-omap2/pm.c
>>> +++ b/arch/arm/mach-omap2/pm.c
>>> @@ -143,5 +143,5 @@ static int __init omap2_common_pm_init(void)
>>>
>>>  	return 0;
>>>  }
>>> -device_initcall(omap2_common_pm_init);
>>> +postcore_initcall(omap2_common_pm_init);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
  2010-12-03  8:47   ` Gopinath, Thara
@ 2010-12-14  1:06     ` Kevin Hilman
  2010-12-15 15:38       ` Gopinath, Thara
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2010-12-14  1:06 UTC (permalink / raw)
  To: Gopinath, Thara; +Cc: linux-omap@vger.kernel.org

"Gopinath, Thara" <thara@ti.com> writes:

>>>-----Original Message-----
>>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>>Sent: Thursday, December 02, 2010 7:03 PM
>>>To: Gopinath, Thara
>>>Cc: linux-omap@vger.kernel.org
>>>Subject: Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
>>>
>>>Thara Gopinath <thara@ti.com> writes:
>>>
>>>> omap2_common_pm_init is the API where generic system devices like
>>>> mpu, l3 etc get initialized. This has to happen really early on
>>>> during the boot and not at a later time. This is especially important
>>>> with the new opp changes as these devices need to be built before the
>>>> opp tables init happen. Today both are device initcalls and it works
>>>> just because of the order of compilation
>>>
>>>Why postcore?  there are several other inicalls earlier than
>>>device_initcall.
>
> Because the init in omap_device is a core_initcall. With respect
> to opp layer, making this anything above device_initcall will work. But
> then tomorrow some other module needs these generic devices in their init,
> we will again have to bump up the init priority of this fn.
> It is a good thing to do this early on in the boot cycle rather
> than later.

OK, please describe this in more detail the changelog.

Thanks,

Kevin


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] OMAP: pm.c correct the initcall for an early init.
  2010-12-14  1:06     ` Kevin Hilman
@ 2010-12-15 15:38       ` Gopinath, Thara
  0 siblings, 0 replies; 5+ messages in thread
From: Gopinath, Thara @ 2010-12-15 15:38 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap@vger.kernel.org



>>-----Original Message-----
>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>Sent: Tuesday, December 14, 2010 6:37 AM
>>To: Gopinath, Thara
>>Cc: linux-omap@vger.kernel.org
>>Subject: Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
>>
>>"Gopinath, Thara" <thara@ti.com> writes:
>>
>>>>>-----Original Message-----
>>>>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>>>>Sent: Thursday, December 02, 2010 7:03 PM
>>>>>To: Gopinath, Thara
>>>>>Cc: linux-omap@vger.kernel.org
>>>>>Subject: Re: [PATCH] OMAP: pm.c correct the initcall for an early init.
>>>>>
>>>>>Thara Gopinath <thara@ti.com> writes:
>>>>>
>>>>>> omap2_common_pm_init is the API where generic system devices like
>>>>>> mpu, l3 etc get initialized. This has to happen really early on
>>>>>> during the boot and not at a later time. This is especially important
>>>>>> with the new opp changes as these devices need to be built before the
>>>>>> opp tables init happen. Today both are device initcalls and it works
>>>>>> just because of the order of compilation
>>>>>
>>>>>Why postcore?  there are several other inicalls earlier than
>>>>>device_initcall.
>>>
>>> Because the init in omap_device is a core_initcall. With respect
>>> to opp layer, making this anything above device_initcall will work. But
>>> then tomorrow some other module needs these generic devices in their
>>init,
>>> we will again have to bump up the init priority of this fn.
>>> It is a good thing to do this early on in the boot cycle rather
>>> than later.
>>
>>OK, please describe this in more detail the changelog.
Ok Will repost 

Regards
Thara


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-15 15:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 11:01 [PATCH] OMAP: pm.c correct the initcall for an early init Thara Gopinath
2010-12-02 13:33 ` Kevin Hilman
2010-12-03  8:47   ` Gopinath, Thara
2010-12-14  1:06     ` Kevin Hilman
2010-12-15 15:38       ` Gopinath, Thara

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.