Skip to content

Commit

Permalink
OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx
Browse files Browse the repository at this point in the history
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: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Paul Walmsley authored and paul committed Dec 12, 2009
1 parent 33903eb commit 6a06fa6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/arm/mach-omap2/powerdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,10 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{
struct powerdomain *p;

if (!pwrdm1)
if (!cpu_is_omap34xx())
return -EINVAL;

if (!cpu_is_omap34xx())
if (!pwrdm1)
return -EINVAL;

p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
Expand Down Expand Up @@ -610,10 +610,10 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{
struct powerdomain *p;

if (!pwrdm1)
if (!cpu_is_omap34xx())
return -EINVAL;

if (!cpu_is_omap34xx())
if (!pwrdm1)
return -EINVAL;

p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
Expand Down Expand Up @@ -653,10 +653,10 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
{
struct powerdomain *p;

if (!pwrdm1)
if (!cpu_is_omap34xx())
return -EINVAL;

if (!cpu_is_omap34xx())
if (!pwrdm1)
return -EINVAL;

p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
Expand Down

0 comments on commit 6a06fa6

Please sign in to comment.