Re: [PATCH 05/17] omap4: pm: Initialise all the clockdomains to supported states

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Santosh Shilimkar <santosh.shilimkar@xxxxxx> writes:

> Initialise hardware supervised mode for all clockdomains if it's
> supported. Initiate sleep transition for other clockdomains,
> if they are not being used.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> Signed-off-by: Rajendra Nayak <rnayak@xxxxxx>
> Reviewed-by: Kevin Hilman <khilman@xxxxxx>
> ---
>  arch/arm/mach-omap2/pm44xx.c |   22 +++++++++++++++++++++-
>  1 files changed, 21 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
> index b142673..9a9dc41 100644
> --- a/arch/arm/mach-omap2/pm44xx.c
> +++ b/arch/arm/mach-omap2/pm44xx.c
> @@ -17,9 +17,11 @@
>  #include <linux/slab.h>
>  #include <plat/clock.h>
>  
> -#include "powerdomain.h"
>  #include <mach/omap4-common.h>
>  
> +#include "powerdomain.h"
> +#include "clockdomain.h"
> +
>  struct power_state {
>  	struct powerdomain *pwrdm;
>  	u32 next_state;
> @@ -74,6 +76,22 @@ static const struct platform_suspend_ops omap_pm_ops = {
>  };
>  #endif /* CONFIG_SUSPEND */
>  
> +/*
> + * Enable hardwarew supervised mode for all clockdomains if it's

typo: hardware

> + * supported. Initiate sleep transition for other clockdomains, if
> + * they are not used
> + */
> +static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
> +{
> +	if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
> +		clkdm_allow_idle(clkdm);
> +	else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
> +			atomic_read(&clkdm->usecount) == 0)
> +		clkdm_sleep(clkdm);
> +	return 0;
> +}
> +
> +
>  static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
>  {
>  	struct power_state *pwrst;
> @@ -116,6 +134,8 @@ static int __init omap4_pm_init(void)
>  	/* Enable autoidle for all clks which support it*/
>  	omap_clk_enable_autoidle();
>  
> +	(void) clkdm_for_each(clkdms_setup, NULL);
> +
>  	ret = omap4_mpuss_init();
>  	if (ret) {
>  		pr_err("Failed to initialise OMAP4 MPUSS\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux