Re: [PATCH 2/5] ARM: EXYNOS: Remove SROM related register settings from mach-exynos

2015-08-20 Thread Pankaj Dubey

Hi Krzysztof,

On Wednesday 27 May 2015 05:26 PM, Krzysztof Kozlowski wrote:

W dniu 29.04.2015 o 17:38, Pankaj Dubey pisze:

As now we have dedicated driver for SROM controller, it will take care
of saving register banks during S2R so we can safely remove these
settings from mach-exynos.

Signed-off-by: Pankaj Dubey 
---
  arch/arm/mach-exynos/Kconfig   |  2 +
  arch/arm/mach-exynos/exynos.c  | 10 -
  arch/arm/mach-exynos/include/mach/map.h|  3 --
  arch/arm/mach-exynos/suspend.c | 20 +-
  arch/arm/plat-samsung/include/plat/map-s5p.h   |  1 -
  arch/arm/plat-samsung/include/plat/regs-srom.h | 54 --
  6 files changed, 4 insertions(+), 86 deletions(-)
  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-srom.h

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 603820e..e842b23 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -25,6 +25,8 @@ menuconfig ARCH_EXYNOS
select S5P_DEV_MFC
select SRAM
select MFD_SYSCON
+   select SOC_SAMSUNG
+   select EXYNOS_SROM


What about the difference of execution time? The suspend/resume of
device may not be called in the same time as previous syscore ops. Does
this have any impact?




I had tested it for S2R at that time on SMDK5250 board and it was fine. 
I do not noticed any issue in S2R, so I feel timing should not have any 
impact.


Thanks,
Pankaj Dubey


Best regards,
Krzysztof



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


Re: [PATCH 2/5] ARM: EXYNOS: Remove SROM related register settings from mach-exynos

2015-05-27 Thread Krzysztof Kozlowski
W dniu 29.04.2015 o 17:38, Pankaj Dubey pisze:
> As now we have dedicated driver for SROM controller, it will take care
> of saving register banks during S2R so we can safely remove these
> settings from mach-exynos.
> 
> Signed-off-by: Pankaj Dubey 
> ---
>  arch/arm/mach-exynos/Kconfig   |  2 +
>  arch/arm/mach-exynos/exynos.c  | 10 -
>  arch/arm/mach-exynos/include/mach/map.h|  3 --
>  arch/arm/mach-exynos/suspend.c | 20 +-
>  arch/arm/plat-samsung/include/plat/map-s5p.h   |  1 -
>  arch/arm/plat-samsung/include/plat/regs-srom.h | 54 
> --
>  6 files changed, 4 insertions(+), 86 deletions(-)
>  delete mode 100644 arch/arm/plat-samsung/include/plat/regs-srom.h
> 
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index 603820e..e842b23 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -25,6 +25,8 @@ menuconfig ARCH_EXYNOS
>   select S5P_DEV_MFC
>   select SRAM
>   select MFD_SYSCON
> + select SOC_SAMSUNG
> + select EXYNOS_SROM

What about the difference of execution time? The suspend/resume of
device may not be called in the same time as previous syscore ops. Does
this have any impact?

Best regards,
Krzysztof

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


[PATCH 2/5] ARM: EXYNOS: Remove SROM related register settings from mach-exynos

2015-04-29 Thread Pankaj Dubey
As now we have dedicated driver for SROM controller, it will take care
of saving register banks during S2R so we can safely remove these
settings from mach-exynos.

