public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Subject: how to force IVA2 powerdomain OFF on boot
Date: Mon, 24 Nov 2008 18:05:59 -0800	[thread overview]
Message-ID: <8763mcr248.fsf@deeprootsystems.com> (raw)

Hello,

For some strange reason, some bootloaders (like u-boot on Beagle) seem
to power up the DSP/IVA2 during boot.  This of course will prevent
full-chip retention until the IVA is put into retention.

On several boards I've tested the PM branch, after kernel boot the
unused domains (like SGX, DSS, CAM, IVA2) are all in RET since the
init code sets next states to retention.  This is working except if
the bootloader has powered up the IVA2.

I'm trying to figure out why the IVA2 isn't going into RET, even when
iva2_fck is disabled during boot as part of the 'reset unused clocks'
feature.

I'm now trying to force the IVA2 into RET/OFF during boot by following
'Figure 14-46: IVA2 Power Down' in the TRM (see patch[1] below), but
that is not working.  IVA2 still stays ON.

Any ideas?

Kevin


[1] This is an attempt to implement Figure 14-46, and then
the 'reset unused clocks' will disable iva2_fck an finish the procedure.

khilman@vence:~/work/kernel/omap/dev$ git diff
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 804b3ac..5ef7cf8 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -591,6 +591,24 @@ int __init omap3_pm_init(void)
 
 	(void) clkdm_for_each(clkdms_setup, NULL);
 
+	{
+		struct powerdomain *iva2_pwrdm;
+		struct clockdomain *iva2_clkdm;
+
+		iva2_pwrdm = pwrdm_lookup("iva2_pwrdm");
+		iva2_clkdm = clkdm_lookup("iva2_clkdm");
+
+		if (iva2_pwrdm && iva2_clkdm) {
+			u32 pwrst;
+
+			pwrdm_set_next_pwrst(iva2_pwrdm, PWRDM_POWER_OFF);
+			cm_write_mod_reg(0x1, OMAP3430_IVA2_MOD, CM_CLKSTCTRL);
+			prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
+			omap2_clkdm_sleep(iva2_clkdm);
+		} else 
+			printk(KERN_ERR "KJH: Cannot reset IVA2\n");
+	}
+
 	mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
 	if (mpu_pwrdm == NULL) {
 		printk(KERN_ERR "Failed to get mpu_pwrdm\n");







             reply	other threads:[~2008-11-25  2:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25  2:05 Kevin Hilman [this message]
2008-11-25  7:06 ` how to force IVA2 powerdomain OFF on boot Hiroshi DOYU
2008-11-25 10:30 ` Jean Pihet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763mcr248.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox