diff options
author | Rajendra Nayak <rnayak@ti.com> | 2012-09-22 04:24:16 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-09-22 12:50:01 -0400 |
commit | 6ea74cb9853e923f8945586cd9ccdd42e6f00ba9 (patch) | |
tree | dc0bdc6011cf84b69111baaa5552db065693328a /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 4d7cb45ee823541632a3d50f57031ce9fd60e13f (diff) |
ARM: OMAP2+: hwmod: get rid of all omap_clk_get_by_name usage
Moving to Common clk framework for OMAP would mean we no longer use
internal lookup mechanism like omap_clk_get_by_name().
get rid of all its usage mostly from hwmod and omap_device
code.
Moving to clk_get() also means the respective platforms
need the clkdev tables updated with an entry for all clocks
used by hwmod to have clock name same as the alias.
Based on original changes from Mike Turquette.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
[paul@pwsan.com: removed IS_ERR_OR_NULL() conversion (rmk comment);
restricted omap_96m_alwon_fck_3630 to OMAP36xx; added missing AM35xx
clock aliases for emac_fck, emac_ick, vpfe_ick, vpfe_fck; added
aliases rng_ick and several emulation clocks]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 99fd3bb3c432..428dca631e12 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -679,8 +679,8 @@ static int _init_main_clk(struct omap_hwmod *oh) | |||
679 | if (!oh->main_clk) | 679 | if (!oh->main_clk) |
680 | return 0; | 680 | return 0; |
681 | 681 | ||
682 | oh->_clk = omap_clk_get_by_name(oh->main_clk); | 682 | oh->_clk = clk_get(NULL, oh->main_clk); |
683 | if (!oh->_clk) { | 683 | if (IS_ERR(oh->_clk)) { |
684 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", | 684 | pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", |
685 | oh->name, oh->main_clk); | 685 | oh->name, oh->main_clk); |
686 | return -EINVAL; | 686 | return -EINVAL; |
@@ -724,8 +724,8 @@ static int _init_interface_clks(struct omap_hwmod *oh) | |||
724 | if (!os->clk) | 724 | if (!os->clk) |
725 | continue; | 725 | continue; |
726 | 726 | ||
727 | c = omap_clk_get_by_name(os->clk); | 727 | c = clk_get(NULL, os->clk); |
728 | if (!c) { | 728 | if (IS_ERR(c)) { |
729 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", | 729 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", |
730 | oh->name, os->clk); | 730 | oh->name, os->clk); |
731 | ret = -EINVAL; | 731 | ret = -EINVAL; |
@@ -760,8 +760,8 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
760 | int ret = 0; | 760 | int ret = 0; |
761 | 761 | ||
762 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { | 762 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { |
763 | c = omap_clk_get_by_name(oc->clk); | 763 | c = clk_get(NULL, oc->clk); |
764 | if (!c) { | 764 | if (IS_ERR(c)) { |
765 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", | 765 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", |
766 | oh->name, oc->clk); | 766 | oh->name, oc->clk); |
767 | ret = -EINVAL; | 767 | ret = -EINVAL; |