From: R Sricharan <r.sricharan@ti.com>
To: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, santosh.shilimkar@ti.com,
tony@atomide.com, b-cousson@ti.com, r.sricharan@ti.com,
paul@pswan.com
Subject: [PATCH 1/4] ARM: OMAP2+: Introduce CONFIG_SOC_HAS_OMAP_DPLL macro
Date: Thu, 10 May 2012 22:36:52 +0530 [thread overview]
Message-ID: <1336669615-16454-2-git-send-email-r.sricharan@ti.com> (raw)
In-Reply-To: <1336669615-16454-1-git-send-email-r.sricharan@ti.com>
The DPLL ip was introduced and used in the OMAP3PLUS socs, while
OMAP2 had the APLL IP. There are some features which are common
to both ips, and some which are only applicable to DPLL ip's.
Currently CONFIG_ARCH_OMAP_XXX checks is used to conditionally
compile the additional features for every applicable SOC. This
makes it nessecary to add new a check for every new SOC added
in the future.
So by introducing a new "SOC_HAS_OMAP_DPLL" config such new #ifdefs
can be avoided for the future socs and also to cleanup the existing
ifdefferies.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
---
arch/arm/mach-omap2/Kconfig | 5 +++++
arch/arm/mach-omap2/clock.c | 2 +-
arch/arm/plat-omap/include/plat/clock.h | 4 ++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 0685dc8..9a8d691 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -27,9 +27,13 @@ config ARCH_OMAP2
select CPU_V6
select MULTI_IRQ_HANDLER
+config SOC_HAS_OMAP_DPLL
+ bool
+
config ARCH_OMAP3
bool "TI OMAP3"
depends on ARCH_OMAP2PLUS
+ select SOC_HAS_OMAP_DPLL
default y
select CPU_V7
select USB_ARCH_HAS_EHCI if USB_SUPPORT
@@ -42,6 +46,7 @@ config ARCH_OMAP4
bool "TI OMAP4"
default y
depends on ARCH_OMAP2PLUS
+ select SOC_HAS_OMAP_DPLL
select CACHE_L2X0
select CPU_V7
select ARM_GIC
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index d9f4931..629cd2d 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -400,7 +400,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
/* OMAP3/4 non-CORE DPLL clkops */
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
+#ifdef CONFIG_SOC_HAS_OMAP_DPLL
const struct clkops clkops_omap3_noncore_dpll_ops = {
.enable = omap3_noncore_dpll_enable,
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index d0ef57c..095bee8 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -156,7 +156,7 @@ struct dpll_data {
u8 min_divider;
u16 max_divider;
u8 modes;
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
+#ifdef CONFIG_SOC_HAS_OMAP_DPLL
void __iomem *autoidle_reg;
void __iomem *idlest_reg;
u32 autoidle_mask;
@@ -167,7 +167,7 @@ struct dpll_data {
u8 auto_recal_bit;
u8 recal_en_bit;
u8 recal_st_bit;
-# endif
+#endif
u8 flags;
};
--
1.7.1
next prev parent reply other threads:[~2012-05-10 17:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 17:06 [PATCH 0/4] ARM: OMAP2+: Misc cleanup part2 R Sricharan
2012-05-10 17:06 ` R Sricharan [this message]
2012-05-10 18:26 ` [PATCH 1/4] ARM: OMAP2+: Introduce CONFIG_SOC_HAS_OMAP_DPLL macro Hiremath, Vaibhav
2012-05-11 6:16 ` R, Sricharan
2012-05-11 6:22 ` Hiremath, Vaibhav
2012-05-11 6:23 ` R, Sricharan
2012-05-10 17:06 ` [PATCH 2/4] ARM: OMAP2+: Move the stubbed prm and cm functions to prcm.c file and make them __weak R Sricharan
2012-05-10 17:41 ` Paul Walmsley
2012-05-10 17:44 ` Sricharan R
2012-06-14 11:56 ` R, Sricharan
2012-06-28 11:58 ` R, Sricharan
2012-07-04 15:19 ` Paul Walmsley
2012-07-04 15:25 ` R, Sricharan
2012-05-10 17:06 ` [PATCH 3/4] ARM: OMAP2+: Move stubbed secure_sram_reserve function to a common.c and call it __weak R Sricharan
2012-05-10 17:06 ` [PATCH 4/4] ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme R Sricharan
2012-05-10 17:17 ` [PATCH 0/4] ARM: OMAP2+: Misc cleanup part2 Sricharan R
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=1336669615-16454-2-git-send-email-r.sricharan@ti.com \
--to=r.sricharan@ti.com \
--cc=b-cousson@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pswan.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).