Signed-off-by: Pankaj Dubey 
---
 arch/arm/mach-exynos/Kconfig   |  2 +
 arch/arm/mach-exynos/exynos.c  | 10 -
 arch/arm/mach-exynos/include/mach/map.h|  3 --
 arch/arm/mach-exynos/suspend.c | 20 +-
 arch/arm/plat-samsung/include/plat/map-s5p.h   |  1 -
 arch/arm/plat-samsung/include/plat/regs-srom.h | 54 --
 6 files changed, 4 insertions(+), 86 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/include/plat/regs-srom.h

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 603820e..e842b23 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -25,6 +25,8 @@ menuconfig ARCH_EXYNOS
select S5P_DEV_MFC
select SRAM
select MFD_SYSCON
+   select SOC_SAMSUNG
+   select EXYNOS_SROM
help
  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
 
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index a140872..e422517 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -37,11 +37,6 @@ void __iomem *pmu_base_addr;
 
 static struct map_desc exynos4_iodesc[] __initdata = {
{
-   .virtual= (unsigned long)S5P_VA_SROMC,
-   .pfn= __phys_to_pfn(EXYNOS4_PA_SROMC),
-   .length = SZ_4K,
-   .type   = MT_DEVICE,
-   }, {
.virtual= (unsigned long)S5P_VA_CMU,
.pfn= __phys_to_pfn(EXYNOS4_PA_CMU),
.length = SZ_128K,
@@ -66,11 +61,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
 
 static struct map_desc exynos5_iodesc[] __initdata = {
{
-   .virtual= (unsigned long)S5P_VA_SROMC,
-   .pfn= __phys_to_pfn(EXYNOS5_PA_SROMC),
-   .length = SZ_4K,
-   .type   = MT_DEVICE,
-   }, {
.virtual= (unsigned long)S5P_VA_CMU,
.pfn= __phys_to_pfn(EXYNOS5_PA_CMU),
.length = 144 * SZ_1K,
diff --git a/arch/arm/mach-exynos/include/mach/map.h 
b/arch/arm/mach-exynos/include/mach/map.h
index de3ae59..ff39f02 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -33,9 +33,6 @@
 #define EXYNOS4_PA_COREPERI0x1050
 #define EXYNOS4_PA_L2CC0x10502000
 
-#define EXYNOS4_PA_SROMC   0x1257
-#define EXYNOS5_PA_SROMC   0x1225
-
 /* Compatibility UART */
 
 #define EXYNOS5440_PA_UART00x000B
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 6e5a335..2af5c76 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -30,7 +30,8 @@
 #include 
 
 #include 
-#include 
+
+#include 
 
 #include "common.h"
 #include "regs-pmu.h"
@@ -52,15 +53,6 @@ struct exynos_wkup_irq {
u32 mask;
 };
 
-static struct sleep_save exynos_core_save[] = {
-   /* SROM side */
-   SAVE_ITEM(S5P_SROM_BW),
-   SAVE_ITEM(S5P_SROM_BC0),
-   SAVE_ITEM(S5P_SROM_BC1),
-   SAVE_ITEM(S5P_SROM_BC2),
-   SAVE_ITEM(S5P_SROM_BC3),
-};
-
 struct exynos_pm_data {
const struct exynos_wkup_irq *wkup_irq;
unsigned int wake_disable_mask;
@@ -236,8 +228,6 @@ static void exynos_pm_prepare(void)
/* Set wake-up mask registers */
exynos_pm_set_wakeup_mask();
 
-   s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
exynos_pm_enter_sleep_mode();
 
/* ensure at least INFORM0 has the resume address */
@@ -268,8 +258,6 @@ static void exynos5420_pm_prepare(void)
/* Set wake-up mask registers */
exynos_pm_set_wakeup_mask();
 
-   s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
exynos_pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3);
/*
 * The cpu state needs to be saved and restored so that the
@@ -360,8 +348,6 @@ static void exynos_pm_resume(void)
/* For release retention */
exynos_pm_release_retention();
 
-   s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
if (cpuid == ARM_CPU_PART_CORTEX_A9)
scu_enable(S5P_VA_SCU);
 
@@ -427,8 +413,6 @@ static void exynos5420_pm_resume(void)
 
pmu_raw_writel(exynos_pmu_spare3, S5P_PMU_SPARE3);
 
-   s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
-
 early_wakeup:
 
tmp = pmu_raw_readl(EXYNOS5420_SFR_AXI_CGDIS1);
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h 
b/arch/arm/plat-samsung/include/plat/map-s5p.h
index f5cf2bd..e555769 100644
--- a/arch/arm/plat-samsung/include/plat/ma