linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: k.chander@samsung.com (Chander Kashyap)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Exynos: remove arm diagnostic and power register save/restore code
Date: Tue, 19 Aug 2014 14:58:31 +0530	[thread overview]
Message-ID: <CADWw7OiqK+4_uXtPnkS4zL2nBMw08en9venrupFMfqrsWevVJw@mail.gmail.com> (raw)
In-Reply-To: <1407738165-10139-1-git-send-email-k.chander@samsung.com>

On Mon, Aug 11, 2014 at 11:52 AM, Chander Kashyap <k.chander@samsung.com> wrote:
> As save/restore of arm "diagnostic" and "power" registers is handled by
> generic code, so remove the same.
>
> Signed-off-by: Chander Kashyap <k.chander@samsung.com>
> ---
>  arch/arm/mach-exynos/pm.c |   54 ++-------------------------------------------
>  1 file changed, 2 insertions(+), 52 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index 18646b7..af99c55 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -134,45 +134,6 @@ void exynos_enter_aftr(void)
>         exynos_sys_powerdown_conf(SYS_AFTR);
>  }
>
> -/* For Cortex-A9 Diagnostic and Power control register */
> -static unsigned int save_arm_register[2];
> -
> -static void exynos_cpu_save_register(void)
> -{
> -       unsigned long tmp;
> -
> -       /* Save Power control register */
> -       asm ("mrc p15, 0, %0, c15, c0, 0"
> -            : "=r" (tmp) : : "cc");
> -
> -       save_arm_register[0] = tmp;
> -
> -       /* Save Diagnostic register */
> -       asm ("mrc p15, 0, %0, c15, c0, 1"
> -            : "=r" (tmp) : : "cc");
> -
> -       save_arm_register[1] = tmp;
> -}
> -
> -static void exynos_cpu_restore_register(void)
> -{
> -       unsigned long tmp;
> -
> -       /* Restore Power control register */
> -       tmp = save_arm_register[0];
> -
> -       asm volatile ("mcr p15, 0, %0, c15, c0, 0"
> -                     : : "r" (tmp)
> -                     : "cc");
> -
> -       /* Restore Diagnostic register */
> -       tmp = save_arm_register[1];
> -
> -       asm volatile ("mcr p15, 0, %0, c15, c0, 1"
> -                     : : "r" (tmp)
> -                     : "cc");
> -}
> -
>  static int exynos_cpu_suspend(unsigned long arg)
>  {
>  #ifdef CONFIG_CACHE_L2X0
> @@ -238,9 +199,6 @@ static int exynos_pm_suspend(void)
>         tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0);
>         pmu_raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION);
>
> -       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
> -               exynos_cpu_save_register();
> -
>         return 0;
>  }
>
> @@ -272,9 +230,6 @@ static void exynos_pm_resume(void)
>         if (exynos_pm_central_resume())
>                 goto early_wakeup;
>
> -       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
> -               exynos_cpu_restore_register();
> -
>         /* For release retention */
>
>         pmu_raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION);
> @@ -376,19 +331,14 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
>
>         switch (cmd) {
>         case CPU_PM_ENTER:
> -               if (cpu == 0) {
> +               if (cpu == 0)
>                         exynos_pm_central_suspend();
> -                       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
> -                               exynos_cpu_save_register();
> -               }
>                 break;
>
>         case CPU_PM_EXIT:
>                 if (cpu == 0) {
> -                       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
> +                       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
>                                 scu_enable(S5P_VA_SCU);
> -                               exynos_cpu_restore_register();
> -                       }
>                         exynos_pm_central_resume();
>                 }
>                 break;

Hi Kukjin,
Can you take this patch?
> --
> 1.7.9.5
>

  reply	other threads:[~2014-08-19  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11  6:22 [PATCH] ARM: Exynos: remove arm diagnostic and power register save/restore code Chander Kashyap
2014-08-19  9:28 ` Chander Kashyap [this message]
2014-08-19  9:52   ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADWw7OiqK+4_uXtPnkS4zL2nBMw08en9venrupFMfqrsWevVJw@mail.gmail.com \
    --to=k.chander@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).