Commit 6a06fa68 authored by Paul Walmsley's avatar Paul Walmsley Committed by paul

OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx

OMAP24xx chips don't support software-configurable sleep dependencies.
Test early for this so the compiler can redact the entire function body
on OMAP24xx.
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 33903eb5
...@@ -571,10 +571,10 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -571,10 +571,10 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{ {
struct powerdomain *p; struct powerdomain *p;
if (!pwrdm1) if (!cpu_is_omap34xx())
return -EINVAL; return -EINVAL;
if (!cpu_is_omap34xx()) if (!pwrdm1)
return -EINVAL; return -EINVAL;
p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
...@@ -610,10 +610,10 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -610,10 +610,10 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{ {
struct powerdomain *p; struct powerdomain *p;
if (!pwrdm1) if (!cpu_is_omap34xx())
return -EINVAL; return -EINVAL;
if (!cpu_is_omap34xx()) if (!pwrdm1)
return -EINVAL; return -EINVAL;
p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
...@@ -653,10 +653,10 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2) ...@@ -653,10 +653,10 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{ {
struct powerdomain *p; struct powerdomain *p;
if (!pwrdm1) if (!cpu_is_omap34xx())
return -EINVAL; return -EINVAL;
if (!cpu_is_omap34xx()) if (!pwrdm1)
return -EINVAL; return -EINVAL;
p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment