Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c793fa3 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'samsung-pm-2' of...

Merge tag 'samsung-pm-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup3

Merge "Samsung PM related 2nd updates for v3.15" from Kukjin Kim:

From Tomasz Figa <t.figa@samsung.com>:
Current Samsung PM code is heavily unprepared for multiplatform
systems. The design implies accessing functions and global
variables defined in particular mach- subdirectory from common
code in plat-, which is not allowed when building ARCH_MULTIPLATFORM.
In addition there is a lot of forced code unification, which makes
common function handle any possible quirks of all supported SoCs.
In the end this design turned out to not work too well, ending with
a lot of empty functions exported from mach-, just because code in
common pm.c calls them. Moreover, recent trend of moving lower level
suspend/resume code to proper drivers, like pinctrl or clk, made a
lot of code there redundant, especially on DT-only platforms like
Exynos.

Note that this branch is based on previous tags/samsung-pm-1 and merge
tags/samsung-cleanup-2 because of fix build error from recent changes
of <linux/serial_s3c.h>

* tag 'samsung-pm-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

:
  ARM: EXYNOS: Fix compilation error in cpuidle.c
  ARM: S5P64X0: Explicitly include linux/serial_s3c.h in mach/pm-core.h
  ARM: S3C64XX: Fix build for implicit serial_s3c.h inclusion
  serial: s3c: Fix build of header without serial_core.h preinclusion
  ARM: EXYNOS: Allow wake-up using GIC interrupts
  ARM: EXYNOS: Stop using legacy Samsung PM code
  ARM: EXYNOS: Remove PM initcalls and useless indirection
  ARM: EXYNOS: Fix abuse of CONFIG_PM
  ARM: SAMSUNG: Move s3c_pm_check_* prototypes to plat/pm-common.h
  ARM: SAMSUNG: Move common save/restore helpers to separate file
  ARM: SAMSUNG: Move Samsung PM debug code into separate file
  ARM: SAMSUNG: Consolidate PM debug functions
  ARM: SAMSUNG: Use debug_ll_addr() to get UART base address
  ARM: SAMSUNG: Save UART DIVSLOT register based on SoC type
  ARM: SAMSUNG: Add soc_is_s3c2410() helper
  ARM: EXYNOS: Do not resume l2x0 if not enabled before suspend

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents c441ab93 8dec067d
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ config ARCH_EXYNOS4
	select HAVE_SMP
	select MIGHT_HAVE_CACHE_L2X0
	select PINCTRL
	select PM_GENERIC_DOMAINS if PM
	select PM_GENERIC_DOMAINS if PM_RUNTIME
	select S5P_DEV_MFC
	help
	  Samsung EXYNOS4 SoCs based systems
@@ -47,10 +47,8 @@ config CPU_EXYNOS4210
	default y
	depends on ARCH_EXYNOS4
	select ARCH_HAS_BANDGAP
	select ARM_CPU_SUSPEND if PM
	select ARM_CPU_SUSPEND if PM_SLEEP
	select PINCTRL_EXYNOS
	select S5P_PM if PM
	select S5P_SLEEP if PM
	select SAMSUNG_DMADEV
	help
	  Enable EXYNOS4210 CPU support
@@ -61,8 +59,6 @@ config SOC_EXYNOS4212
	depends on ARCH_EXYNOS4
	select ARCH_HAS_BANDGAP
	select PINCTRL_EXYNOS
	select S5P_PM if PM
	select S5P_SLEEP if PM
	select SAMSUNG_DMADEV
	help
	  Enable EXYNOS4212 SoC support
@@ -83,9 +79,7 @@ config SOC_EXYNOS5250
	depends on ARCH_EXYNOS5
	select ARCH_HAS_BANDGAP
	select PINCTRL_EXYNOS
	select PM_GENERIC_DOMAINS if PM
	select S5P_PM if PM
	select S5P_SLEEP if PM
	select PM_GENERIC_DOMAINS if PM_RUNTIME
	select S5P_DEV_MFC
	select SAMSUNG_DMADEV
	help
@@ -95,9 +89,7 @@ config SOC_EXYNOS5420
	bool "SAMSUNG EXYNOS5420"
	default y
	depends on ARCH_EXYNOS5
	select PM_GENERIC_DOMAINS if PM
	select S5P_PM if PM
	select S5P_SLEEP if PM
	select PM_GENERIC_DOMAINS if PM_RUNTIME
	help
	  Enable EXYNOS5420 SoC support

+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ obj- :=

obj-$(CONFIG_ARCH_EXYNOS)	+= common.o

obj-$(CONFIG_S5P_PM)		+= pm.o
obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o

+1 −0
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ void __init exynos_init_late(void)
		return;

	pm_genpd_poweroff_unused();
	exynos_pm_init();
}

static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
+14 −0
Original line number Diff line number Diff line
@@ -27,6 +27,20 @@ void exynos_init_late(void);

void exynos_firmware_init(void);

#ifdef CONFIG_PINCTRL_EXYNOS
extern u32 exynos_get_eint_wake_mask(void);
#else
static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; }
#endif

#ifdef CONFIG_PM_SLEEP
extern void __init exynos_pm_init(void);
#else
static inline void exynos_pm_init(void) {}
#endif

extern void exynos_cpu_resume(void);

extern struct smp_operations exynos_smp_ops;

extern void exynos_cpu_die(unsigned int cpu);
+1 −2
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include <plat/cpu.h>
#include <plat/pm.h>

#include <mach/pm-core.h>
#include <mach/map.h>

#include "common.h"
@@ -127,7 +126,7 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
	/* Set value of power down register for aftr mode */
	exynos_sys_powerdown_conf(SYS_AFTR);

	__raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
	__raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
	__raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);

	save_cpu_arch_register();
Loading