From: Pankaj Dubey <pankaj.dubey@samsung.com> To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, t.figa@samsung.com, chow.kim@samsung.com, yg1004.jang@samsung.com, vikas.sajjan@samsung.com, Pankaj Dubey <pankaj.dubey@samsung.com> Subject: [PATCH v4 05/11] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain Date: Sat, 10 May 2014 15:56:32 +0900 [thread overview] Message-ID: <1399704998-13321-6-git-send-email-pankaj.dubey@samsung.com> (raw) In-Reply-To: <1399704998-13321-1-git-send-email-pankaj.dubey@samsung.com> From: Young-Gun Jang <yg1004.jang@samsung.com> 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: Young-Gun Jang <yg1004.jang@samsung.com> 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..e45d288 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 b68b5cc..fd8a19d 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -116,7 +116,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.10.4
WARNING: multiple messages have this Message-ID (diff)
From: pankaj.dubey@samsung.com (Pankaj Dubey) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 05/11] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain Date: Sat, 10 May 2014 15:56:32 +0900 [thread overview] Message-ID: <1399704998-13321-6-git-send-email-pankaj.dubey@samsung.com> (raw) In-Reply-To: <1399704998-13321-1-git-send-email-pankaj.dubey@samsung.com> From: Young-Gun Jang <yg1004.jang@samsung.com> 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: Young-Gun Jang <yg1004.jang@samsung.com> 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..e45d288 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 b68b5cc..fd8a19d 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -116,7 +116,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.10.4
next prev parent reply other threads:[~2014-05-10 6:38 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-05-10 6:56 [PATCH v4 00/11] ARM: Exynos: PMU cleanup and refactoring for using DT Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 01/11] ARM: EXYNOS: Make exynos machine_ops as static Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-10 11:43 ` Tomasz Figa 2014-06-10 11:43 ` Tomasz Figa 2014-05-10 6:56 ` [PATCH v4 02/11] ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-10 11:46 ` Tomasz Figa 2014-06-10 11:46 ` Tomasz Figa 2014-06-17 3:48 ` Pankaj Dubey 2014-06-17 3:48 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 03/11] ARM: EXYNOS: Move SYSREG definition into sys-reg specific file Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 04/11] ARM: EXYNOS: Remove file path from comment section Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey [this message] 2014-05-10 6:56 ` [PATCH v4 05/11] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 06/11] ARM: EXYNOS: Add support for mapping PMU base address via DT Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-10 17:10 ` Tomasz Figa 2014-06-10 17:10 ` Tomasz Figa 2014-06-17 6:43 ` Pankaj Dubey 2014-06-17 6:43 ` Pankaj Dubey 2014-06-17 15:26 ` Tomasz Figa 2014-06-17 15:26 ` Tomasz Figa 2014-06-17 15:32 ` [PATCH RFC] mfd: syscon: Decouple syscon interface from syscon devices Tomasz Figa 2014-06-17 15:32 ` Tomasz Figa 2014-06-17 15:42 ` Arnd Bergmann 2014-06-17 15:42 ` Arnd Bergmann 2014-06-17 21:26 ` Tomasz Figa 2014-06-17 21:26 ` Tomasz Figa 2014-06-18 8:26 ` Lee Jones 2014-06-18 8:26 ` Lee Jones 2014-06-24 11:03 ` Pankaj Dubey 2014-06-24 11:03 ` Pankaj Dubey 2014-06-18 12:57 ` Arnd Bergmann 2014-06-18 12:57 ` Arnd Bergmann 2014-06-19 0:06 ` Michal Simek 2014-06-19 0:06 ` Michal Simek 2014-07-28 4:15 ` Pankaj Dubey 2014-07-28 4:15 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 07/11] ARM: EXYNOS: Remove "linux/bug.h" from pmu.c Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 08/11] ARM: EXYNOS: Refactored code for using PMU address via DT Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-17 16:02 ` Tomasz Figa 2014-06-17 16:02 ` Tomasz Figa 2014-05-10 6:56 ` [PATCH v4 09/11] ARM: EXYNOS: Move "mach/map.h" inclusion from regs-pmu.h to platsmp.c Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-17 16:04 ` Tomasz Figa 2014-06-17 16:04 ` Tomasz Figa 2014-05-10 6:56 ` [PATCH v4 10/11] ARM: EXYNOS: Add platform driver support for Exynos PMU Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-06-17 17:12 ` Tomasz Figa 2014-06-17 17:12 ` Tomasz Figa 2014-06-24 11:28 ` Pankaj Dubey 2014-06-24 11:28 ` Pankaj Dubey 2014-06-25 0:11 ` Tomasz Figa 2014-06-25 0:11 ` Tomasz Figa 2014-06-25 4:30 ` Pankaj Dubey 2014-06-25 4:30 ` Pankaj Dubey 2014-05-10 6:56 ` [PATCH v4 11/11] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey 2014-05-10 6:56 ` Pankaj Dubey 2014-05-27 11:26 ` [PATCH v4 00/11] ARM: Exynos: PMU cleanup and refactoring for using DT Vikas Sajjan 2014-05-27 11:26 ` Vikas Sajjan 2014-05-27 11:26 ` Vikas Sajjan 2014-05-30 11:58 ` Tomasz Figa 2014-05-30 11:58 ` Tomasz Figa 2014-05-30 11:58 ` Tomasz Figa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1399704998-13321-6-git-send-email-pankaj.dubey@samsung.com \ --to=pankaj.dubey@samsung.com \ --cc=chow.kim@samsung.com \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=t.figa@samsung.com \ --cc=vikas.sajjan@samsung.com \ --cc=yg1004.jang@samsung.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.