aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-03 06:52:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-03 06:52:33 -0400
commit56f68556d7bbb51dd158c74deb09c783345bfbbd (patch)
tree536e6e3c7063b1eee927194dda257602bd3dc66f /arch/arm/mach-omap2/clock.c
parentfd9470ce3ac6fb54d6026e4b1cdab0936e34805e (diff)
parent7c8ad9828e793573877fd60868bb5d2f1e3b64da (diff)
Merge unstable branch 'omap-rmk'
Merge branch 'omap-rmk' into omap-all
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r--arch/arm/mach-omap2/clock.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index aa9b37370d44..57c4405cceda 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -278,7 +278,7 @@ int _omap2_clk_enable(struct clk *clk)
278 if (clk->enable) 278 if (clk->enable)
279 return clk->enable(clk); 279 return clk->enable(clk);
280 280
281 if (unlikely(clk->enable_reg == 0)) { 281 if (unlikely(clk->enable_reg == NULL)) {
282 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 282 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
283 clk->name); 283 clk->name);
284 return 0; /* REVISIT: -EINVAL */ 284 return 0; /* REVISIT: -EINVAL */
@@ -310,7 +310,7 @@ void _omap2_clk_disable(struct clk *clk)
310 return; 310 return;
311 } 311 }
312 312
313 if (clk->enable_reg == 0) { 313 if (clk->enable_reg == NULL) {
314 /* 314 /*
315 * 'Independent' here refers to a clock which is not 315 * 'Independent' here refers to a clock which is not
316 * controlled by its parent. 316 * controlled by its parent.
@@ -515,7 +515,7 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate)
515/* Given a clock and a rate apply a clock specific rounding function */ 515/* Given a clock and a rate apply a clock specific rounding function */
516long omap2_clk_round_rate(struct clk *clk, unsigned long rate) 516long omap2_clk_round_rate(struct clk *clk, unsigned long rate)
517{ 517{
518 if (clk->round_rate != 0) 518 if (clk->round_rate != NULL)
519 return clk->round_rate(clk, rate); 519 return clk->round_rate(clk, rate);
520 520
521 if (clk->flags & RATE_FIXED) 521 if (clk->flags & RATE_FIXED)
@@ -604,7 +604,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)
604 */ 604 */
605void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask) 605void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask)
606{ 606{
607 if (unlikely((clk->clksel_reg == 0) || (clk->clksel_mask == 0))) 607 if (unlikely((clk->clksel_reg == NULL) || (clk->clksel_mask == NULL)))
608 return NULL; 608 return NULL;
609 609
610 *field_mask = clk->clksel_mask; 610 *field_mask = clk->clksel_mask;
@@ -624,7 +624,7 @@ u32 omap2_clksel_get_divisor(struct clk *clk)
624 void __iomem *div_addr; 624 void __iomem *div_addr;
625 625
626 div_addr = omap2_get_clksel(clk, &field_mask); 626 div_addr = omap2_get_clksel(clk, &field_mask);
627 if (div_addr == 0) 627 if (div_addr == NULL)
628 return 0; 628 return 0;
629 629
630 field_val = __raw_readl(div_addr) & field_mask; 630 field_val = __raw_readl(div_addr) & field_mask;
@@ -643,7 +643,7 @@ int omap2_clksel_set_rate(struct clk *clk, unsigned long rate)
643 return -EINVAL; 643 return -EINVAL;
644 644
645 div_addr = omap2_get_clksel(clk, &field_mask); 645 div_addr = omap2_get_clksel(clk, &field_mask);
646 if (div_addr == 0) 646 if (div_addr == NULL)
647 return -EINVAL; 647 return -EINVAL;
648 648
649 field_val = omap2_divisor_to_clksel(clk, new_div); 649 field_val = omap2_divisor_to_clksel(clk, new_div);
@@ -681,7 +681,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
681 return -EINVAL; 681 return -EINVAL;
682 682
683 /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ 683 /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */
684 if (clk->set_rate != 0) 684 if (clk->set_rate != NULL)
685 ret = clk->set_rate(clk, rate); 685 ret = clk->set_rate(clk, rate);
686 686
687 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) 687 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
@@ -702,7 +702,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr,
702 const struct clksel_rate *clkr; 702 const struct clksel_rate *clkr;
703 703
704 *parent_div = 0; 704 *parent_div = 0;
705 *src_addr = 0; 705 *src_addr = NULL;
706 706
707 clks = omap2_get_clksel_by_parent(clk, src_clk); 707 clks = omap2_get_clksel_by_parent(clk, src_clk);
708 if (clks == NULL) 708 if (clks == NULL)
@@ -743,7 +743,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
743 743
744 field_val = omap2_clksel_get_src_field(&src_addr, new_parent, 744 field_val = omap2_clksel_get_src_field(&src_addr, new_parent,
745 &field_mask, clk, &parent_div); 745 &field_mask, clk, &parent_div);
746 if (src_addr == 0) 746 if (src_addr == NULL)
747 return -EINVAL; 747 return -EINVAL;
748 748
749 if (clk->usecount > 0) 749 if (clk->usecount > 0)