aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-01-17 15:28:17 -0500
committerPaul Walmsley <paul@pwsan.com>2011-01-18 14:36:53 -0500
commit56bc78d414aa79bce42836df6efe9b9bef92a59d (patch)
tree713cf0337c9dd03f618d310d9ea68b85936586fe
parentd8328f3b85f34c0dc5866f10bf6e7842fb511d62 (diff)
OMAP4: clockdomain: bypass unimplemented wake-up dependency functions on OMAP4
Commit 56a6a19dffda6b75cef8d4183c7c6ff650025cbd ("omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'") generates a lot of warnings on boot since clockdomain functions that manipulate wake-up dependencies are not implemented yet on OMAP4 for 2.6.38. This patch bypasses the OMAP2/3 functions on OMAP4, which in turn avoids the warnings when the functions would attempt to call the underlying OMAP2/3 PRCM functions. A one-line warning is still logged from the clockdomain code that the OMAP4 wake-up dependency code is not yet implemented. A clockdomain wake-up and sleep dependency implementation for OMAP4 from Rajendra should be possible to merge during the 2.6.39 merge window: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg41748.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg42222.html Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Rajendra Nayak <rnayak@ti.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r--arch/arm/mach-omap2/clockdomain.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index e20b98636ab4..58e42f76603f 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -423,6 +423,12 @@ int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
423{ 423{
424 struct clkdm_dep *cd; 424 struct clkdm_dep *cd;
425 425
426 if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
427 pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
428 clkdm1->name, clkdm2->name, __func__);
429 return -EINVAL;
430 }
431
426 if (!clkdm1 || !clkdm2) 432 if (!clkdm1 || !clkdm2)
427 return -EINVAL; 433 return -EINVAL;
428 434
@@ -458,6 +464,12 @@ int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
458{ 464{
459 struct clkdm_dep *cd; 465 struct clkdm_dep *cd;
460 466
467 if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
468 pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
469 clkdm1->name, clkdm2->name, __func__);
470 return -EINVAL;
471 }
472
461 if (!clkdm1 || !clkdm2) 473 if (!clkdm1 || !clkdm2)
462 return -EINVAL; 474 return -EINVAL;
463 475
@@ -500,6 +512,12 @@ int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
500 if (!clkdm1 || !clkdm2) 512 if (!clkdm1 || !clkdm2)
501 return -EINVAL; 513 return -EINVAL;
502 514
515 if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
516 pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
517 clkdm1->name, clkdm2->name, __func__);
518 return -EINVAL;
519 }
520
503 cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); 521 cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs);
504 if (IS_ERR(cd)) { 522 if (IS_ERR(cd)) {
505 pr_debug("clockdomain: hardware cannot set/clear wake up of " 523 pr_debug("clockdomain: hardware cannot set/clear wake up of "
@@ -527,6 +545,12 @@ int clkdm_clear_all_wkdeps(struct clockdomain *clkdm)
527 struct clkdm_dep *cd; 545 struct clkdm_dep *cd;
528 u32 mask = 0; 546 u32 mask = 0;
529 547
548 if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
549 pr_err("clockdomain: %s: %s: not yet implemented\n",
550 clkdm->name, __func__);
551 return -EINVAL;
552 }
553
530 if (!clkdm) 554 if (!clkdm)
531 return -EINVAL; 555 return -EINVAL;
532 556
@@ -830,8 +854,7 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm)
830 * dependency code and data for OMAP4. 854 * dependency code and data for OMAP4.
831 */ 855 */
832 if (cpu_is_omap44xx()) { 856 if (cpu_is_omap44xx()) {
833 WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency " 857 pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name);
834 "support is not yet implemented\n");
835 } else { 858 } else {
836 if (atomic_read(&clkdm->usecount) > 0) 859 if (atomic_read(&clkdm->usecount) > 0)
837 _clkdm_add_autodeps(clkdm); 860 _clkdm_add_autodeps(clkdm);
@@ -872,8 +895,7 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm)
872 * dependency code and data for OMAP4. 895 * dependency code and data for OMAP4.
873 */ 896 */
874 if (cpu_is_omap44xx()) { 897 if (cpu_is_omap44xx()) {
875 WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency " 898 pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name);
876 "support is not yet implemented\n");
877 } else { 899 } else {
878 if (atomic_read(&clkdm->usecount) > 0) 900 if (atomic_read(&clkdm->usecount) > 0)
879 _clkdm_del_autodeps(clkdm); 901 _clkdm_del_autodeps(clkdm);