* [PATCH v5 0/6] Cleanup patches for mach-exynos
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
This series is doing code cleanup under arch/arm/mach-exynos.
These patches have been separated from main exynos pmu v4 patch
posted here [1].
[1]: https://lkml.org/lkml/2014/5/10/29
Changes Since v4:
- Rebased on latest for-next of Kukjin Kim's tree.
- Removing file path comment from mach-exynos/headsmp.S also.
- Removed signed-off-by of Young-Gun Jang <yg1004.jang@samsung.com>,
as this id is no more valid. Taking ownership of all his patches.
- Separated these patches from main exynos pmu v4 patch series as
suggested by Tomasz Figa.
Changes Since v3:
- Addressed build fail issue in exynos.c as reported by Sachin Kamat.
- Rebased on top of Sysram patches by Sachin Kamat.
Changes Since v2:
- Rebased on top of Daniel Lezcano's Exynos cpuidle refactor patches.
- Removed exynos_cpuidle_init and exynos_cpufreq_init code as suggested
by Tomasz Figa.
Changes Since v1:
- Rebased on latest for-next of Kukjin Kim's tree.
- Added patch: "Make exynos machine_ops as static".
For making more cleanup in "mach-exynos/common.h"
as suggested by Tomasz Figa.
- Addressed comments of Tomasz Figa for cleaning "mach-exynos/common.h".
- Updated patch: Remove file path from comment section
As suggested by Michel Simek, instead of updating file path
lets remove them from each file under "mach-exynos".
Even though Kukjin pointed out that there is similar patch pending from
Sachin/Tushar but since I could not find I have included this here. If
I have missed something please point to any existing such patch.
- Added patch: Remove "linux/bug.h" from pmu.c.
- Added patch: Move "mach/map.h" inclusion from regs-pmu.h to platsmp.c
Pankaj Dubey (6):
ARM: EXYNOS: Make exynos machine_ops as static
ARM: EXYNOS: Move cpufreq and cpuidle device registration to
init_machine
ARM: EXYNOS: Move SYSREG definition into sys-reg specific file
ARM: EXYNOS: Remove file path from comment section
ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
ARM: EXYNOS: Remove "linux/bug.h" from pmu.c
arch/arm/mach-exynos/common.h | 8 --------
arch/arm/mach-exynos/exynos.c | 26 ++++++++------------------
arch/arm/mach-exynos/headsmp.S | 1 -
arch/arm/mach-exynos/hotplug.c | 3 +--
arch/arm/mach-exynos/include/mach/map.h | 3 +--
arch/arm/mach-exynos/include/mach/memory.h | 3 +--
arch/arm/mach-exynos/platsmp.c | 3 +--
arch/arm/mach-exynos/pm.c | 1 +
arch/arm/mach-exynos/pm_domains.c | 8 ++++----
arch/arm/mach-exynos/pmu.c | 1 -
arch/arm/mach-exynos/regs-pmu.h | 4 ----
arch/arm/mach-exynos/regs-sys.h | 22 ++++++++++++++++++++++
12 files changed, 39 insertions(+), 44 deletions(-)
create mode 100644 arch/arm/mach-exynos/regs-sys.h
--
1.7.9.5
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v5 0/6] Cleanup patches for mach-exynos
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
This series is doing code cleanup under arch/arm/mach-exynos.
These patches have been separated from main exynos pmu v4 patch
posted here [1].
[1]: https://lkml.org/lkml/2014/5/10/29
Changes Since v4:
- Rebased on latest for-next of Kukjin Kim's tree.
- Removing file path comment from mach-exynos/headsmp.S also.
- Removed signed-off-by of Young-Gun Jang <yg1004.jang@samsung.com>,
as this id is no more valid. Taking ownership of all his patches.
- Separated these patches from main exynos pmu v4 patch series as
suggested by Tomasz Figa.
Changes Since v3:
- Addressed build fail issue in exynos.c as reported by Sachin Kamat.
- Rebased on top of Sysram patches by Sachin Kamat.
Changes Since v2:
- Rebased on top of Daniel Lezcano's Exynos cpuidle refactor patches.
- Removed exynos_cpuidle_init and exynos_cpufreq_init code as suggested
by Tomasz Figa.
Changes Since v1:
- Rebased on latest for-next of Kukjin Kim's tree.
- Added patch: "Make exynos machine_ops as static".
For making more cleanup in "mach-exynos/common.h"
as suggested by Tomasz Figa.
- Addressed comments of Tomasz Figa for cleaning "mach-exynos/common.h".
- Updated patch: Remove file path from comment section
As suggested by Michel Simek, instead of updating file path
lets remove them from each file under "mach-exynos".
Even though Kukjin pointed out that there is similar patch pending from
Sachin/Tushar but since I could not find I have included this here. If
I have missed something please point to any existing such patch.
- Added patch: Remove "linux/bug.h" from pmu.c.
- Added patch: Move "mach/map.h" inclusion from regs-pmu.h to platsmp.c
Pankaj Dubey (6):
ARM: EXYNOS: Make exynos machine_ops as static
ARM: EXYNOS: Move cpufreq and cpuidle device registration to
init_machine
ARM: EXYNOS: Move SYSREG definition into sys-reg specific file
ARM: EXYNOS: Remove file path from comment section
ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
ARM: EXYNOS: Remove "linux/bug.h" from pmu.c
arch/arm/mach-exynos/common.h | 8 --------
arch/arm/mach-exynos/exynos.c | 26 ++++++++------------------
arch/arm/mach-exynos/headsmp.S | 1 -
arch/arm/mach-exynos/hotplug.c | 3 +--
arch/arm/mach-exynos/include/mach/map.h | 3 +--
arch/arm/mach-exynos/include/mach/memory.h | 3 +--
arch/arm/mach-exynos/platsmp.c | 3 +--
arch/arm/mach-exynos/pm.c | 1 +
arch/arm/mach-exynos/pm_domains.c | 8 ++++----
arch/arm/mach-exynos/pmu.c | 1 -
arch/arm/mach-exynos/regs-pmu.h | 4 ----
arch/arm/mach-exynos/regs-sys.h | 22 ++++++++++++++++++++++
12 files changed, 39 insertions(+), 44 deletions(-)
create mode 100644 arch/arm/mach-exynos/regs-sys.h
--
1.7.9.5
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v5 1/6] ARM: EXYNOS: Make exynos machine_ops as static
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
As machine function ops are used only in this file let's make
them static. Also remove unused and unwanted declarations from
common.h.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/common.h | 8 --------
arch/arm/mach-exynos/exynos.c | 6 +++---
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 16617bd..3f25f89 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -111,16 +111,8 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5410() || \
soc_is_exynos5420() || soc_is_exynos5800())
-void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
-
-struct map_desc;
extern void __iomem *sysram_ns_base_addr;
extern void __iomem *sysram_base_addr;
-void exynos_init_io(void);
-void exynos_restart(enum reboot_mode mode, const char *cmd);
-void exynos_cpuidle_init(void);
-void exynos_cpufreq_init(void);
-void exynos_init_late(void);
void exynos_firmware_init(void);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 90aab4d..6affcd9 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -143,7 +143,7 @@ static struct map_desc exynos5_iodesc[] __initdata = {
},
};
-void exynos_restart(enum reboot_mode mode, const char *cmd)
+static void exynos_restart(enum reboot_mode mode, const char *cmd)
{
struct device_node *np;
u32 val = 0x1;
@@ -184,7 +184,7 @@ void __init exynos_cpufreq_init(void)
platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
}
-void __init exynos_init_late(void)
+static void __init exynos_init_late(void)
{
if (of_machine_is_compatible("samsung,exynos5440"))
/* to be supported later */
@@ -231,7 +231,7 @@ static void __init exynos_map_io(void)
iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
}
-void __init exynos_init_io(void)
+static void __init exynos_init_io(void)
{
debug_ll_io_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 1/6] ARM: EXYNOS: Make exynos machine_ops as static
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
As machine function ops are used only in this file let's make
them static. Also remove unused and unwanted declarations from
common.h.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/common.h | 8 --------
arch/arm/mach-exynos/exynos.c | 6 +++---
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 16617bd..3f25f89 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -111,16 +111,8 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5410() || \
soc_is_exynos5420() || soc_is_exynos5800())
-void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
-
-struct map_desc;
extern void __iomem *sysram_ns_base_addr;
extern void __iomem *sysram_base_addr;
-void exynos_init_io(void);
-void exynos_restart(enum reboot_mode mode, const char *cmd);
-void exynos_cpuidle_init(void);
-void exynos_cpufreq_init(void);
-void exynos_init_late(void);
void exynos_firmware_init(void);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 90aab4d..6affcd9 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -143,7 +143,7 @@ static struct map_desc exynos5_iodesc[] __initdata = {
},
};
-void exynos_restart(enum reboot_mode mode, const char *cmd)
+static void exynos_restart(enum reboot_mode mode, const char *cmd)
{
struct device_node *np;
u32 val = 0x1;
@@ -184,7 +184,7 @@ void __init exynos_cpufreq_init(void)
platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
}
-void __init exynos_init_late(void)
+static void __init exynos_init_late(void)
{
if (of_machine_is_compatible("samsung,exynos5440"))
/* to be supported later */
@@ -231,7 +231,7 @@ static void __init exynos_map_io(void)
iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
}
-void __init exynos_init_io(void)
+static void __init exynos_init_io(void)
{
debug_ll_io_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
As exynos_cpuidle_init and exynos_cpufreq_init function have just one lines
of code for registering platform devices. We can move these lines to
exynos_dt_machine_init and delete exynos_cpuidle_init and exynos_cpufreq_init
function. This will help in reducing lines of code in exynos.c, making it
more cleaner.
Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6affcd9..e54d885 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -171,19 +171,6 @@ static struct platform_device exynos_cpuidle = {
.id = -1,
};
-void __init exynos_cpuidle_init(void)
-{
- if (soc_is_exynos5440())
- return;
-
- platform_device_register(&exynos_cpuidle);
-}
-
-void __init exynos_cpufreq_init(void)
-{
- platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
-}
-
static void __init exynos_init_late(void)
{
if (of_machine_is_compatible("samsung,exynos5440"))
@@ -271,8 +258,10 @@ static void __init exynos_dt_machine_init(void)
}
}
- exynos_cpuidle_init();
- exynos_cpufreq_init();
+ if (!soc_is_exynos5440())
+ platform_device_register(&exynos_cpuidle);
+
+ platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
As exynos_cpuidle_init and exynos_cpufreq_init function have just one lines
of code for registering platform devices. We can move these lines to
exynos_dt_machine_init and delete exynos_cpuidle_init and exynos_cpufreq_init
function. This will help in reducing lines of code in exynos.c, making it
more cleaner.
Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6affcd9..e54d885 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -171,19 +171,6 @@ static struct platform_device exynos_cpuidle = {
.id = -1,
};
-void __init exynos_cpuidle_init(void)
-{
- if (soc_is_exynos5440())
- return;
-
- platform_device_register(&exynos_cpuidle);
-}
-
-void __init exynos_cpufreq_init(void)
-{
- platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
-}
-
static void __init exynos_init_late(void)
{
if (of_machine_is_compatible("samsung,exynos5440"))
@@ -271,8 +258,10 @@ static void __init exynos_dt_machine_init(void)
}
}
- exynos_cpuidle_init();
- exynos_cpufreq_init();
+ if (!soc_is_exynos5440())
+ platform_device_register(&exynos_cpuidle);
+
+ platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 3/6] ARM: EXYNOS: Move SYSREG definition into sys-reg specific file
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
While making PMU implementation to be device tree based, there are
few register offsets related with SYSREG present in regs-pmu.h, so
let's make a new header file "regs-sys.h" to keep all such SYSREG
related register offsets and remove them from "regs-pmu.h"
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 1 +
arch/arm/mach-exynos/pm.c | 1 +
arch/arm/mach-exynos/regs-pmu.h | 3 ---
arch/arm/mach-exynos/regs-sys.h | 22 ++++++++++++++++++++++
4 files changed, 24 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/mach-exynos/regs-sys.h
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index e54d885..4a69b3f 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -29,6 +29,7 @@
#include "common.h"
#include "mfc.h"
#include "regs-pmu.h"
+#include "regs-sys.h"
static struct map_desc exynos4_iodesc[] __initdata = {
{
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 202ca73..f127c0c 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -35,6 +35,7 @@
#include "common.h"
#include "regs-pmu.h"
+#include "regs-sys.h"
/**
* struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 1d13b08..790af14 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -15,7 +15,6 @@
#include <mach/map.h>
#define S5P_PMUREG(x) (S5P_VA_PMU + (x))
-#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
#define S5P_CENTRAL_SEQ_CONFIGURATION S5P_PMUREG(0x0200)
@@ -188,8 +187,6 @@
/* For EXYNOS5 */
-#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
-
#define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408)
#define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C)
diff --git a/arch/arm/mach-exynos/regs-sys.h b/arch/arm/mach-exynos/regs-sys.h
new file mode 100644
index 0000000..84332b0
--- /dev/null
+++ b/arch/arm/mach-exynos/regs-sys.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * EXYNOS - system register definition
+ *
+ * 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 __ASM_ARCH_REGS_SYS_H
+#define __ASM_ARCH_REGS_SYS_H __FILE__
+
+#include <mach/map.h>
+
+#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
+
+/* For EXYNOS5 */
+#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
+
+#endif /* __ASM_ARCH_REGS_SYS_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 3/6] ARM: EXYNOS: Move SYSREG definition into sys-reg specific file
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
While making PMU implementation to be device tree based, there are
few register offsets related with SYSREG present in regs-pmu.h, so
let's make a new header file "regs-sys.h" to keep all such SYSREG
related register offsets and remove them from "regs-pmu.h"
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 1 +
arch/arm/mach-exynos/pm.c | 1 +
arch/arm/mach-exynos/regs-pmu.h | 3 ---
arch/arm/mach-exynos/regs-sys.h | 22 ++++++++++++++++++++++
4 files changed, 24 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/mach-exynos/regs-sys.h
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index e54d885..4a69b3f 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -29,6 +29,7 @@
#include "common.h"
#include "mfc.h"
#include "regs-pmu.h"
+#include "regs-sys.h"
static struct map_desc exynos4_iodesc[] __initdata = {
{
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 202ca73..f127c0c 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -35,6 +35,7 @@
#include "common.h"
#include "regs-pmu.h"
+#include "regs-sys.h"
/**
* struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 1d13b08..790af14 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -15,7 +15,6 @@
#include <mach/map.h>
#define S5P_PMUREG(x) (S5P_VA_PMU + (x))
-#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
#define S5P_CENTRAL_SEQ_CONFIGURATION S5P_PMUREG(0x0200)
@@ -188,8 +187,6 @@
/* For EXYNOS5 */
-#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
-
#define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408)
#define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C)
diff --git a/arch/arm/mach-exynos/regs-sys.h b/arch/arm/mach-exynos/regs-sys.h
new file mode 100644
index 0000000..84332b0
--- /dev/null
+++ b/arch/arm/mach-exynos/regs-sys.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * EXYNOS - system register definition
+ *
+ * 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 __ASM_ARCH_REGS_SYS_H
+#define __ASM_ARCH_REGS_SYS_H __FILE__
+
+#include <mach/map.h>
+
+#define S5P_SYSREG(x) (S3C_VA_SYS + (x))
+
+/* For EXYNOS5 */
+#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234)
+
+#endif /* __ASM_ARCH_REGS_SYS_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 4/6] ARM: EXYNOS: Remove file path from comment section
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
Many files under "arm/mach-exynos" are having file path in file
comment section which is invalid now.
So for better code maintainability let's remove them.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/headsmp.S | 1 -
arch/arm/mach-exynos/hotplug.c | 3 +--
arch/arm/mach-exynos/include/mach/map.h | 3 +--
arch/arm/mach-exynos/include/mach/memory.h | 3 +--
arch/arm/mach-exynos/platsmp.c | 3 +--
5 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S
index cdd9d91..b54f970 100644
--- a/arch/arm/mach-exynos/headsmp.S
+++ b/arch/arm/mach-exynos/headsmp.S
@@ -1,5 +1,4 @@
/*
- * linux/arch/arm/mach-exynos4/headsmp.S
*
* Cloned from linux/arch/arm/mach-realview/headsmp.S
*
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 8a134d0..572f6b1 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -1,5 +1,4 @@
-/* linux arch/arm/mach-exynos4/hotplug.c
- *
+/*
* Cloned from linux/arch/arm/mach-realview/hotplug.c
*
* Copyright (C) 2002 ARM Ltd.
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 548269a..963002f 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos/include/mach/map.h
- *
+/*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
index 2a4cdb7..e19df1f 100644
--- a/arch/arm/mach-exynos/include/mach/memory.h
+++ b/arch/arm/mach-exynos/include/mach/memory.h
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos4/include/mach/memory.h
- *
+/*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index ec02422..f82fd8d 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos4/platsmp.c
- *
+ /*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 4/6] ARM: EXYNOS: Remove file path from comment section
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
Many files under "arm/mach-exynos" are having file path in file
comment section which is invalid now.
So for better code maintainability let's remove them.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/headsmp.S | 1 -
arch/arm/mach-exynos/hotplug.c | 3 +--
arch/arm/mach-exynos/include/mach/map.h | 3 +--
arch/arm/mach-exynos/include/mach/memory.h | 3 +--
arch/arm/mach-exynos/platsmp.c | 3 +--
5 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S
index cdd9d91..b54f970 100644
--- a/arch/arm/mach-exynos/headsmp.S
+++ b/arch/arm/mach-exynos/headsmp.S
@@ -1,5 +1,4 @@
/*
- * linux/arch/arm/mach-exynos4/headsmp.S
*
* Cloned from linux/arch/arm/mach-realview/headsmp.S
*
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 8a134d0..572f6b1 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -1,5 +1,4 @@
-/* linux arch/arm/mach-exynos4/hotplug.c
- *
+/*
* Cloned from linux/arch/arm/mach-realview/hotplug.c
*
* Copyright (C) 2002 ARM Ltd.
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 548269a..963002f 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos/include/mach/map.h
- *
+/*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
index 2a4cdb7..e19df1f 100644
--- a/arch/arm/mach-exynos/include/mach/memory.h
+++ b/arch/arm/mach-exynos/include/mach/memory.h
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos4/include/mach/memory.h
- *
+/*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index ec02422..f82fd8d 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-exynos4/platsmp.c
- *
+ /*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 5/6] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
Current "pm_domain.c" file uses "S5P_INT_LOCAL_PWR_EN" definition from
"regs-pmu.h" and hence needs to include this header file. As there is
no other user of "S5P_INT_LOCAL_PWR_EN" definition other than pm_domain,
to remove "regs-pmu.h" header file dependency from "pm_domain.c" it's
better we define this definition in "pm_domain.c" file itself and thus it
will help in removing header file inclusion from "pm_domain.c".
Also removing "S5P_" prefix from macro.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pm_domains.c | 8 ++++----
arch/arm/mach-exynos/regs-pmu.h | 1 -
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index fe6570e..bcd8dcf 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -22,7 +22,7 @@
#include <linux/of_platform.h>
#include <linux/sched.h>
-#include "regs-pmu.h"
+#define INT_LOCAL_PWR_EN 0x7
/*
* Exynos specific wrapper around the generic power domain
@@ -44,13 +44,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct exynos_pm_domain, pd);
base = pd->base;
- pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
+ pwr = power_on ? INT_LOCAL_PWR_EN : 0;
__raw_writel(pwr, base);
/* Wait max 1ms */
timeout = 10;
- while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN) != pwr) {
+ while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) {
if (!timeout) {
op = (power_on) ? "enable" : "disable";
pr_err("Power domain %s %s failed\n", domain->name, op);
@@ -172,7 +172,7 @@ static __init int exynos4_pm_init_power_domain(void)
platform_set_drvdata(pdev, pd);
- on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
+ on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN;
pm_genpd_init(&pd->pd, NULL, !on);
}
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 790af14..1993e6b 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -126,7 +126,6 @@
#define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8)
#define S5P_CORE_LOCAL_PWR_EN 0x3
-#define S5P_INT_LOCAL_PWR_EN 0x7
/* Only for EXYNOS4210 */
#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 5/6] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
Current "pm_domain.c" file uses "S5P_INT_LOCAL_PWR_EN" definition from
"regs-pmu.h" and hence needs to include this header file. As there is
no other user of "S5P_INT_LOCAL_PWR_EN" definition other than pm_domain,
to remove "regs-pmu.h" header file dependency from "pm_domain.c" it's
better we define this definition in "pm_domain.c" file itself and thus it
will help in removing header file inclusion from "pm_domain.c".
Also removing "S5P_" prefix from macro.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pm_domains.c | 8 ++++----
arch/arm/mach-exynos/regs-pmu.h | 1 -
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index fe6570e..bcd8dcf 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -22,7 +22,7 @@
#include <linux/of_platform.h>
#include <linux/sched.h>
-#include "regs-pmu.h"
+#define INT_LOCAL_PWR_EN 0x7
/*
* Exynos specific wrapper around the generic power domain
@@ -44,13 +44,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct exynos_pm_domain, pd);
base = pd->base;
- pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
+ pwr = power_on ? INT_LOCAL_PWR_EN : 0;
__raw_writel(pwr, base);
/* Wait max 1ms */
timeout = 10;
- while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN) != pwr) {
+ while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) {
if (!timeout) {
op = (power_on) ? "enable" : "disable";
pr_err("Power domain %s %s failed\n", domain->name, op);
@@ -172,7 +172,7 @@ static __init int exynos4_pm_init_power_domain(void)
platform_set_drvdata(pdev, pd);
- on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
+ on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN;
pm_genpd_init(&pd->pd, NULL, !on);
}
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 790af14..1993e6b 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -126,7 +126,6 @@
#define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8)
#define S5P_CORE_LOCAL_PWR_EN 0x3
-#define S5P_INT_LOCAL_PWR_EN 0x7
/* Only for EXYNOS4210 */
#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 6/6] ARM: EXYNOS: Remove "linux/bug.h" from pmu.c
2014-06-25 12:45 ` Pankaj Dubey
@ 2014-06-25 12:45 ` Pankaj Dubey
-1 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: kgene.kim, linux, t.figa, vikas.sajjan, joshi, naushad, chow.kim,
Pankaj Dubey
This patch removes unnecessary header file inclusion from pmu.c.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pmu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index fb0deda..dcfcb44 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -11,7 +11,6 @@
#include <linux/io.h>
#include <linux/kernel.h>
-#include <linux/bug.h>
#include "common.h"
#include "regs-pmu.h"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v5 6/6] ARM: EXYNOS: Remove "linux/bug.h" from pmu.c
@ 2014-06-25 12:45 ` Pankaj Dubey
0 siblings, 0 replies; 14+ messages in thread
From: Pankaj Dubey @ 2014-06-25 12:45 UTC (permalink / raw)
To: linux-arm-kernel
This patch removes unnecessary header file inclusion from pmu.c.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
---
arch/arm/mach-exynos/pmu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index fb0deda..dcfcb44 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -11,7 +11,6 @@
#include <linux/io.h>
#include <linux/kernel.h>
-#include <linux/bug.h>
#include "common.h"
#include "regs-pmu.h"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-06-25 12:50 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 12:45 [PATCH v5 0/6] Cleanup patches for mach-exynos Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 1/6] ARM: EXYNOS: Make exynos machine_ops as static Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 2/6] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 3/6] ARM: EXYNOS: Move SYSREG definition into sys-reg specific file Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 4/6] ARM: EXYNOS: Remove file path from comment section Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 5/6] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
2014-06-25 12:45 ` [PATCH v5 6/6] ARM: EXYNOS: Remove "linux/bug.h" from pmu.c Pankaj Dubey
2014-06-25 12:45 ` Pankaj Dubey
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.