[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANqRtoSh0GvUws5hj9nZvVg4wZ0zDNB+-spuWt5RTVJUNe4h0A@mail.gmail.com>
Date: Fri, 17 Aug 2012 18:10:09 +0900
From: Magnus Damm <magnus.damm@...il.com>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Linux-sh list <linux-sh@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] ARM: shmobile: Add A4S cpuidle state on sh7372
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@...k.pl> 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@...k.pl>
> ---
[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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists