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>
/* 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;
struct mpu_rate * ptr;
long highest_rate;
- if (clk != &virtual_ck_mpu)
- return -EINVAL;
-
highest_rate = -EINVAL;
for (ptr = rate_table; ptr->rate; ptr++) {
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++) {
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;
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);
int r;
u8 ai;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS)))
return -EINVAL;
{
u8 ai;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP)))
return -EINVAL;
int r;
struct dpll_data *dd;
- if (clk == &dpll3_ck)
- return -EINVAL;
-
dd = clk->dpll_data;
if (!dd)
return -EINVAL;
*/
static void omap3_noncore_dpll_disable(struct clk *clk)
{
- if (clk == &dpll3_ck)
- return;
-
_omap3_noncore_dpll_stop(clk);
}
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;