Re: [PATCH] ARM: shmobile: Add A4S cpuidle state on sh7372

From: Magnus Damm
Date: Fri Aug 17 2012 - 05:10:08 EST


Hi Rafael,

Thanks for your patch. Please see below for my comment.

On Fri, Aug 17, 2012 at 5:10 AM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
>
> Add a "C5" cpuidle state to the SH7372 SoC connected to the A4S power
> domain in such a way that A4S may be turned off by cpuidle if all
> I/O devices in that domain have been suspended (or do not have
> attached drivers).
>
> This requires some reorganization of the initialization of SH7372
> power management which affects the the boards based on it, Mackerel
> and AP4EVB.
>
> Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
> ---

[snip]

> --- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
> +++ linux/arch/arm/mach-shmobile/pm-sh7372.c
> @@ -339,6 +339,21 @@ static void sh7372_enter_a3sm_common(int
> sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc));
> sh7372_enter_sysc(pllc0_on, 1 << 12);
> }
> +
> +static void sh7372_enter_a4s_common(int pllc0_on)
> +{
> + sh7372_intca_suspend();
> + sh7372_enter_sysc(pllc0_on, 1 << 10);
> + sh7372_intca_resume();
> +}
> +
> +static void sh7372_pm_setup_smfram(void)
> +{
> + memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
> + sh7372_set_reset_vector(SMFRAM);
> +}

I believe the reset vector is being setup dynamically depending on the
sleep mode, so you probably want to move sh7372_set_reset_vector()
into sh7372_enter_a4s_common().

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/