aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6c074f37cdd2..716247ed9e0c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -769,8 +769,8 @@ static int _init_main_clk(struct omap_hwmod *oh)
769 769
770 oh->_clk = clk_get(NULL, oh->main_clk); 770 oh->_clk = clk_get(NULL, oh->main_clk);
771 if (IS_ERR(oh->_clk)) { 771 if (IS_ERR(oh->_clk)) {
772 pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", 772 pr_warn("omap_hwmod: %s: cannot clk_get main_clk %s\n",
773 oh->name, oh->main_clk); 773 oh->name, oh->main_clk);
774 return -EINVAL; 774 return -EINVAL;
775 } 775 }
776 /* 776 /*
@@ -814,8 +814,8 @@ static int _init_interface_clks(struct omap_hwmod *oh)
814 814
815 c = clk_get(NULL, os->clk); 815 c = clk_get(NULL, os->clk);
816 if (IS_ERR(c)) { 816 if (IS_ERR(c)) {
817 pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", 817 pr_warn("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
818 oh->name, os->clk); 818 oh->name, os->clk);
819 ret = -EINVAL; 819 ret = -EINVAL;
820 continue; 820 continue;
821 } 821 }
@@ -851,8 +851,8 @@ static int _init_opt_clks(struct omap_hwmod *oh)
851 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { 851 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
852 c = clk_get(NULL, oc->clk); 852 c = clk_get(NULL, oc->clk);
853 if (IS_ERR(c)) { 853 if (IS_ERR(c)) {
854 pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", 854 pr_warn("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
855 oh->name, oc->clk); 855 oh->name, oc->clk);
856 ret = -EINVAL; 856 ret = -EINVAL;
857 continue; 857 continue;
858 } 858 }
@@ -1576,7 +1576,7 @@ static int _init_clkdm(struct omap_hwmod *oh)
1576 1576
1577 oh->clkdm = clkdm_lookup(oh->clkdm_name); 1577 oh->clkdm = clkdm_lookup(oh->clkdm_name);
1578 if (!oh->clkdm) { 1578 if (!oh->clkdm) {
1579 pr_warning("omap_hwmod: %s: could not associate to clkdm %s\n", 1579 pr_warn("omap_hwmod: %s: could not associate to clkdm %s\n",
1580 oh->name, oh->clkdm_name); 1580 oh->name, oh->clkdm_name);
1581 return 0; 1581 return 0;
1582 } 1582 }
@@ -1616,7 +1616,7 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
1616 if (!ret) 1616 if (!ret)
1617 oh->_state = _HWMOD_STATE_CLKS_INITED; 1617 oh->_state = _HWMOD_STATE_CLKS_INITED;
1618 else 1618 else
1619 pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name); 1619 pr_warn("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
1620 1620
1621 return ret; 1621 return ret;
1622} 1622}
@@ -1739,7 +1739,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1739 _disable_clocks(oh); 1739 _disable_clocks(oh);
1740 1740
1741 if (ret == -EBUSY) 1741 if (ret == -EBUSY)
1742 pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name); 1742 pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name);
1743 1743
1744 if (!ret) { 1744 if (!ret) {
1745 /* 1745 /*
@@ -1953,8 +1953,8 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1953 1953
1954 c = _wait_softreset_complete(oh); 1954 c = _wait_softreset_complete(oh);
1955 if (c == MAX_MODULE_SOFTRESET_WAIT) { 1955 if (c == MAX_MODULE_SOFTRESET_WAIT) {
1956 pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", 1956 pr_warn("omap_hwmod: %s: softreset failed (waited %d usec)\n",
1957 oh->name, MAX_MODULE_SOFTRESET_WAIT); 1957 oh->name, MAX_MODULE_SOFTRESET_WAIT);
1958 ret = -ETIMEDOUT; 1958 ret = -ETIMEDOUT;
1959 goto dis_opt_clks; 1959 goto dis_opt_clks;
1960 } else { 1960 } else {
@@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void)
2065 2065
2066 spin_lock_irqsave(&io_chain_lock, flags); 2066 spin_lock_irqsave(&io_chain_lock, flags);
2067 2067
2068 if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl()) 2068 if (cpu_is_omap34xx())
2069 omap3xxx_prm_reconfigure_io_chain(); 2069 omap3xxx_prm_reconfigure_io_chain();
2070 else if (cpu_is_omap44xx()) 2070 else if (cpu_is_omap44xx())
2071 omap44xx_prm_reconfigure_io_chain(); 2071 omap44xx_prm_reconfigure_io_chain();
@@ -2185,6 +2185,8 @@ static int _enable(struct omap_hwmod *oh)
2185 oh->mux->pads_dynamic))) { 2185 oh->mux->pads_dynamic))) {
2186 omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); 2186 omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED);
2187 _reconfigure_io_chain(); 2187 _reconfigure_io_chain();
2188 } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) {
2189 _reconfigure_io_chain();
2188 } 2190 }
2189 2191
2190 _add_initiator_dep(oh, mpu_oh); 2192 _add_initiator_dep(oh, mpu_oh);
@@ -2291,6 +2293,8 @@ static int _idle(struct omap_hwmod *oh)
2291 if (oh->mux && oh->mux->pads_dynamic) { 2293 if (oh->mux && oh->mux->pads_dynamic) {
2292 omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE); 2294 omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE);
2293 _reconfigure_io_chain(); 2295 _reconfigure_io_chain();
2296 } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) {
2297 _reconfigure_io_chain();
2294 } 2298 }
2295 2299
2296 oh->_state = _HWMOD_STATE_IDLE; 2300 oh->_state = _HWMOD_STATE_IDLE;
@@ -2614,8 +2618,8 @@ static int __init _setup_reset(struct omap_hwmod *oh)
2614 if (oh->rst_lines_cnt == 0) { 2618 if (oh->rst_lines_cnt == 0) {
2615 r = _enable(oh); 2619 r = _enable(oh);
2616 if (r) { 2620 if (r) {
2617 pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n", 2621 pr_warn("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
2618 oh->name, oh->_state); 2622 oh->name, oh->_state);
2619 return -EINVAL; 2623 return -EINVAL;
2620 } 2624 }
2621 } 2625 }
@@ -3345,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
3345 if (!ois) 3349 if (!ois)
3346 return 0; 3350 return 0;
3347 3351
3352 if (ois[0] == NULL) /* Empty list */
3353 return 0;
3354
3348 if (!linkspace) { 3355 if (!linkspace) {
3349 if (_alloc_linkspace(ois)) { 3356 if (_alloc_linkspace(ois)) {
3350 pr_err("omap_hwmod: could not allocate link space\n"); 3357 pr_err("omap_hwmod: could not allocate link space\n");