From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] OMAP1/2/3 clock: remove paranoid checks in preparation for clock{, 2xxx, 3xxx}_data.c
Date: Thu, 03 Dec 2009 03:07:02 -0700 [thread overview]
Message-ID: <20091203100658.1203.42063.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091203095830.1203.76290.stgit@localhost.localdomain>
Some parts of the clock code took advantage of the fact that the statically
allocated clock tree was in clock{,24xx,34xx}.c's local namespace to do some
extra argument checks. These are overzealous and are more difficult to
maintain when the clock tree is in a separate namespace, so, remove them.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap1/clock.c | 6 ------
arch/arm/mach-omap2/clock24xx.c | 6 ------
arch/arm/mach-omap2/clock34xx.c | 18 ------------------
3 files changed, 0 insertions(+), 30 deletions(-)
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 42cbe20..e006493 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -376,9 +376,6 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
/* Find the highest supported frequency <= rate and switch to it */
struct mpu_rate * ptr;
- if (clk != &virtual_ck_mpu)
- return -EINVAL;
-
for (ptr = rate_table; ptr->rate; ptr++) {
if (ptr->xtal != ck_ref.rate)
continue;
@@ -465,9 +462,6 @@ static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate)
struct mpu_rate * ptr;
long highest_rate;
- if (clk != &virtual_ck_mpu)
- return -EINVAL;
-
highest_rate = -EINVAL;
for (ptr = rate_table; ptr->rate; ptr++) {
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index 845b478..8ecd175 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -512,9 +512,6 @@ static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
struct prcm_config *ptr;
long highest_rate;
- if (clk != &virt_prcm_set)
- return -EINVAL;
-
highest_rate = -EINVAL;
for (ptr = rate_table; ptr->mpu_speed; ptr++) {
@@ -540,9 +537,6 @@ static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
unsigned long found_speed = 0;
unsigned long flags;
- if (clk != &virt_prcm_set)
- return -EINVAL;
-
for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask))
continue;
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 2878733..a4b903d 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -520,9 +520,6 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
u8 ai;
int r;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
pr_debug("clock: locking DPLL %s\n", clk->name);
ai = omap3_dpll_autoidle_read(clk);
@@ -557,9 +554,6 @@ static int _omap3_noncore_dpll_bypass(struct clk *clk)
int r;
u8 ai;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS)))
return -EINVAL;
@@ -593,9 +587,6 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
{
u8 ai;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP)))
return -EINVAL;
@@ -632,9 +623,6 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
int r;
struct dpll_data *dd;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
dd = clk->dpll_data;
if (!dd)
return -EINVAL;
@@ -669,9 +657,6 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
*/
static void omap3_noncore_dpll_disable(struct clk *clk)
{
- if (clk == &dpll3_ck)
- return;
-
_omap3_noncore_dpll_stop(clk);
}
@@ -844,9 +829,6 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
if (!clk || !rate)
return -EINVAL;
- if (clk != &dpll3_m2_ck)
- return -EINVAL;
-
validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
if (validrate != rate)
return -EINVAL;
next prev parent reply other threads:[~2009-12-03 10:11 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 10:06 [PATCH 0/8] OMAP clock: convert static definitions in header files to C files Paul Walmsley
2009-12-03 10:07 ` Paul Walmsley [this message]
2009-12-03 10:07 ` [PATCH 2/8] OMAP2 clock: APLL code shouldn't rely on static clocks in its local namespace Paul Walmsley
2009-12-03 10:07 ` [PATCH 3/8] OMAP2/3: move SDRC macros to mach-omap2/sdrc.h Paul Walmsley
2009-12-03 10:07 ` [PATCH 5/8] OMAP3 clock: convert clock34xx.h to clock34xx_data.c Paul Walmsley
2009-12-03 10:07 ` [PATCH 4/8] OMAP2xxx clock: remove implicit dependency between rate CPU flag and clkdev_omap CPU flag Paul Walmsley
2009-12-03 10:07 ` [PATCH 6/8] OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx* Paul Walmsley
2009-12-03 10:07 ` [PATCH 7/8] OMAP1 clock: convert test in disable_unused() to use ENABLE_ON_INIT Paul Walmsley
2009-12-03 10:07 ` [PATCH 8/8] OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c Paul Walmsley
2009-12-03 10:27 ` Russell King
2009-12-03 10:36 ` Paul Walmsley
2009-12-03 10:43 ` Russell King - ARM Linux
2009-12-03 10:57 ` Paul Walmsley
2009-12-03 11:22 ` [PATCH v2 5/8] OMAP3 clock: convert clock34xx.h to clock34xx_data.c Paul Walmsley
2009-12-03 11:23 ` [PATCH v2 6/8] OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx* Paul Walmsley
2009-12-03 11:24 ` [PATCH v2 8/8] OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c Paul Walmsley
2009-12-03 12:11 ` Russell King - ARM Linux
2009-12-03 12:33 ` Paul Walmsley
2009-12-03 15:03 ` Russell King - ARM Linux
2009-12-03 15:26 ` Paul Walmsley
2009-12-03 16:18 ` [PATCH v3 5/8] OMAP3 clock: convert clock34xx.h to clock34xx_data.c Paul Walmsley
2009-12-03 16:19 ` [PATCH v3 6/8] OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx* Paul Walmsley
2009-12-03 16:20 ` [PATCH v3 8/8] OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c Paul Walmsley
2009-12-03 10:29 ` [PATCH " Russell King
2009-12-03 10:37 ` Paul Walmsley
2009-12-03 10:41 ` Russell King - ARM Linux
2009-12-04 10:05 ` [PATCH 0/8] OMAP clock: convert static definitions in header files to C files Nayak, Rajendra
2009-12-04 10:13 ` Russell King - ARM Linux
2009-12-07 12:58 ` 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=20091203100658.1203.42063.stgit@localhost.localdomain \
--to=paul@pwsan.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.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