Commit 319c8409 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Simon Horman

soc: renesas: rcar-sysc: Remove rcar_sysc_power_{down,up}() helpers

Until commit 7e8a50df ("soc: renesas: rcar-sysc: Drop legacy
handling"), the rcar_sysc_power_{down,up}() helpers were public, as they
were called by the legacy (pre-DT) CPU power management code on R-Car H1
and R-Car Gen2 before.

As they are just one-line wrappers around rcar_sysc_power(), it makes
sense to just remove them.

This also avoids a bool/helper/bool conversion in rcar_sysc_power_cpu(),
where a bool is checked to call one of two helper functions, which
just call rcar_sysc_power() with hardcoded boolean values again.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent b0d7fbf8
...@@ -146,16 +146,6 @@ static int rcar_sysc_power(const struct rcar_sysc_ch *sysc_ch, bool on) ...@@ -146,16 +146,6 @@ static int rcar_sysc_power(const struct rcar_sysc_ch *sysc_ch, bool on)
return ret; return ret;
} }
static int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch)
{
return rcar_sysc_power(sysc_ch, false);
}
static int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch)
{
return rcar_sysc_power(sysc_ch, true);
}
static bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch) static bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
{ {
unsigned int st; unsigned int st;
...@@ -184,7 +174,7 @@ static int rcar_sysc_pd_power_off(struct generic_pm_domain *genpd) ...@@ -184,7 +174,7 @@ static int rcar_sysc_pd_power_off(struct generic_pm_domain *genpd)
struct rcar_sysc_pd *pd = to_rcar_pd(genpd); struct rcar_sysc_pd *pd = to_rcar_pd(genpd);
pr_debug("%s: %s\n", __func__, genpd->name); pr_debug("%s: %s\n", __func__, genpd->name);
return rcar_sysc_power_down(&pd->ch); return rcar_sysc_power(&pd->ch, false);
} }
static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd) static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd)
...@@ -192,7 +182,7 @@ static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd) ...@@ -192,7 +182,7 @@ static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd)
struct rcar_sysc_pd *pd = to_rcar_pd(genpd); struct rcar_sysc_pd *pd = to_rcar_pd(genpd);
pr_debug("%s: %s\n", __func__, genpd->name); pr_debug("%s: %s\n", __func__, genpd->name);
return rcar_sysc_power_up(&pd->ch); return rcar_sysc_power(&pd->ch, true);
} }
static bool has_cpg_mstp; static bool has_cpg_mstp;
...@@ -252,7 +242,7 @@ static int __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd) ...@@ -252,7 +242,7 @@ static int __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
goto finalize; goto finalize;
} }
rcar_sysc_power_up(&pd->ch); rcar_sysc_power(&pd->ch, true);
finalize: finalize:
error = pm_genpd_init(genpd, gov, false); error = pm_genpd_init(genpd, gov, false);
...@@ -478,8 +468,7 @@ static int rcar_sysc_power_cpu(unsigned int idx, bool on) ...@@ -478,8 +468,7 @@ static int rcar_sysc_power_cpu(unsigned int idx, bool on)
if (!(pd->flags & PD_CPU) || pd->ch.chan_bit != idx) if (!(pd->flags & PD_CPU) || pd->ch.chan_bit != idx)
continue; continue;
return on ? rcar_sysc_power_up(&pd->ch) return rcar_sysc_power(&pd->ch, on);
: rcar_sysc_power_down(&pd->ch);
} }
return -ENOENT; return -ENOENT;
......
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