* [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung"
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung" Pankaj Dubey
@ 2014-04-28 12:17 ` Lee Jones
0 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-04-28 12:17 UTC (permalink / raw)
To: linux-arm-kernel
> Moving Exynos PMU specific header file into "include/linux/mfd/samsung"
> thus updated affected files under "mach-exynos" to use new location of
> these header files.
>
> CC: Sangbeom Kim <sbkim73@samsung.com>
> CC: Samuel Ortiz <sameo@linux.intel.com>
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> arch/arm/mach-exynos/cpuidle.c | 4 ++--
> arch/arm/mach-exynos/exynos.c | 2 +-
> arch/arm/mach-exynos/hotplug.c | 2 +-
> arch/arm/mach-exynos/platsmp.c | 2 +-
> arch/arm/mach-exynos/pm.c | 4 ++--
> arch/arm/mach-exynos/pmu.c | 5 ++---
> {arch/arm/mach-exynos => include/linux/mfd/samsung}/exynos-pmu.h | 0
> .../regs-pmu.h => include/linux/mfd/samsung/exynos-regs-pmu.h | 0
> 8 files changed, 9 insertions(+), 10 deletions(-)
> rename {arch/arm/mach-exynos => include/linux/mfd/samsung}/exynos-pmu.h (100%)
> rename arch/arm/mach-exynos/regs-pmu.h => include/linux/mfd/samsung/exynos-regs-pmu.h (100%)
Patch looks okay to me.
With an Exynos Ack I'd like to take it through the MFD tree.
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver Pankaj Dubey
@ 2014-04-28 12:18 ` Lee Jones
2014-04-28 12:26 ` Lee Jones
1 sibling, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-04-28 12:18 UTC (permalink / raw)
To: linux-arm-kernel
> This patch moves Exynos PMU driver implementation from
> "arm/mach-exynos" to "drivers/mfd".
> This driver is mainly used for setting misc bits of register from PMU IP
> of Exynos SoC which will be required to configure before Suspend/Resume.
> Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
> moving ahead for ARM64 based SoC support, there is a need of DT based
> implementation of PMU driver.
> This driver uses already existing DT binding information.
>
> CC: Sangbeom Kim <sbkim73@samsung.com>
> CC: Samuel Ortiz <sameo@linux.intel.com>
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> arch/arm/mach-exynos/Kconfig | 2 ++
> arch/arm/mach-exynos/Makefile | 2 --
> drivers/mfd/Kconfig | 9 +++++++++
> drivers/mfd/Makefile | 1 +
> arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
> 5 files changed, 12 insertions(+), 2 deletions(-)
> rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
[...]
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3383412..fd48870 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1203,6 +1203,15 @@ config MFD_STW481X
> in various ST Microelectronics and ST-Ericsson embedded
> Nomadik series.
>
> +config MFD_EXYNOS_PMU
> + tristate "Support Exynos Power Managment Unit"
> + depends on ARM || ARM64
> + help
> + Exynos SoC have Power Management Unit (PMU) which controls power and
> + operation state of Exynos SoC in two different ways. This driver
> + provides impmentation of PMU driver and provides basic functionality
> + required during these operation state.
> +
The help should be indented. Take a look at the other entries.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 0/3] Add support for Exynos PMU driver
@ 2014-04-28 12:20 Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-28 12:20 UTC (permalink / raw)
To: linux-arm-kernel
This patch series moves PMU implementation from "mach-exynos/pmu.c" to
"drivers/mfd/exynos-pmu.c". Patch v1 was posted as RFC [1].
In case of ARM32 we had machine folder such as "mach-exynos" but
moving forward with ARM64 SoC support we can not have any more such
machine folders, keeping that in mind we have planned to move PMU
implementation out of machine folder, so that common piece of code
can be reused.
This patch series is based on kgene for-next and depends on following
patch series
a) [PATCH v2 0/5] Add PMU node for Exynos SoCs
https://lkml.org/lkml/2014/4/25/216
b) [PATCH v2 00/10] ARM: Exynos: PMU cleanup and refactoring for using DT
https://lkml.org/lkml/2014/4/25/252
1) [RFC PATCH 0/2] Add support for Exynos PMU driver
https://lkml.org/lkml/2014/4/2/69
Changes since v1:
- Rebased on Kukjin Kim's for-next (3.15_rc1 tag)
- Added patch: Move PMU specific definitions from common.h
- Added patch: Move pmu specific header files under "linux/mfd/samsung"
- Removed patch: ARM: EXYNOS: remove arch specific PMU implementation
As suggested breaking down patches into smalled pieces for better review.
Also modified all changes in pmu.c under mach-exynos itself and then
prepared patches moving files from mach-exynos to "drivers/mfd"
Pankaj Dubey (2):
ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung"
drivers: mfd: Add support for Exynos PMU driver
Younggun Jang (1):
ARM: EXYNOS: Move PMU specific definitions from common.h
arch/arm/mach-exynos/Kconfig | 2 ++
arch/arm/mach-exynos/Makefile | 2 --
arch/arm/mach-exynos/common.h | 17 -----------
arch/arm/mach-exynos/cpuidle.c | 3 +-
arch/arm/mach-exynos/exynos.c | 2 +-
arch/arm/mach-exynos/hotplug.c | 2 +-
arch/arm/mach-exynos/platsmp.c | 2 +-
arch/arm/mach-exynos/pm.c | 3 +-
drivers/mfd/Kconfig | 9 ++++++
drivers/mfd/Makefile | 1 +
.../mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 5 ++--
include/linux/mfd/samsung/exynos-pmu.h | 31 ++++++++++++++++++++
.../linux/mfd/samsung/exynos-regs-pmu.h | 0
13 files changed, 52 insertions(+), 27 deletions(-)
rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (99%)
create mode 100644 include/linux/mfd/samsung/exynos-pmu.h
rename arch/arm/mach-exynos/regs-pmu.h => include/linux/mfd/samsung/exynos-regs-pmu.h (100%)
--
1.7.10.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h
2014-04-28 12:20 [RESUBMIT RFC PATCH v2 0/3] Add support for Exynos PMU driver Pankaj Dubey
@ 2014-04-28 12:20 ` Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung" Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver Pankaj Dubey
2 siblings, 0 replies; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-28 12:20 UTC (permalink / raw)
To: linux-arm-kernel
From: Younggun Jang <yg1004.jang@samsung.com>
This patch moves PMU specific definitions into a new file
as exynos-pmu.h. This will help in making PMU implementation
independent of common.h header.
Signed-off-by: Young-Gun Jang <yg1004.jang@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
arch/arm/mach-exynos/common.h | 17 -----------------
arch/arm/mach-exynos/cpuidle.c | 1 +
arch/arm/mach-exynos/exynos-pmu.h | 31 +++++++++++++++++++++++++++++++
arch/arm/mach-exynos/pm.c | 1 +
arch/arm/mach-exynos/pmu.c | 2 +-
5 files changed, 34 insertions(+), 18 deletions(-)
create mode 100644 arch/arm/mach-exynos/exynos-pmu.h
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index ad5128e..d848ede 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -38,24 +38,7 @@ extern struct smp_operations exynos_smp_ops;
extern void exynos_cpu_die(unsigned int cpu);
-/* PMU(Power Management Unit) support */
-
-#define PMU_TABLE_END 0xFFFF
-
-enum sys_powerdown {
- SYS_AFTR,
- SYS_LPA,
- SYS_SLEEP,
- NUM_SYS_POWERDOWN,
-};
-
extern unsigned long l2x0_regs_phys;
-struct exynos_pmu_conf {
- unsigned int offset;
- unsigned int val[NUM_SYS_POWERDOWN];
-};
-
-extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
extern struct regmap *get_exynos_pmuregmap(void);
extern void __iomem *get_exynos_pmuaddr(void);
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 5dcdd46..ff3be9c 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -32,6 +32,7 @@
#include "common.h"
#include "regs-pmu.h"
+#include "exynos-pmu.h"
#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h
new file mode 100644
index 0000000..1cc857b
--- /dev/null
+++ b/arch/arm/mach-exynos/exynos-pmu.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Header for EXYNOS PMU Driver support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __EXYNOS_PMU_H
+#define __EXYNOS_PMU_H
+
+#define PMU_TABLE_END 0xFFFF
+
+enum sys_powerdown {
+ SYS_AFTR,
+ SYS_LPA,
+ SYS_SLEEP,
+ NUM_SYS_POWERDOWN,
+};
+
+struct exynos_pmu_conf {
+ unsigned int offset;
+ unsigned int val[NUM_SYS_POWERDOWN];
+};
+
+extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
+
+#endif /* __EXYNOS_PMU_H */
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index e4c10d4..103ab92 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -37,6 +37,7 @@
#include "common.h"
#include "regs-pmu.h"
#include "regs-sys.h"
+#include "exynos-pmu.h"
static struct regmap *pmu_regmap;
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index abcf753..d020557 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -16,7 +16,7 @@
#include <linux/slab.h>
#include <linux/mfd/syscon.h>
-#include "common.h"
+#include "exynos-pmu.h"
#include "regs-pmu.h"
enum exynos_pmu_id {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung"
2014-04-28 12:20 [RESUBMIT RFC PATCH v2 0/3] Add support for Exynos PMU driver Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey
@ 2014-04-28 12:20 ` Pankaj Dubey
2014-04-28 12:17 ` Lee Jones
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver Pankaj Dubey
2 siblings, 1 reply; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-28 12:20 UTC (permalink / raw)
To: linux-arm-kernel
Moving Exynos PMU specific header file into "include/linux/mfd/samsung"
thus updated affected files under "mach-exynos" to use new location of
these header files.
CC: Sangbeom Kim <sbkim73@samsung.com>
CC: Samuel Ortiz <sameo@linux.intel.com>
CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
arch/arm/mach-exynos/cpuidle.c | 4 ++--
arch/arm/mach-exynos/exynos.c | 2 +-
arch/arm/mach-exynos/hotplug.c | 2 +-
arch/arm/mach-exynos/platsmp.c | 2 +-
arch/arm/mach-exynos/pm.c | 4 ++--
arch/arm/mach-exynos/pmu.c | 5 ++---
{arch/arm/mach-exynos => include/linux/mfd/samsung}/exynos-pmu.h | 0
.../regs-pmu.h => include/linux/mfd/samsung/exynos-regs-pmu.h | 0
8 files changed, 9 insertions(+), 10 deletions(-)
rename {arch/arm/mach-exynos => include/linux/mfd/samsung}/exynos-pmu.h (100%)
rename arch/arm/mach-exynos/regs-pmu.h => include/linux/mfd/samsung/exynos-regs-pmu.h (100%)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ff3be9c..4c18087 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -18,6 +18,8 @@
#include <linux/time.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
+#include <linux/mfd/samsung/exynos-pmu.h>
#include <asm/proc-fns.h>
#include <asm/smp_scu.h>
@@ -31,8 +33,6 @@
#include <mach/map.h>
#include "common.h"
-#include "regs-pmu.h"
-#include "exynos-pmu.h"
#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index b01987e..24c774a 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -21,6 +21,7 @@
#include <linux/pm_domain.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
@@ -32,7 +33,6 @@
#include "common.h"
#include "mfc.h"
-#include "regs-pmu.h"
#include "regs-sys.h"
#define L2_AUX_VAL 0x7C470001
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 7831e64..1d3ad84 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -14,6 +14,7 @@
#include <linux/smp.h>
#include <linux/io.h>
#include <linux/regmap.h>
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
#include <asm/cacheflush.h>
#include <asm/cp15.h>
@@ -22,7 +23,6 @@
#include <plat/cpu.h>
#include "common.h"
-#include "regs-pmu.h"
static inline void cpu_enter_lowpower_a9(void)
{
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 3831e6c..54c0df8 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -19,6 +19,7 @@
#include <linux/jiffies.h>
#include <linux/smp.h>
#include <linux/io.h>
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
@@ -29,7 +30,6 @@
#include <mach/map.h>
#include "common.h"
-#include "regs-pmu.h"
extern void exynos4_secondary_startup(void);
static void __iomem *pmu_base;
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 103ab92..3e75565 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -21,6 +21,8 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/regmap.h>
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
+#include <linux/mfd/samsung/exynos-pmu.h>
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
@@ -35,9 +37,7 @@
#include <mach/map.h>
#include "common.h"
-#include "regs-pmu.h"
#include "regs-sys.h"
-#include "exynos-pmu.h"
static struct regmap *pmu_regmap;
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index d020557..a26332f 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -15,9 +15,8 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/mfd/syscon.h>
-
-#include "exynos-pmu.h"
-#include "regs-pmu.h"
+#include <linux/mfd/samsung/exynos-regs-pmu.h>
+#include <linux/mfd/samsung/exynos-pmu.h>
enum exynos_pmu_id {
PMU_EXYNOS4210,
diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/include/linux/mfd/samsung/exynos-pmu.h
similarity index 100%
rename from arch/arm/mach-exynos/exynos-pmu.h
rename to include/linux/mfd/samsung/exynos-pmu.h
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/include/linux/mfd/samsung/exynos-regs-pmu.h
similarity index 100%
rename from arch/arm/mach-exynos/regs-pmu.h
rename to include/linux/mfd/samsung/exynos-regs-pmu.h
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 12:20 [RESUBMIT RFC PATCH v2 0/3] Add support for Exynos PMU driver Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung" Pankaj Dubey
@ 2014-04-28 12:20 ` Pankaj Dubey
2014-04-28 12:18 ` Lee Jones
2014-04-28 12:26 ` Lee Jones
2 siblings, 2 replies; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-28 12:20 UTC (permalink / raw)
To: linux-arm-kernel
This patch moves Exynos PMU driver implementation from
"arm/mach-exynos" to "drivers/mfd".
This driver is mainly used for setting misc bits of register from PMU IP
of Exynos SoC which will be required to configure before Suspend/Resume.
Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
moving ahead for ARM64 based SoC support, there is a need of DT based
implementation of PMU driver.
This driver uses already existing DT binding information.
CC: Sangbeom Kim <sbkim73@samsung.com>
CC: Samuel Ortiz <sameo@linux.intel.com>
CC: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
---
arch/arm/mach-exynos/Kconfig | 2 ++
arch/arm/mach-exynos/Makefile | 2 --
drivers/mfd/Kconfig | 9 +++++++++
drivers/mfd/Makefile | 1 +
arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
5 files changed, 12 insertions(+), 2 deletions(-)
rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 2f60c90..79559b4 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -27,6 +27,7 @@ config ARCH_EXYNOS4
select PM_GENERIC_DOMAINS if PM_RUNTIME
select S5P_DEV_MFC
select MFD_SYSCON
+ select MFD_EXYNOS_PMU
help
Samsung EXYNOS4 SoCs based systems
@@ -38,6 +39,7 @@ config ARCH_EXYNOS5
select HAVE_SMP
select PINCTRL
select MFD_SYSCON
+ select MFD_EXYNOS_PMU
help
Samsung EXYNOS5 (Cortex-A15) SoC based systems
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index a656dbe..19fdf17 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -18,8 +18,6 @@ obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
-obj-$(CONFIG_ARCH_EXYNOS) += pmu.o
-
obj-$(CONFIG_SMP) += platsmp.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 3383412..fd48870 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1203,6 +1203,15 @@ config MFD_STW481X
in various ST Microelectronics and ST-Ericsson embedded
Nomadik series.
+config MFD_EXYNOS_PMU
+ tristate "Support Exynos Power Managment Unit"
+ depends on ARM || ARM64
+ help
+ Exynos SoC have Power Management Unit (PMU) which controls power and
+ operation state of Exynos SoC in two different ways. This driver
+ provides impmentation of PMU driver and provides basic functionality
+ required during these operation state.
+
menu "Multimedia Capabilities Port drivers"
depends on ARCH_SA1100
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 2851275..7c43d07 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -166,3 +166,4 @@ obj-$(CONFIG_MFD_RETU) += retu-mfd.o
obj-$(CONFIG_MFD_AS3711) += as3711.o
obj-$(CONFIG_MFD_AS3722) += as3722.o
obj-$(CONFIG_MFD_STW481X) += stw481x.o
+obj-$(CONFIG_MFD_EXYNOS_PMU) += exynos-pmu.o
diff --git a/arch/arm/mach-exynos/pmu.c b/drivers/mfd/exynos-pmu.c
similarity index 100%
rename from arch/arm/mach-exynos/pmu.c
rename to drivers/mfd/exynos-pmu.c
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver Pankaj Dubey
2014-04-28 12:18 ` Lee Jones
@ 2014-04-28 12:26 ` Lee Jones
2014-04-28 17:37 ` Catalin Marinas
2014-04-29 7:54 ` Pankaj Dubey
1 sibling, 2 replies; 11+ messages in thread
From: Lee Jones @ 2014-04-28 12:26 UTC (permalink / raw)
To: linux-arm-kernel
> This patch moves Exynos PMU driver implementation from
> "arm/mach-exynos" to "drivers/mfd".
> This driver is mainly used for setting misc bits of register from PMU IP
> of Exynos SoC which will be required to configure before Suspend/Resume.
> Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
> moving ahead for ARM64 based SoC support, there is a need of DT based
> implementation of PMU driver.
> This driver uses already existing DT binding information.
>
> CC: Sangbeom Kim <sbkim73@samsung.com>
> CC: Samuel Ortiz <sameo@linux.intel.com>
> CC: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> arch/arm/mach-exynos/Kconfig | 2 ++
> arch/arm/mach-exynos/Makefile | 2 --
> drivers/mfd/Kconfig | 9 +++++++++
> drivers/mfd/Makefile | 1 +
> arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
> 5 files changed, 12 insertions(+), 2 deletions(-)
> rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
So I just took a look at the code as zero changes looks suspicious to
me. The driver can not simply be copied and pasted into the MFD
subsystem in its current state.
The fundamental question is; is this chip actually an MFD? What does
it do besides Power Management?
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index 2f60c90..79559b4 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -27,6 +27,7 @@ config ARCH_EXYNOS4
> select PM_GENERIC_DOMAINS if PM_RUNTIME
> select S5P_DEV_MFC
> select MFD_SYSCON
> + select MFD_EXYNOS_PMU
> help
> Samsung EXYNOS4 SoCs based systems
>
> @@ -38,6 +39,7 @@ config ARCH_EXYNOS5
> select HAVE_SMP
> select PINCTRL
> select MFD_SYSCON
> + select MFD_EXYNOS_PMU
> help
> Samsung EXYNOS5 (Cortex-A15) SoC based systems
>
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index a656dbe..19fdf17 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -18,8 +18,6 @@ obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o
> obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
> obj-$(CONFIG_CPU_IDLE) += cpuidle.o
>
> -obj-$(CONFIG_ARCH_EXYNOS) += pmu.o
> -
> obj-$(CONFIG_SMP) += platsmp.o headsmp.o
>
> obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3383412..fd48870 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1203,6 +1203,15 @@ config MFD_STW481X
> in various ST Microelectronics and ST-Ericsson embedded
> Nomadik series.
>
> +config MFD_EXYNOS_PMU
> + tristate "Support Exynos Power Managment Unit"
> + depends on ARM || ARM64
> + help
> + Exynos SoC have Power Management Unit (PMU) which controls power and
> + operation state of Exynos SoC in two different ways. This driver
> + provides impmentation of PMU driver and provides basic functionality
> + required during these operation state.
> +
> menu "Multimedia Capabilities Port drivers"
> depends on ARCH_SA1100
>
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 2851275..7c43d07 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -166,3 +166,4 @@ obj-$(CONFIG_MFD_RETU) += retu-mfd.o
> obj-$(CONFIG_MFD_AS3711) += as3711.o
> obj-$(CONFIG_MFD_AS3722) += as3722.o
> obj-$(CONFIG_MFD_STW481X) += stw481x.o
> +obj-$(CONFIG_MFD_EXYNOS_PMU) += exynos-pmu.o
> diff --git a/arch/arm/mach-exynos/pmu.c b/drivers/mfd/exynos-pmu.c
> similarity index 100%
> rename from arch/arm/mach-exynos/pmu.c
> rename to drivers/mfd/exynos-pmu.c
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 12:26 ` Lee Jones
@ 2014-04-28 17:37 ` Catalin Marinas
2014-04-29 8:05 ` Pankaj Dubey
2014-04-29 7:54 ` Pankaj Dubey
1 sibling, 1 reply; 11+ messages in thread
From: Catalin Marinas @ 2014-04-28 17:37 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 28, 2014 at 01:26:46PM +0100, Lee Jones wrote:
> > This patch moves Exynos PMU driver implementation from
> > "arm/mach-exynos" to "drivers/mfd".
> > This driver is mainly used for setting misc bits of register from PMU IP
> > of Exynos SoC which will be required to configure before Suspend/Resume.
> > Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
> > moving ahead for ARM64 based SoC support, there is a need of DT based
> > implementation of PMU driver.
> > This driver uses already existing DT binding information.
> >
> > CC: Sangbeom Kim <sbkim73@samsung.com>
> > CC: Samuel Ortiz <sameo@linux.intel.com>
> > CC: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> > ---
> > arch/arm/mach-exynos/Kconfig | 2 ++
> > arch/arm/mach-exynos/Makefile | 2 --
> > drivers/mfd/Kconfig | 9 +++++++++
> > drivers/mfd/Makefile | 1 +
> > arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
> > 5 files changed, 12 insertions(+), 2 deletions(-)
> > rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
>
> So I just took a look at the code as zero changes looks suspicious to
> me. The driver can not simply be copied and pasted into the MFD
> subsystem in its current state.
>
> The fundamental question is; is this chip actually an MFD? What does
> it do besides Power Management?
I looked at the code briefly as well and I don't think it matches the
mfd idea. Maybe it could be merged together with
arch/arm/mach-exynos/pm.c and moved to drivers/power/ or a more
appropriate directory for platform_suspend_ops.
--
Catalin
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 12:26 ` Lee Jones
2014-04-28 17:37 ` Catalin Marinas
@ 2014-04-29 7:54 ` Pankaj Dubey
2014-04-29 9:27 ` Lee Jones
1 sibling, 1 reply; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-29 7:54 UTC (permalink / raw)
To: linux-arm-kernel
On 04/28/2014 09:26 PM, Lee Jones wrote:
>> This patch moves Exynos PMU driver implementation from
>> "arm/mach-exynos" to "drivers/mfd".
>> This driver is mainly used for setting misc bits of register from PMU IP
>> of Exynos SoC which will be required to configure before Suspend/Resume.
>> Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
>> moving ahead for ARM64 based SoC support, there is a need of DT based
>> implementation of PMU driver.
>> This driver uses already existing DT binding information.
>>
>> CC: Sangbeom Kim <sbkim73@samsung.com>
>> CC: Samuel Ortiz <sameo@linux.intel.com>
>> CC: Lee Jones <lee.jones@linaro.org>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> ---
>> arch/arm/mach-exynos/Kconfig | 2 ++
>> arch/arm/mach-exynos/Makefile | 2 --
>> drivers/mfd/Kconfig | 9 +++++++++
>> drivers/mfd/Makefile | 1 +
>> arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
>> 5 files changed, 12 insertions(+), 2 deletions(-)
>> rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
> So I just took a look at the code as zero changes looks suspicious to
> me. The driver can not simply be copied and pasted into the MFD
> subsystem in its current state.
>
> The fundamental question is; is this chip actually an MFD? What does
> it do besides Power Management?
Exynos PMU chip controls different power states of Exynos, so mainly it
does power management related stuff. Apart from this it has few registers
which controls PHY of various IP blocks of Exynos such as USB, HDMI,
ADC etc. But these phy controlling register are currently being accessed
via "syscon" driver provided regmap APIs. For same the same reason
Exynos PMU has second compatibility string as "syscon".
>> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> index 2f60c90..79559b4 100644
>> --- a/arch/arm/mach-exynos/Kconfig
>> +++ b/arch/arm/mach-exynos/Kconfig
>> @@ -27,6 +27,7 @@ config ARCH_EXYNOS4
>> select PM_GENERIC_DOMAINS if PM_RUNTIME
>> select S5P_DEV_MFC
>> select MFD_SYSCON
>> + select MFD_EXYNOS_PMU
>> help
>> Samsung EXYNOS4 SoCs based systems
>>
>> @@ -38,6 +39,7 @@ config ARCH_EXYNOS5
>> select HAVE_SMP
>> select PINCTRL
>> select MFD_SYSCON
>> + select MFD_EXYNOS_PMU
>> help
>> Samsung EXYNOS5 (Cortex-A15) SoC based systems
>>
>> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
>> index a656dbe..19fdf17 100644
>> --- a/arch/arm/mach-exynos/Makefile
>> +++ b/arch/arm/mach-exynos/Makefile
>> @@ -18,8 +18,6 @@ obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o
>> obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
>> obj-$(CONFIG_CPU_IDLE) += cpuidle.o
>>
>> -obj-$(CONFIG_ARCH_EXYNOS) += pmu.o
>> -
>> obj-$(CONFIG_SMP) += platsmp.o headsmp.o
>>
>> obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>> index 3383412..fd48870 100644
>> --- a/drivers/mfd/Kconfig
>> +++ b/drivers/mfd/Kconfig
>> @@ -1203,6 +1203,15 @@ config MFD_STW481X
>> in various ST Microelectronics and ST-Ericsson embedded
>> Nomadik series.
>>
>> +config MFD_EXYNOS_PMU
>> + tristate "Support Exynos Power Managment Unit"
>> + depends on ARM || ARM64
>> + help
>> + Exynos SoC have Power Management Unit (PMU) which controls power and
>> + operation state of Exynos SoC in two different ways. This driver
>> + provides impmentation of PMU driver and provides basic functionality
>> + required during these operation state.
>> +
>> menu "Multimedia Capabilities Port drivers"
>> depends on ARCH_SA1100
>>
>> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
>> index 2851275..7c43d07 100644
>> --- a/drivers/mfd/Makefile
>> +++ b/drivers/mfd/Makefile
>> @@ -166,3 +166,4 @@ obj-$(CONFIG_MFD_RETU) += retu-mfd.o
>> obj-$(CONFIG_MFD_AS3711) += as3711.o
>> obj-$(CONFIG_MFD_AS3722) += as3722.o
>> obj-$(CONFIG_MFD_STW481X) += stw481x.o
>> +obj-$(CONFIG_MFD_EXYNOS_PMU) += exynos-pmu.o
>> diff --git a/arch/arm/mach-exynos/pmu.c b/drivers/mfd/exynos-pmu.c
>> similarity index 100%
>> rename from arch/arm/mach-exynos/pmu.c
>> rename to drivers/mfd/exynos-pmu.c
--
Best Regards,
Pankaj Dubey
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-28 17:37 ` Catalin Marinas
@ 2014-04-29 8:05 ` Pankaj Dubey
0 siblings, 0 replies; 11+ messages in thread
From: Pankaj Dubey @ 2014-04-29 8:05 UTC (permalink / raw)
To: linux-arm-kernel
On 04/29/2014 02:37 AM, Catalin Marinas wrote:
> On Mon, Apr 28, 2014 at 01:26:46PM +0100, Lee Jones wrote:
>>> This patch moves Exynos PMU driver implementation from
>>> "arm/mach-exynos" to "drivers/mfd".
>>> This driver is mainly used for setting misc bits of register from PMU IP
>>> of Exynos SoC which will be required to configure before Suspend/Resume.
>>> Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
>>> moving ahead for ARM64 based SoC support, there is a need of DT based
>>> implementation of PMU driver.
>>> This driver uses already existing DT binding information.
>>>
>>> CC: Sangbeom Kim <sbkim73@samsung.com>
>>> CC: Samuel Ortiz <sameo@linux.intel.com>
>>> CC: Lee Jones <lee.jones@linaro.org>
>>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>>> ---
>>> arch/arm/mach-exynos/Kconfig | 2 ++
>>> arch/arm/mach-exynos/Makefile | 2 --
>>> drivers/mfd/Kconfig | 9 +++++++++
>>> drivers/mfd/Makefile | 1 +
>>> arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
>>> 5 files changed, 12 insertions(+), 2 deletions(-)
>>> rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
>> So I just took a look at the code as zero changes looks suspicious to
>> me. The driver can not simply be copied and pasted into the MFD
>> subsystem in its current state.
>>
>> The fundamental question is; is this chip actually an MFD? What does
>> it do besides Power Management?
> I looked at the code briefly as well and I don't think it matches the
> mfd idea. Maybe it could be merged together with
> arch/arm/mach-exynos/pm.c and moved to drivers/power/ or a more
> appropriate directory for platform_suspend_ops.
Well I was also not quite sure about if "drivers/mfd" is proper place
for Exynos PMU, so I posted this patch as RFC.
If it does not seems matching with "drivers/mfd" idea, will it be suitable
for "drivers/power/" or should I go for something like "drivers/soc/samsung"?
Regarding your second point about merging this code with "mach-exynos/pm.c"
We have plan for this but, I would like to get it done via a separate patch
series
as "mach-exynos/pm.c" has a lot of dependencies and requires significant
modifications. So this work can be treated as a first step towards that
direction.
--
Best Regards,
Pankaj Dubey
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver
2014-04-29 7:54 ` Pankaj Dubey
@ 2014-04-29 9:27 ` Lee Jones
0 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-04-29 9:27 UTC (permalink / raw)
To: linux-arm-kernel
> >>This patch moves Exynos PMU driver implementation from
> >>"arm/mach-exynos" to "drivers/mfd".
> >>This driver is mainly used for setting misc bits of register from PMU IP
> >>of Exynos SoC which will be required to configure before Suspend/Resume.
> >>Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but
> >>moving ahead for ARM64 based SoC support, there is a need of DT based
> >>implementation of PMU driver.
> >>This driver uses already existing DT binding information.
> >>
> >>CC: Sangbeom Kim <sbkim73@samsung.com>
> >>CC: Samuel Ortiz <sameo@linux.intel.com>
> >>CC: Lee Jones <lee.jones@linaro.org>
> >>Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> >>---
> >> arch/arm/mach-exynos/Kconfig | 2 ++
> >> arch/arm/mach-exynos/Makefile | 2 --
> >> drivers/mfd/Kconfig | 9 +++++++++
> >> drivers/mfd/Makefile | 1 +
> >> arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c | 0
> >> 5 files changed, 12 insertions(+), 2 deletions(-)
> >> rename arch/arm/mach-exynos/pmu.c => drivers/mfd/exynos-pmu.c (100%)
> >So I just took a look at the code as zero changes looks suspicious to
> >me. The driver can not simply be copied and pasted into the MFD
> >subsystem in its current state.
> >
> >The fundamental question is; is this chip actually an MFD? What does
> >it do besides Power Management?
>
> Exynos PMU chip controls different power states of Exynos, so mainly it
> does power management related stuff. Apart from this it has few registers
> which controls PHY of various IP blocks of Exynos such as USB, HDMI,
> ADC etc. But these phy controlling register are currently being accessed
> via "syscon" driver provided regmap APIs. For same the same reason
> Exynos PMU has second compatibility string as "syscon".
I suggest that this is not suitable for the MFD subsystem then.
Try drivers/power.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-04-29 9:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 12:20 [RESUBMIT RFC PATCH v2 0/3] Add support for Exynos PMU driver Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 2/3] ARM: EXYNOS: Move pmu specific header files under "linux/mfd/samsung" Pankaj Dubey
2014-04-28 12:17 ` Lee Jones
2014-04-28 12:20 ` [RESUBMIT RFC PATCH v2 3/3] drivers: mfd: Add support for Exynos PMU driver Pankaj Dubey
2014-04-28 12:18 ` Lee Jones
2014-04-28 12:26 ` Lee Jones
2014-04-28 17:37 ` Catalin Marinas
2014-04-29 8:05 ` Pankaj Dubey
2014-04-29 7:54 ` Pankaj Dubey
2014-04-29 9:27 ` Lee Jones
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).