summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain44xx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-04-19 13:33:49 -0600
committerPaul Walmsley <paul@pwsan.com>2012-04-19 13:33:49 -0600
commit6ba5a69ee92c29c2ffc814dad6ac61c4cd49090c (patch)
treefac668ac66b82277034aefa5b6f756b4029d68ad /arch/arm/mach-omap2/clockdomain44xx.c
parent3af35fbcd088e0b675fa423a879c596384894180 (diff)
downloadblackbird-op-linux-6ba5a69ee92c29c2ffc814dad6ac61c4cd49090c.tar.gz
blackbird-op-linux-6ba5a69ee92c29c2ffc814dad6ac61c4cd49090c.zip
ARM: OMAP2+: clockdomains: make {prm,cm}_clkdm common
The PRM and CM implicit clockdomains will soon be used by OMAP44xx. So, make them common to OMAP2+ and modify the OMAP4 clockdomains code so use of these clockdomains doesn't crash the system. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain44xx.c')
-rw-r--r--arch/arm/mach-omap2/clockdomain44xx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c
index 935c7f03dab9..4f04dd11d655 100644
--- a/arch/arm/mach-omap2/clockdomain44xx.c
+++ b/arch/arm/mach-omap2/clockdomain44xx.c
@@ -51,6 +51,9 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm)
struct clkdm_dep *cd;
u32 mask = 0;
+ if (!clkdm->prcm_partition)
+ return 0;
+
for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) {
if (!cd->clkdm)
continue; /* only happens if data is erroneous */
@@ -103,6 +106,9 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm)
{
bool hwsup = false;
+ if (!clkdm->prcm_partition)
+ return 0;
+
hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
clkdm->cm_inst, clkdm->clkdm_offs);
OpenPOWER on IntegriCloud