Re: [PATCH] ARM: Exynos: remove arm diagnostic and power register save/restore code

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

 



Hi,

On Tuesday, August 19, 2014 02:58:31 PM Chander Kashyap wrote:
> On Mon, Aug 11, 2014 at 11:52 AM, Chander Kashyap <k.chander@xxxxxxxxxxx> 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@xxxxxxxxxxx>
> > ---
> >  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?

Your cleanup patch won't apply to the current kernels becaouse
exynos_cpu_pm_notifier() has been removed.  Please resfresh it.

While refreshing it please rebase it on top of my PM_SLEEP=n build
fixes:

  http://www.mail-archive.com/linux-samsung-soc@xxxxxxxxxxxxxxx/msg35430.html

Please also update patch description to point to the generic code
that does arm diagnostic and power register save/restore code.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux