Skip to content

Commit

Permalink
Merge tag 'samsung-cleanup-2' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/kgene/linux-samsung into next/cleanup

From Kukjin Kim:
Samsung cleanup 2nd for v3.14
- remove <mach/regs-clock.h> for exynos
- remove <mach/regs-irq.h> for exynos
- local <mach/regs-pmu.h> into mach-exynos
- select PM_GENERIC_DOMAINS for ARCH_EXYNOS4
  instead of each SOC_EXYNOS4XXX in Kconfig
- call pm_genpd_poweroff_unused() instead of via
  exynos_pm_late_initcall() because no need to
  handle whether CONFIG_PM_GENERIC_DOMAINS is enalbed

* tag 'samsung-cleanup-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Kill exynos_pm_late_initcall()
  ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4
  PM / devfreq: use inclusion <mach/map.h> instead of <plat/map-s5p.h>
  ARM: EXYNOS: remove <mach/regs-clock.h> for exynos
  ARM: EXYNOS: local definitions for cpuidle.c into mach-exynos dir
  cpufreq: exynos: move definitions for exynos-cpufreq into drivers/cpufreq/
  ARM: EXYNOS: local definitions for pm.c into mach-exynos dir
  PM / devfreq: move definitions for exynos4_bus into drivers/devfreq
  ARM: EXYNOS: cleanup <mach/regs-clock.h>
  ARM: EXYNOS: cleanup <mach/regs-irq.h>
  ARM: EXYNOS: local regs-pmu.h header file
  ARM: EXYNOS: remove inclusion <mach/regs-pmu.h> into another headers
  ARM: EXYNOS: cleanup <mach/regs-pmu.h>

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Dec 28, 2013
2 parents e7d248f + 1fd3cbc commit 6eb5c9d
Show file tree
Hide file tree
Showing 22 changed files with 204 additions and 482 deletions.
4 changes: 1 addition & 3 deletions arch/arm/mach-exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config ARCH_EXYNOS4
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
select PINCTRL
select PM_GENERIC_DOMAINS if PM
select S5P_DEV_MFC
help
Samsung EXYNOS4 SoCs based systems
Expand All @@ -48,7 +49,6 @@ config CPU_EXYNOS4210
select ARCH_HAS_BANDGAP
select ARM_CPU_SUSPEND if PM
select PINCTRL_EXYNOS
select PM_GENERIC_DOMAINS if PM
select S5P_PM if PM
select S5P_SLEEP if PM
select SAMSUNG_DMADEV
Expand All @@ -61,7 +61,6 @@ config SOC_EXYNOS4212
depends on ARCH_EXYNOS4
select ARCH_HAS_BANDGAP
select PINCTRL_EXYNOS
select PM_GENERIC_DOMAINS if PM
select S5P_PM if PM
select S5P_SLEEP if PM
select SAMSUNG_DMADEV
Expand All @@ -74,7 +73,6 @@ config SOC_EXYNOS4412
depends on ARCH_EXYNOS4
select ARCH_HAS_BANDGAP
select PINCTRL_EXYNOS
select PM_GENERIC_DOMAINS if PM
select SAMSUNG_DMADEV
help
Enable EXYNOS4412 SoC support
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/mach-exynos/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <linux/pm_domain.h>
#include <linux/export.h>
#include <linux/irqdomain.h>
#include <linux/of_address.h>
Expand All @@ -37,14 +38,13 @@
#include <asm/mach/irq.h>
#include <asm/cacheflush.h>

#include <mach/regs-irq.h>
#include <mach/regs-pmu.h>

#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/regs-serial.h>

#include "common.h"
#include "regs-pmu.h"

#define L2_AUX_VAL 0x7C470001
#define L2_AUX_MASK 0xC200ffff

Expand Down Expand Up @@ -309,7 +309,7 @@ void __init exynos_init_late(void)
/* to be supported later */
return;

exynos_pm_late_initcall();
pm_genpd_poweroff_unused();
}

static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-exynos/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ void exynos_init_late(void);

void exynos_firmware_init(void);

#ifdef CONFIG_PM_GENERIC_DOMAINS
int exynos_pm_late_initcall(void);
#else
static inline int exynos_pm_late_initcall(void) { return 0; }
#endif

extern struct smp_operations exynos_smp_ops;

extern void exynos_cpu_die(unsigned int cpu);
Expand Down
25 changes: 23 additions & 2 deletions arch/arm/mach-exynos/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
#include <asm/suspend.h>
#include <asm/unified.h>
#include <asm/cpuidle.h>
#include <mach/regs-clock.h>
#include <mach/regs-pmu.h>

#include <plat/cpu.h>
#include <plat/pm.h>

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

#include "common.h"
#include "regs-pmu.h"

#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
Expand All @@ -39,6 +41,25 @@

#define S5P_CHECK_AFTR 0xFCBA0D10

#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)

#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)

#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)

static int exynos4_enter_lowpower(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include <asm/cp15.h>
#include <asm/smp_plat.h>

#include <mach/regs-pmu.h>
#include <plat/cpu.h>

#include "common.h"
#include "regs-pmu.h"

static inline void cpu_enter_lowpower_a9(void)
{
Expand Down
5 changes: 4 additions & 1 deletion arch/arm/mach-exynos/include/mach/pm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
#define __ASM_ARCH_PM_CORE_H __FILE__

#include <linux/of.h>
#include <mach/regs-pmu.h>
#include <mach/map.h>

#define S5P_EINT_WAKEUP_MASK (S5P_VA_PMU + 0x0604)
#define S5P_WAKEUP_MASK (S5P_VA_PMU + 0x0608)

#ifdef CONFIG_PINCTRL_EXYNOS
extern u32 exynos_get_eint_wake_mask(void);
Expand Down
Loading

0 comments on commit 6eb5c9d

Please sign in to comment.