linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 13/18] OMAP2/3 clock: clean up omap*_clk_arch_init()
Date: Tue, 19 Jan 2010 16:36:30 -0700	[thread overview]
Message-ID: <20100119233626.26047.20505.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100119232900.26047.98263.stgit@localhost.localdomain>

In the OMAP3xxx clock code, remove the #ifdef CONFIG_ARCH_OMAP3 in
clock34xx.c, since this file is only compiled for OMAP3xxx builds.  Also,
rename omap2_clk_arch_init in this file to omap3xxx_clk_arch_init() to
pave the way for multi-OMAP kernels.  Ensure that it is not executed
on non-OMAP3xxx systems.

In the OMAP2xxx clock code, rename omap2_clk_arch_init in this file to
omap2xxx_clk_arch_init() to pave the way for multi-OMAP kernels.
Ensure that it is not executed on non-OMAP2xxx systems.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/clock2xxx.c |    7 +++++--
 arch/arm/mach-omap2/clock34xx.c |   16 +++++-----------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
index e5b9851..b7e81ec 100644
--- a/arch/arm/mach-omap2/clock2xxx.c
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -101,11 +101,14 @@ void omap2_clk_prepare_for_reboot(void)
  * Switch the MPU rate if specified on cmdline.
  * We cannot do this early until cmdline is parsed.
  */
-static int __init omap2_clk_arch_init(void)
+static int __init omap2xxx_clk_arch_init(void)
 {
 	struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
 	unsigned long sys_ck_rate;
 
+	if (!cpu_is_omap24xx())
+		return 0;
+
 	if (!mpurate)
 		return -EINVAL;
 
@@ -129,6 +132,6 @@ static int __init omap2_clk_arch_init(void)
 
 	return 0;
 }
-arch_initcall(omap2_clk_arch_init);
+arch_initcall(omap2xxx_clk_arch_init);
 
 
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 552ad30..d38ad44 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -163,12 +163,6 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
 /* Common clock code */
 
 /*
- * As it is structured now, this will prevent an OMAP2/3 multiboot
- * kernel from compiling.  This will need further attention.
- */
-#if defined(CONFIG_ARCH_OMAP3)
-
-/*
  * Set clocks for bypass mode for reboot to work.
  */
 void omap2_clk_prepare_for_reboot(void)
@@ -213,11 +207,14 @@ void omap3_clk_lock_dpll5(void)
  * Switch the MPU rate if specified on cmdline.
  * We cannot do this early until cmdline is parsed.
  */
-static int __init omap2_clk_arch_init(void)
+static int __init omap3xxx_clk_arch_init(void)
 {
 	struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
 	unsigned long osc_sys_rate;
 
+	if (!cpu_is_omap34xx())
+		return 0;
+
 	if (!mpurate)
 		return -EINVAL;
 
@@ -246,9 +243,6 @@ static int __init omap2_clk_arch_init(void)
 
 	return 0;
 }
-arch_initcall(omap2_clk_arch_init);
-
-
-#endif
+arch_initcall(omap3xxx_clk_arch_init);
 
 

  parent reply	other threads:[~2010-01-19 23:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 23:35 [PATCH v2 00/18] OMAP2/3/4 clock: split out code for clock types and clean up Paul Walmsley
2010-01-19 23:35 ` [PATCH v2 01/18] OMAP3 clock: move OMAP3-specific DPLL functions to dpll3xxx.c Paul Walmsley
2010-01-19 23:35 ` [PATCH v2 02/18] OMAP2/3/4 clock: move DPLL clock functions into mach-omap2/clkt_dpll.c Paul Walmsley
2010-01-19 23:35 ` [PATCH v2 03/18] OMAP2/3/4 clock: move clksel clock functions into mach-omap2/clkt_clksel.c Paul Walmsley
2010-01-19 23:35 ` [PATCH v2 04/18] OMAP2 clock: move all static functions to the top of the file Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 05/18] OMAP2/3/4 clock: combine all omap2_clk_functions Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 06/18] OMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpllcore.c Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 07/18] OMAP2xxx clock: move the DVFS virtual clock code into mach-omap2/clkt2xxx_virt_prcm_set.c Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 08/18] OMAP2xxx clock: move the APLL clock code into mach-omap2/clkt2xxx_apll.c Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 09/18] OMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 10/18] OMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 11/18] OMAP2 clock: don't compile OMAP2430-only functions on non-2430 builds Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 12/18] OMAP3 clock: split out DPLL3 M2 divider functions into mach-omap2/clkt3xxx_dpll3m2.c Paul Walmsley
2010-01-19 23:36 ` Paul Walmsley [this message]
2010-01-19 23:36 ` [PATCH v2 14/18] OMAP2/3 clock: remove unnecessary includes and clean up header Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 15/18] OMAP2/3/4 clock: omap2_clk_prepare_for_reboot() is OMAP2xxx-only Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 16/18] OMAP3 DPLL: reorganize static functions Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 17/18] OMAP clock: resolve all remaining sparse warnings Paul Walmsley
2010-01-19 23:36 ` [PATCH v2 18/18] OMAP2/3/4 clock: rename and clean the omap2_clk_init() functions Paul Walmsley

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=20100119233626.26047.20505.stgit@localhost.localdomain \
    --to=paul@pwsan.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).