SUPERH platform development
 help / color / mirror / Atom feed
* Re: [Linux-kernel] [RFC 2/6] shmobile: prepare to allow export of sh_pm_runtime_init()
@ 2014-03-17 11:35 Ben Hutchings
  0 siblings, 0 replies; only message in thread
From: Ben Hutchings @ 2014-03-17 11:35 UTC (permalink / raw)
  To: linux-sh

On Mon, 2014-03-17 at 11:15 +0000, Ben Dooks wrote:
> In a multi-platform kernel, we cannot simply add this as a initcall
> as it may be built and run on archtiectures other than the SHMOBILE
> so export the sh_pm_runtime_init() call to be used from the machine
> specific code.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/sh/pm_runtime.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
> index 5cfbd82..f4f8851 100644
> --- a/drivers/sh/pm_runtime.c
> +++ b/drivers/sh/pm_runtime.c
> @@ -42,16 +42,19 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
>  	.con_ids = { NULL, },
>  };
>  
> -static int __init sh_pm_runtime_init(void)
> +static bool default_pm_on;
> +
> +int __init sh_pm_runtime_init(void)
>  {
> +	default_pm_on = true;
>  	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
>  	return 0;
>  }
> -core_initcall(sh_pm_runtime_init);

This appears to break initialisation until 4/6 "ARM: shmobile: r8a7790:
call sh_pm_runtime_init()" is applied.  I think patches 2-4 must all be
folded together.

Ben.

>  static int __init sh_pm_runtime_late_init(void)
>  {
> -	pm_genpd_poweroff_unused();
> +	if (default_pm_on)
> +		pm_genpd_poweroff_unused();
>  	return 0;
>  }
>  late_initcall(sh_pm_runtime_late_init);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-17 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 11:35 [Linux-kernel] [RFC 2/6] shmobile: prepare to allow export of sh_pm_runtime_init() Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox