Skip to contentSkip to conversation

PM/RTC 3.5-rc5: System suspends fails when not built with RTC?

DISCUSSION Joe Woodward 5 participants 18 messages Jul 12, 2012 – Jul 26, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

...snip...

Quoted 20 lines
Quoted 3 lines

Hmm, interesting, I don't see this on my 3730-based Over FireSTORM.

But, after "converting" mine into an AirStorm[1], I see the same

errors

Quoted 1 line

as you're seeing. We're obviously doing something wrong when IVA

and/or

Quoted 1 line

SGX are not present, so I will look into it.

With the hack below on top of my pm branch, can you try to suspend/resume on your AirSTORM?

You'll get a bunch of noise from the clockdomain code becasue of the missing power domains, but you can ignore them.

I'm hoping this will fix your issue. Obviously, this hack is not a real
fix but just a test to see if the problem is where I think it is. If so, then I know the right solution and it's been discussed before but never been a priority (at least for me) to fix.

Quoted 6 lines

Basically, we still need to fix up the registration of certain hwmods and powerdomains based on whether or not certain IPs exist or not. We currently are rather blindly registering the hwmods for IVA, GFX etc.

Kevin

After applying the patch (and also your GPIO fix for the ads7846).

As you said, when booting lots of warnings are spat out:

[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at arch/arm/mach-omap2/clockdomain.c:237 _resolve_clkdm_deps.clone.0+0x98/0x108()
[    0.000000] Modules linked in:
[    0.000000]
[    0.000000] [<c001b75c>] (unwind_backtrace+0x0/0xf0) from [<c0041788>] (warn_slowpath_common+0x4c/0x64)
[    0.000000] [<c0041788>] (warn_slowpath_common+0x4c/0x64) from [<c0041834>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c0041834>] (warn_slowpath_fmt+0x30/0x40) from [<c00321a0>] (_resolve_clkdm_deps.clone.0+0x98/0x108)
[    0.000000] [<c00321a0>] (_resolve_clkdm_deps.clone.0+0x98/0x108) from [<c0032bb8>] (clkdm_complete_init+0x3c/0xa0)
[    0.000000] [<c0032bb8>] (clkdm_complete_init+0x3c/0xa0) from [<c06d2458>] (omap3_init_early+0x20/0x30)
[    0.000000] [<c06d2458>] (omap3_init_early+0x20/0x30) from [<c06ce1a8>] (setup_arch+0x814/0x934)
[    0.000000] [<c06ce1a8>] (setup_arch+0x814/0x934) from [<c06ca584>] (start_kernel+0x88/0x300)
[    0.000000] [<c06ca584>] (start_kernel+0x88/0x300) from [<80008044>] (0x80008044)
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---

And now when suspending I get:

# echo mem > /sys/power/state
[   78.174713] PM: Syncing filesystems ... done.
[   78.190582] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   78.216430] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[   78.247558] Suspending console(s) (use no_console_suspend to debug)
[   78.379241] PM: suspend of devices complete after 120.605 msecs
[   78.382934] PM: late suspend of devices complete after 3.692 msecs
[   78.388671] PM: noirq suspend of devices complete after 5.706 msecs
[   78.388732] Disabling non-boot CPUs ...
[  107.219818] Powerdomain (core_pwrdm) didn't enter target state 1
[  107.219818] Could not enter target state in pm_suspend
[  107.222808] PM: noirq resume of devices complete after 2.838 msecs
[  107.226684] PM: early resume of devices complete after 2.380 msecs
[  107.592620] mmc1: error -110 during resume (card was removed?)
[  107.602752] PM: resume of devices complete after 375.946 msecs
[  107.667449] Restarting tasks ... done.
sh: write error: Operation not permitted

So most of the warnings have gone, but core still fails to enter the target state.

This is sitll using the omap2plus_defconfig with:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

CONFIG_DMADEVICES=y
CONFIG_DMA_OMAP=y

CONFIG_SQUASHFS=y

All running from RAM-based RFS.

Cheers,
Joe

Quoted 32 lines
arch/arm/mach-omap2/powerdomains3xxx_data.c +0 -0
index bb883e4..b3568bb 100644
@@ -341,7 +341,7 @@ static struct powerdomain dpll5_pwrdm = {
 /* As powerdomains are added or removed above, this list must also be

changed */
static struct powerdomain *powerdomains_omap3430_common[] __initdata =
{

arch/arm/mach-omap2/powerdomains3xxx_data.c +2 -2
 	&wkup_omap2_pwrdm,
-	&iva2_pwrdm,
+	/* &iva2_pwrdm, */
 	&mpu_3xxx_pwrdm,
 	&neon_pwrdm,
 	&cam_pwrdm,
@@ -373,7 +373,7 @@ static struct powerdomain
 *powerdomains_omap3430es2_es3_0[] __initdata = {
 /* also includes 3630ES1.1+ */
 static struct powerdomain *powerdomains_omap3430es3_1plus[] __initdata
 = {
 	&core_3xxx_es3_1_pwrdm,
-	&sgx_pwrdm,
+	/* &sgx_pwrdm, */
 	&usbhost_pwrdm,
arch/arm/mach-omap2/powerdomains3xxx_data.c +0 -1
 	&dpll5_pwrdm,
 	NULL
--

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

-----Original Message-----
From: Paul Walmsley <[email protected]>
To: Joe Woodward <[email protected]>
Cc: Kevin Hilman <[email protected]>, "linux-omap\\@vger.kernel.org" <[email protected]>
Date: Thu, 12 Jul 2012 04:59:09 -0600 (MDT)
Subject: Re: PM/RTC 3.5-rc5: System suspends fails when not built with RTC?

Quoted 9 lines

Hi Joe

can you give this one a try to see if it helps:

http://marc.info/?l=linux-omap&m=134209072829531&w=2

- Paul

Hi Paul,

I've applied this on top of Kevin's PM branch, along with Kevin's ads7846 fix:
http://www.spinics.net/lists/linux-omap/msg73717.html

I think this has fixed the following warning:

[    0.000000] clockdomain: mpu_clkdm: powerdomain ¬õ`À8ºsÀ does not exist

But when I try and suspend I still get the same problems:

# echo mem > /sys/power/state
[   13.283935] PM: Syncing filesystems ... done.
[   13.300537] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   13.324859] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[   13.356140] Suspending console(s) (use no_console_suspend to debug)
[   13.487823] PM: suspend of devices complete after 120.578 msecs
[   13.491577] PM: late suspend of devices complete after 3.722 msecs
[   13.497375] PM: noirq suspend of devices complete after 5.767 msecs
[   13.497436] Disabling non-boot CPUs ...
[   15.806640] Powerdomain (iva2_pwrdm) didn't enter target state 1
[   15.806640] Powerdomain (dss_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (per_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (core_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (usbhost_pwrdm) didn't enter target state 1
[   15.806671] Could not enter target state in pm_suspend
[   15.809722] PM: noirq resume of devices complete after 2.868 msecs
[   15.813598] PM: early resume of devices complete after 2.380 msecs
[   16.179382] mmc1: error -110 during resume (card was removed?)
[   16.189575] PM: resume of devices complete after 375.824 msecs
[   16.279602] Restarting tasks ... done.
sh: write error: Operation not permitted

Cheers,
Joe

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Hello Joe,

Quoted 17 lines · Joe Woodward

I think this has fixed the following warning:

[    0.000000] clockdomain: mpu_clkdm: powerdomain ¬õ`À8ºsÀ does not exist

But when I try and suspend I still get the same problems:

# echo mem > /sys/power/state
[   13.283935] PM: Syncing filesystems ... done.
[   13.300537] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   13.324859] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[   13.356140] Suspending console(s) (use no_console_suspend to debug)
[   13.487823] PM: suspend of devices complete after 120.578 msecs
[   13.491577] PM: late suspend of devices complete after 3.722 msecs
[   13.497375] PM: noirq suspend of devices complete after 5.767 msecs
[   13.497436] Disabling non-boot CPUs ...
[   15.806640] Powerdomain (iva2_pwrdm) didn't enter target state 1
[   15.806640] Powerdomain (dss_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (per_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (core_pwrdm) didn't enter target state 1
Quoted 8 lines
[   15.806671] Powerdomain (usbhost_pwrdm) didn't enter target state 1
[   15.806671] Could not enter target state in pm_suspend
[   15.809722] PM: noirq resume of devices complete after 2.868 msecs
[   15.813598] PM: early resume of devices complete after 2.380 msecs
[   16.179382] mmc1: error -110 during resume (card was removed?)
[   16.189575] PM: resume of devices complete after 375.824 msecs
[   16.279602] Restarting tasks ... done.
sh: write error: Operation not permitted

Thanks for the test. Perhaps you could try the following untested patch?

- Paul

---
 arch/arm/mach-omap2/pm34xx.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/pm34xx.c +5 -9
index e4fc88c..ced2f76 100644
@@ -545,13 +545,10 @@ static void __init prcm_setup_regs(void)
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-	if (omap3_has_iva()) {
-		omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
-		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
-		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
-		omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD,
-					OMAP3430_PM_IVAGRPSEL);
-	}
+	omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
+	omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
+	omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
+	omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL);
 
 	/* Clear any pending 'reset' flags */
 	omap2_prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST);
@@ -565,8 +562,7 @@ static void __init prcm_setup_regs(void)
 	/* Clear any pending PRCM interrupts */
 	omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
 
-	if (omap3_has_iva())
-		omap3_iva_idle();
+	omap3_iva_idle();
 
 	omap3_d2d_idle();
 }
Signature · 1 line
1.7.10
#4 lore raw

-----Original Message-----
From: Paul Walmsley <[email protected]>
To: Joe Woodward <[email protected]>
Cc: Kevin Hilman <[email protected]>, "linux-omap\\\\@vger.kernel.org" <[email protected]>
Date: Thu, 12 Jul 2012 13:35:14 -0600 (MDT)
Subject: Re: PM/RTC 3.5-rc5: System suspends fails when not built with RTC?

Quoted 36 lines

Hello Joe,

Quoted 2 lines · Joe Woodward

I think this has fixed the following warning:

[    0.000000] clockdomain: mpu_clkdm: powerdomain ¬õ`À8ºsÀ does

not exist

Quoted 5 lines

But when I try and suspend I still get the same problems:

# echo mem > /sys/power/state
[   13.283935] PM: Syncing filesystems ... done.
[   13.300537] Freezing user space processes ... (elapsed 0.01

seconds) done.

Quoted 1 line
[   13.324859] Freezing remaining freezable tasks ... (elapsed 0.02

seconds) done.

Quoted 1 line
[   13.356140] Suspending console(s) (use no_console_suspend to

debug)

Quoted 3 lines
[   13.487823] PM: suspend of devices complete after 120.578 msecs
[   13.491577] PM: late suspend of devices complete after 3.722 msecs
[   13.497375] PM: noirq suspend of devices complete after 5.767

msecs

Quoted 6 lines
[   13.497436] Disabling non-boot CPUs ...
[   15.806640] Powerdomain (iva2_pwrdm) didn't enter target state 1
[   15.806640] Powerdomain (dss_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (per_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (core_pwrdm) didn't enter target state 1
[   15.806671] Powerdomain (usbhost_pwrdm) didn't enter target state

1

Quoted 7 lines
[   15.806671] Could not enter target state in pm_suspend
[   15.809722] PM: noirq resume of devices complete after 2.868 msecs
[   15.813598] PM: early resume of devices complete after 2.380 msecs
[   16.179382] mmc1: error -110 during resume (card was removed?)
[   16.189575] PM: resume of devices complete after 375.824 msecs
[   16.279602] Restarting tasks ... done.

sh: write error: Operation not permitted

Quoted 6 lines

Thanks for the test. Perhaps you could try the following untested patch?

- Paul

Thanks Paul,

That patch does indeed seem to fix all my problems!

With it I can now suspend, and all power domains hit the target states.

Kevin - I did reply to your request for logs, but haven't seen the message make it to the mailing list... If you've not got it, let me know and I can try and send it again.

Cheers,
Joe

Quoted 39 lines
---
 arch/arm/mach-omap2/pm34xx.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/pm34xx.c +5 -9
index e4fc88c..ced2f76 100644
@@ -545,13 +545,10 @@ static void __init prcm_setup_regs(void)
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-	if (omap3_has_iva()) {
-		omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
-		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
-		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
-		omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD,
-					OMAP3430_PM_IVAGRPSEL);
-	}
+	omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
+	omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
+	omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
+	omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL);
 
 	/* Clear any pending 'reset' flags */
 	omap2_prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST);
@@ -565,8 +562,7 @@ static void __init prcm_setup_regs(void)
 	/* Clear any pending PRCM interrupts */
 	omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
 
-	if (omap3_has_iva())
-		omap3_iva_idle();
+	omap3_iva_idle();
 
 	omap3_d2d_idle();
 }
Signature · 1 line
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

+ Mark

Quoted 5 lines · Joe Woodward

Thanks Paul,

That patch does indeed seem to fix all my problems!

With it I can now suspend, and all power domains hit the target states.

OK, great. That patch is basically a revert of a819c4f16d5a2708c11e708fd59a96565c5384a8 ("ARM: OMAP3: PM: Only access IVA if one exists"). Sounds like we need to discriminate between the case where the IVA2 is present but has been efused off in some way (as in the AM3703) vs. the case where the IVA2 is not present at all (as in the AM35xx).

Mark, do you have the time to take a look at this? Maybe omap3_has_iva() needs to be split into omap3_has_iva() and omap3_has_usable_iva(). Or maybe you can come up with a better idea...

- Paul

#6 lore raw
Quoted 17 lines · Paul Walmsley

+ Mark

Quoted 5 lines · Joe Woodward

Thanks Paul,

That patch does indeed seem to fix all my problems!

With it I can now suspend, and all power domains hit the target states.

OK, great. That patch is basically a revert of a819c4f16d5a2708c11e708fd59a96565c5384a8 ("ARM: OMAP3: PM: Only access IVA if one exists"). Sounds like we need to discriminate between the case where the IVA2 is present but has been efused off in some way (as in the AM3703) vs. the case where the IVA2 is not present at all (as in the AM35xx).

Quoted 3 lines

Mark, do you have the time to take a look at this? Maybe omap3_has_iva() needs to be split into omap3_has_iva() and omap3_has_usable_iva(). Or maybe you can come up with a better idea...

Sure, I'll see what I can figure out.

Mark

#7 lore raw
In reply to Paul Walmsley
Quoted 17 lines · Paul Walmsley

+ Mark

Quoted 5 lines · Joe Woodward

Thanks Paul,

That patch does indeed seem to fix all my problems!

With it I can now suspend, and all power domains hit the target states.

OK, great. That patch is basically a revert of a819c4f16d5a2708c11e708fd59a96565c5384a8 ("ARM: OMAP3: PM: Only access IVA if one exists"). Sounds like we need to discriminate between the case where the IVA2 is present but has been efused off in some way (as in the AM3703) vs. the case where the IVA2 is not present at all (as in the AM35xx).

Quoted 3 lines

Mark, do you have the time to take a look at this? Maybe omap3_has_iva() needs to be split into omap3_has_iva() and omap3_has_usable_iva(). Or maybe you can come up with a better idea...

Hi Joe.

I'm finally getting around to this... Unfortunately, I don't have the hardware to test it so I can't tell exactly what code needs to run to make
it work again. Would you mind identifying the pieces of code need to run
for it to work? omap3_has_iva() shows up in just a few places.

Thanks,

Mark

#8 lore raw
Quoted 4 lines · Mark A. Greer

I'm finally getting around to this... Unfortunately, I don't have the hardware to test it so I can't tell exactly what code needs to run to make
it work again. Would you mind identifying the pieces of code need to run
for it to work? omap3_has_iva() shows up in just a few places.

We did a test by removing the two instances in pm34xx.c. I'm pretty sure that the IVAGRPSEL writes are necessary, since the reset values for those bits are 1, and those definitely need to be cleared. Not sure about the omap3_iva_idle() call; Joe, maybe you can try with just the first hunk of the patch that I sent?

- Paul

#9 lore raw

-----Original Message-----
From: Paul Walmsley <[email protected]>
To: Joe Woodward <[email protected]>, "Mark A. Greer" <[email protected]>
Cc: Kevin Hilman <[email protected]>, [email protected]
Date: Mon, 16 Jul 2012 18:43:15 -0600 (MDT)
Subject: Re: PM/RTC 3.5-rc5: System suspends fails when not built with RTC?

Quoted 10 lines · Mark A. Greer
Quoted 2 lines

I'm finally getting around to this... Unfortunately, I don't have

the

Quoted 1 line

hardware to test it so I can't tell exactly what code needs to run to

make

Quoted 1 line

it work again. Would you mind identifying the pieces of code need

to run

Quoted 1 line

for it to work? omap3_has_iva() shows up in just a few places.

Quoted 9 lines

We did a test by removing the two instances in pm34xx.c. I'm pretty sure
that the IVAGRPSEL writes are necessary, since the reset values for those
bits are 1, and those definitely need to be cleared. Not sure about the
omap3_iva_idle() call; Joe, maybe you can try with just the first hunk of
the patch that I sent?

The patch you sent is basically in two halves:
- the writes to the registers
- the calling of omap3_iva_idle().

If I patch only the writes to the registers then suspend still fails.
If I patch only the calling of omap3_iva_idle() then suspend works.
If I patch both the writes to the registers and the calling of omap3_iva_idle() then suspend works.

Cheers,
Joe

Quoted 8 lines

- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Hi Joe, Mark,

Quoted 7 lines · Joe Woodward

The patch you sent is basically in two halves:
- the writes to the registers
- the calling of omap3_iva_idle().

If I patch only the writes to the registers then suspend still fails.
If I patch only the calling of omap3_iva_idle() then suspend works.
If I patch both the writes to the registers and the calling of omap3_iva_idle() then suspend works.

Wow, that's unexpected. Thanks very much for trying this.

Well Mark, I guess that's your answer. Looks like the IVA is still running on that AM3703 chip. I guess it's probably best to do both halves, anyway.

- Paul

#11 lore raw
Quoted 12 lines · Paul Walmsley

Hi Joe, Mark,

Quoted 7 lines · Joe Woodward

The patch you sent is basically in two halves:
- the writes to the registers
- the calling of omap3_iva_idle().

If I patch only the writes to the registers then suspend still fails.
If I patch only the calling of omap3_iva_idle() then suspend works.
If I patch both the writes to the registers and the calling of omap3_iva_idle() then suspend works.

Quoted 5 lines

Wow, that's unexpected. Thanks very much for trying this.

Well Mark, I guess that's your answer. Looks like the IVA is still running on that AM3703 chip. I guess it's probably best to do both halves, anyway.

How does this look?

Based on linux-omap/master (ce6b8b760e2fef013b1038e5398580d187f80c00).

I'm not very creative when it comes to naming this thing so I'm happy if you have a better idea. I tested it on an am37xevm and tried to test on an am35xevm but it appears that the am35xevm is broken in that branch. :(

Mark
--

Quoted 1 line

From b889b2642bd16b3d8e5856f39a3ea08d10102aad Mon Sep 17 00:00:00 2001

From: Mark A. Greer <[email protected]>
Date: Tue, 17 Jul 2012 18:50:01 -0700
Subject: [PATCH] ARM: OMAP3: Add OMAP3_HAS_IVA_REGS feature

It appears that the am3703 and possibly the am3715 SoCs have an active IVA subsystem even though the CONTROL_IDCODE register indicates that they don't. From experimentation, it seems that the IVA still requires some registers to be initialized even though we don't want it fully functional.

To accomplish this, add a new feature (OMAP3_HAS_IVA_REGS) that indicates that the IVA should be initialized but not really used.

---
 arch/arm/mach-omap2/id.c              |    2 +-
 arch/arm/mach-omap2/pm34xx.c          |    4 ++--
 arch/arm/plat-omap/include/plat/cpu.h |   22 ++++++++++++----------
 3 files changed, 15 insertions(+), 13 deletions(-)
arch/arm/mach-omap2/id.c +1 -1
index 40373db..4072fbd 100644
@@ -242,7 +242,7 @@ void __init omap3xxx_check_features(void)
 	OMAP3_CHECK_FEATURE(status, NEON);
 	OMAP3_CHECK_FEATURE(status, ISP);
 	if (cpu_is_omap3630())
-		omap_features |= OMAP3_HAS_192MHZ_CLK;
+		omap_features |= OMAP3_HAS_192MHZ_CLK | OMAP3_HAS_IVA_REGS;
 	if (cpu_is_omap3430() || cpu_is_omap3630())
 		omap_features |= OMAP3_HAS_IO_WAKEUP;
 	if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
arch/arm/mach-omap2/pm34xx.c +2 -2
index e4fc88c..119cbf0 100644
@@ -545,7 +545,7 @@ static void __init prcm_setup_regs(void)
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-	if (omap3_has_iva()) {
+	if (omap3_has_iva() || omap3_has_iva_regs()) {
 		omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
 		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
 		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
@@ -565,7 +565,7 @@ static void __init prcm_setup_regs(void)
 	/* Clear any pending PRCM interrupts */
 	omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
 
-	if (omap3_has_iva())
+	if (omap3_has_iva() || omap3_has_iva_regs())
 		omap3_iva_idle();
 
 	omap3_d2d_idle();
arch/arm/plat-omap/include/plat/cpu.h +12 -10
index 68b180e..2509bf4 100644
@@ -451,16 +451,17 @@ extern u32 omap_features;
 
 #define OMAP3_HAS_L2CACHE		BIT(0)
 #define OMAP3_HAS_IVA			BIT(1)
-#define OMAP3_HAS_SGX			BIT(2)
-#define OMAP3_HAS_NEON			BIT(3)
-#define OMAP3_HAS_ISP			BIT(4)
-#define OMAP3_HAS_192MHZ_CLK		BIT(5)
-#define OMAP3_HAS_IO_WAKEUP		BIT(6)
-#define OMAP3_HAS_SDRC			BIT(7)
-#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(8)
-#define OMAP4_HAS_MPU_1GHZ		BIT(9)
-#define OMAP4_HAS_MPU_1_2GHZ		BIT(10)
-#define OMAP4_HAS_MPU_1_5GHZ		BIT(11)
+#define OMAP3_HAS_IVA_REGS		BIT(2)
+#define OMAP3_HAS_SGX			BIT(3)
+#define OMAP3_HAS_NEON			BIT(4)
+#define OMAP3_HAS_ISP			BIT(5)
+#define OMAP3_HAS_192MHZ_CLK		BIT(6)
+#define OMAP3_HAS_IO_WAKEUP		BIT(7)
+#define OMAP3_HAS_SDRC			BIT(8)
+#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(9)
+#define OMAP4_HAS_MPU_1GHZ		BIT(10)
+#define OMAP4_HAS_MPU_1_2GHZ		BIT(11)
+#define OMAP4_HAS_MPU_1_5GHZ		BIT(12)
 
 
 #define OMAP3_HAS_FEATURE(feat,flag)			\
@@ -472,6 +473,7 @@ static inline unsigned int omap3_has_ ##feat(void)	\
 OMAP3_HAS_FEATURE(l2cache, L2CACHE)
 OMAP3_HAS_FEATURE(sgx, SGX)
 OMAP3_HAS_FEATURE(iva, IVA)
+OMAP3_HAS_FEATURE(iva_regs, IVA_REGS)
 OMAP3_HAS_FEATURE(neon, NEON)
 OMAP3_HAS_FEATURE(isp, ISP)
 OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
Signature · 1 line
1.7.0.4
#12 lore raw

-----Original Message-----
From: "Mark A. Greer" <[email protected]>
To: Paul Walmsley <[email protected]>
Cc: Joe Woodward <[email protected]>, Kevin Hilman <[email protected]>, [email protected]
Date: Tue, 17 Jul 2012 19:20:35 -0700
Subject: Re: PM/RTC 3.5-rc5: System suspends fails when not built with RTC?

Quoted 132 lines · Paul Walmsley
Quoted 9 lines

Hi Joe, Mark,

Quoted 5 lines · Joe Woodward

The patch you sent is basically in two halves:
- the writes to the registers
- the calling of omap3_iva_idle().

If I patch only the writes to the registers then suspend still

fails.

Quoted 2 lines
Quoted 2 lines

If I patch only the calling of omap3_iva_idle() then suspend works. If I patch both the writes to the registers and the calling of

omap3_iva_idle() then suspend works.

Quoted 6 lines

Wow, that's unexpected. Thanks very much for trying this.

Well Mark, I guess that's your answer. Looks like the IVA is still running on that AM3703 chip. I guess it's probably best to do both halves, anyway.

How does this look?

Based on linux-omap/master (ce6b8b760e2fef013b1038e5398580d187f80c00).

I'm not very creative when it comes to naming this thing so I'm happy if you have a better idea. I tested it on an am37xevm and tried to test on an am35xevm but it appears that the am35xevm is broken in that branch. :(

Mark
--

From b889b2642bd16b3d8e5856f39a3ea08d10102aad Mon Sep 17 00:00:00 2001
From: Mark A. Greer <[email protected]>
Date: Tue, 17 Jul 2012 18:50:01 -0700
Subject: [PATCH] ARM: OMAP3: Add OMAP3_HAS_IVA_REGS feature

It appears that the am3703 and possibly the am3715 SoCs have an active IVA subsystem even though the CONTROL_IDCODE register indicates that they don't. From experimentation, it seems that the IVA still requires some registers to be initialized even though we don't want it fully functional.

To accomplish this, add a new feature (OMAP3_HAS_IVA_REGS) that indicates that the IVA should be initialized but not really used.

---
 arch/arm/mach-omap2/id.c              |    2 +-
 arch/arm/mach-omap2/pm34xx.c          |    4 ++--
 arch/arm/plat-omap/include/plat/cpu.h |   22 ++++++++++++----------
 3 files changed, 15 insertions(+), 13 deletions(-)
arch/arm/mach-omap2/id.c +1 -1
index 40373db..4072fbd 100644
@@ -242,7 +242,7 @@ void __init omap3xxx_check_features(void)
 	OMAP3_CHECK_FEATURE(status, NEON);
 	OMAP3_CHECK_FEATURE(status, ISP);
 	if (cpu_is_omap3630())
-		omap_features |= OMAP3_HAS_192MHZ_CLK;
+		omap_features |= OMAP3_HAS_192MHZ_CLK | OMAP3_HAS_IVA_REGS;
 	if (cpu_is_omap3430() || cpu_is_omap3630())
 		omap_features |= OMAP3_HAS_IO_WAKEUP;
 	if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
arch/arm/mach-omap2/pm34xx.c +2 -2
index e4fc88c..119cbf0 100644
@@ -545,7 +545,7 @@ static void __init prcm_setup_regs(void)
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-	if (omap3_has_iva()) {
+	if (omap3_has_iva() || omap3_has_iva_regs()) {
 		omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
 		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
 		omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
@@ -565,7 +565,7 @@ static void __init prcm_setup_regs(void)
 	/* Clear any pending PRCM interrupts */
 	omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
 
-	if (omap3_has_iva())
+	if (omap3_has_iva() || omap3_has_iva_regs())
 		omap3_iva_idle();
 
 	omap3_d2d_idle();
arch/arm/plat-omap/include/plat/cpu.h +12 -10
index 68b180e..2509bf4 100644
@@ -451,16 +451,17 @@ extern u32 omap_features;
 
 #define OMAP3_HAS_L2CACHE		BIT(0)
 #define OMAP3_HAS_IVA			BIT(1)
-#define OMAP3_HAS_SGX			BIT(2)
-#define OMAP3_HAS_NEON			BIT(3)
-#define OMAP3_HAS_ISP			BIT(4)
-#define OMAP3_HAS_192MHZ_CLK		BIT(5)
-#define OMAP3_HAS_IO_WAKEUP		BIT(6)
-#define OMAP3_HAS_SDRC			BIT(7)
-#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(8)
-#define OMAP4_HAS_MPU_1GHZ		BIT(9)
-#define OMAP4_HAS_MPU_1_2GHZ		BIT(10)
-#define OMAP4_HAS_MPU_1_5GHZ		BIT(11)
+#define OMAP3_HAS_IVA_REGS		BIT(2)
+#define OMAP3_HAS_SGX			BIT(3)
+#define OMAP3_HAS_NEON			BIT(4)
+#define OMAP3_HAS_ISP			BIT(5)
+#define OMAP3_HAS_192MHZ_CLK		BIT(6)
+#define OMAP3_HAS_IO_WAKEUP		BIT(7)
+#define OMAP3_HAS_SDRC			BIT(8)
+#define OMAP3_HAS_IO_CHAIN_CTRL		BIT(9)
+#define OMAP4_HAS_MPU_1GHZ		BIT(10)
+#define OMAP4_HAS_MPU_1_2GHZ		BIT(11)
+#define OMAP4_HAS_MPU_1_5GHZ		BIT(12)
 
 
 #define OMAP3_HAS_FEATURE(feat,flag)			\
@@ -472,6 +473,7 @@ static inline unsigned int omap3_has_
 ##feat(void)	\
 OMAP3_HAS_FEATURE(l2cache, L2CACHE)
 OMAP3_HAS_FEATURE(sgx, SGX)
 OMAP3_HAS_FEATURE(iva, IVA)
+OMAP3_HAS_FEATURE(iva_regs, IVA_REGS)
 OMAP3_HAS_FEATURE(neon, NEON)
 OMAP3_HAS_FEATURE(isp, ISP)
Quoted 5 lines

OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)

Signature · 3 lines
1.7.0.4

--

Tested on a GUMSTIX Overo AirSTORM (AM3703-based), and that fixes the problem for me, thanks!

Cheers,
Joe

Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
Quoted 12 lines · Joe Woodward

From: "Mark A. Greer" <[email protected]>

Quoted 10 lines

How does this look?

Subject: [PATCH] ARM: OMAP3: Add OMAP3_HAS_IVA_REGS feature

It appears that the am3703 and possibly the am3715 SoCs have an active IVA subsystem even though the CONTROL_IDCODE register indicates that they don't. From experimentation, it seems that the IVA still requires some registers to be initialized even though we don't want it fully functional.

Quoted 8 lines
Quoted 6 lines

To accomplish this, add a new feature (OMAP3_HAS_IVA_REGS) that indicates that the IVA should be initialized but not really used.

---

Tested on a GUMSTIX Overo AirSTORM (AM3703-based), and that fixes the problem for me, thanks!

Great! Thanks for testing, Joe.

Paul, Kevin, any comments?

#14 lore raw

A thousand apologizes for double posting, some html sneaked into the first email and it got dropped by the list server.

I am running on a gumstix with OMAP 3503 on it (name escapes me at the moment) and it has the same issue.

Just applying Mark's patch on top of 55936cdfaaf11ac352b56bc58e42d6661e65ee13 (linux-omap) is not enough, I also need to set the OMAP3_HAS_IVA_REGS for the 3430 as well.

Inlined patch:

arch/arm/mach-omap2/id.c +1 -1
index 4072fbd..45d3eb4 100644
@@ -244,7 +244,7 @@ void __init omap3xxx_check_features(void)
        if (cpu_is_omap3630())
                omap_features |= OMAP3_HAS_192MHZ_CLK | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3430() || cpu_is_omap3630())
-               omap_features |= OMAP3_HAS_IO_WAKEUP;
+               omap_features |= OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
            omap_rev() == OMAP3430_REV_ES3_1_2)
                omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

Here is with I see with this patch:
/debug/pm_debug # echo mem > /sys/power/state

[ 1058.657928] PM: Syncing filesystems ... done.
[ 1058.669616] Freezing user space processes ... (elapsed 0.02 seconds) done.
[ 1058.703094] Freezing remaining freezable tasks ... (elapsed 0.02
seconds) done.
[ 1058.734252] Suspending console(s) (use no_console_suspend to debug)
[ 1058.921936] PM: suspend of devices complete after 161.285 msecs
[ 1058.938995] PM: late suspend of devices complete after 16.936 msecs
[ 1058.963134] PM: noirq suspend of devices complete after 23.986 msecs
[ 1060.013336] Successfully put all powerdomains to target state
[ 1060.025726] PM: noirq resume of devices complete after 11.810 msecs
[ 1060.042480] PM: early resume of devices complete after 10.437 msecs
[ 1060.481353] PM: resume of devices complete after 438.415 msecs
[ 1060.547912] Restarting tasks ... done.

/debug/pm_debug # cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:0,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
core_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
per_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
dss_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
neon_pwrdm (ON),OFF:0,RET:710,INA:0,ON:711,RET-LOGIC-OFF:0
mpu_pwrdm (ON),OFF:0,RET:710,INA:0,ON:711,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0 usbhost_clkdm->usbhost_pwrdm (1)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (18)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (1)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (24)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)

I see that the usbhost domain is still not hitting retention but for some reason it is not being complained about in suspend messages.

I am running omap2plus_defconfig with CPUFREQ and CPUIDLE enabled, USB disabled.

- Juha

Quoted 23 lines · Mark A. Greer
Quoted 12 lines · Joe Woodward

From: "Mark A. Greer" <[email protected]>

Quoted 10 lines

How does this look?

Subject: [PATCH] ARM: OMAP3: Add OMAP3_HAS_IVA_REGS feature

It appears that the am3703 and possibly the am3715 SoCs have an active IVA subsystem even though the CONTROL_IDCODE register indicates that they don't. From experimentation, it seems that the IVA still requires some registers to be initialized even though we don't want it fully functional.

Quoted 8 lines
Quoted 6 lines

To accomplish this, add a new feature (OMAP3_HAS_IVA_REGS) that indicates that the IVA should be initialized but not really used.

---

Tested on a GUMSTIX Overo AirSTORM (AM3703-based), and that fixes the problem for me, thanks!

Quoted 7 lines

Great! Thanks for testing, Joe.

Paul, Kevin, any comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Duck tape is like the force, it has a light side and a dark side and it holds the universe together.

#15 lore raw

On Thu, Jul 26, 2012 at 02:09:33PM -0700, Juha Kuikka wrote:

Hi Juha.

Quoted 5 lines

A thousand apologizes for double posting, some html sneaked into the first email and it got dropped by the list server.

I am running on a gumstix with OMAP 3503 on it (name escapes me at the moment) and it has the same issue.

Okay, I didn't know if the 3503 would have that issue or not.

Quoted 11 lines

Just applying Mark's patch on top of 55936cdfaaf11ac352b56bc58e42d6661e65ee13 (linux-omap) is not enough, I also need to set the OMAP3_HAS_IVA_REGS for the 3430 as well.

Inlined patch:

arch/arm/mach-omap2/id.c +0 -0
index 4072fbd..45d3eb4 100644

arch/arm/mach-omap2/id.c void __init omap3xxx_check_features(void) · line 250

Quoted 8 lines
arch/arm/mach-omap2/id.c +1 -1
@@ -244,7 +244,7 @@ void __init omap3xxx_check_features(void)
        if (cpu_is_omap3630())
                omap_features |= OMAP3_HAS_192MHZ_CLK | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3430() || cpu_is_omap3630())
-               omap_features |= OMAP3_HAS_IO_WAKEUP;
+               omap_features |= OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
            omap_rev() == OMAP3430_REV_ES3_1_2)
                omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

Thank you.

Quoted 38 lines

Here is with I see with this patch:
/debug/pm_debug # echo mem > /sys/power/state

[ 1058.657928] PM: Syncing filesystems ... done.
[ 1058.669616] Freezing user space processes ... (elapsed 0.02 seconds) done.
[ 1058.703094] Freezing remaining freezable tasks ... (elapsed 0.02
seconds) done.
[ 1058.734252] Suspending console(s) (use no_console_suspend to debug)
[ 1058.921936] PM: suspend of devices complete after 161.285 msecs
[ 1058.938995] PM: late suspend of devices complete after 16.936 msecs
[ 1058.963134] PM: noirq suspend of devices complete after 23.986 msecs
[ 1060.013336] Successfully put all powerdomains to target state
[ 1060.025726] PM: noirq resume of devices complete after 11.810 msecs
[ 1060.042480] PM: early resume of devices complete after 10.437 msecs
[ 1060.481353] PM: resume of devices complete after 438.415 msecs
[ 1060.547912] Restarting tasks ... done.

/debug/pm_debug # cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:0,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
core_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
per_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
dss_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
neon_pwrdm (ON),OFF:0,RET:710,INA:0,ON:711,RET-LOGIC-OFF:0
mpu_pwrdm (ON),OFF:0,RET:710,INA:0,ON:711,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0 usbhost_clkdm->usbhost_pwrdm (1)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (18)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (1)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (24)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)

Quoted 2 lines

I see that the usbhost domain is still not hitting retention but for some reason it is not being complained about in suspend messages.

This may be part of what Kevin Hilman, Keshava Munegowda, et. al., have been talking about,

	http://www.spinics.net/lists/linux-omap/msg70743.html

Mark

#16 lore raw
Quoted 8 lines · Mark A. Greer
Quoted 6 lines · Juha Kuikka

Just applying Mark's patch on top of 55936cdfaaf11ac352b56bc58e42d6661e65ee13 (linux-omap) is not enough, I also need to set the OMAP3_HAS_IVA_REGS for the 3430 as well.

Inlined patch:

Quoted 15 lines

arch/arm/mach-omap2/id.c void __init omap3xxx_check_features(void) · line 250

Quoted 13 lines
arch/arm/mach-omap2/id.c +1 -1
index 4072fbd..45d3eb4 100644
@@ -244,7 +244,7 @@ void __init omap3xxx_check_features(void)
        if (cpu_is_omap3630())
                omap_features |= OMAP3_HAS_192MHZ_CLK | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3430() || cpu_is_omap3630())
-               omap_features |= OMAP3_HAS_IO_WAKEUP;
+               omap_features |= OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_IVA_REGS;
        if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
            omap_rev() == OMAP3430_REV_ES3_1_2)
                omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

Thank you.

I meant to add, "Please make a formal patch for review so you can get credit for your work."

Mark

#17 lore raw
In reply to Joe Woodward
Quoted 72 lines · Joe Woodward

...snip...

Quoted 20 lines
Quoted 3 lines

Hmm, interesting, I don't see this on my 3730-based Over FireSTORM.

But, after "converting" mine into an AirStorm[1], I see the same

errors

Quoted 1 line

as you're seeing. We're obviously doing something wrong when IVA

and/or

Quoted 1 line

SGX are not present, so I will look into it.

With the hack below on top of my pm branch, can you try to suspend/resume on your AirSTORM?

You'll get a bunch of noise from the clockdomain code becasue of the missing power domains, but you can ignore them.

I'm hoping this will fix your issue. Obviously, this hack is not a real
fix but just a test to see if the problem is where I think it is. If so, then I know the right solution and it's been discussed before but never been a priority (at least for me) to fix.

Quoted 6 lines

Basically, we still need to fix up the registration of certain hwmods and powerdomains based on whether or not certain IPs exist or not. We currently are rather blindly registering the hwmods for IVA, GFX etc.

Kevin

After applying the patch (and also your GPIO fix for the ads7846).

As you said, when booting lots of warnings are spat out:

[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at arch/arm/mach-omap2/clockdomain.c:237 _resolve_clkdm_deps.clone.0+0x98/0x108()
[    0.000000] Modules linked in:
[    0.000000]
[    0.000000] [<c001b75c>] (unwind_backtrace+0x0/0xf0) from [<c0041788>] (warn_slowpath_common+0x4c/0x64)
[    0.000000] [<c0041788>] (warn_slowpath_common+0x4c/0x64) from [<c0041834>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c0041834>] (warn_slowpath_fmt+0x30/0x40) from [<c00321a0>] (_resolve_clkdm_deps.clone.0+0x98/0x108)
[    0.000000] [<c00321a0>] (_resolve_clkdm_deps.clone.0+0x98/0x108) from [<c0032bb8>] (clkdm_complete_init+0x3c/0xa0)
[    0.000000] [<c0032bb8>] (clkdm_complete_init+0x3c/0xa0) from [<c06d2458>] (omap3_init_early+0x20/0x30)
[    0.000000] [<c06d2458>] (omap3_init_early+0x20/0x30) from [<c06ce1a8>] (setup_arch+0x814/0x934)
[    0.000000] [<c06ce1a8>] (setup_arch+0x814/0x934) from [<c06ca584>] (start_kernel+0x88/0x300)
[    0.000000] [<c06ca584>] (start_kernel+0x88/0x300) from [<80008044>] (0x80008044)
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---

And now when suspending I get:

# echo mem > /sys/power/state
[   78.174713] PM: Syncing filesystems ... done.
[   78.190582] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   78.216430] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[   78.247558] Suspending console(s) (use no_console_suspend to debug)
[   78.379241] PM: suspend of devices complete after 120.605 msecs
[   78.382934] PM: late suspend of devices complete after 3.692 msecs
[   78.388671] PM: noirq suspend of devices complete after 5.706 msecs
[   78.388732] Disabling non-boot CPUs ...
[  107.219818] Powerdomain (core_pwrdm) didn't enter target state 1
[  107.219818] Could not enter target state in pm_suspend
[  107.222808] PM: noirq resume of devices complete after 2.838 msecs
[  107.226684] PM: early resume of devices complete after 2.380 msecs
[  107.592620] mmc1: error -110 during resume (card was removed?)
[  107.602752] PM: resume of devices complete after 375.946 msecs
[  107.667449] Restarting tasks ... done.
sh: write error: Operation not permitted

So most of the warnings have gone, but core still fails to enter the target state.

This is sitll using the omap2plus_defconfig with:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

Quoted 6 lines

CONFIG_DMADEVICES=y
CONFIG_DMA_OMAP=y

CONFIG_SQUASHFS=y

All running from RAM-based RFS.

OK, if you're using a RAM-based rootfs, do you need DMA engine? Can you disable that for now? I don't think it's related, but just want to rule it out.

Also, (I'm shooting in the dark now), can you try a couple more things with the hack that I sent, and send me the *full* console output of a boot and a suspend/resume attemp:

1) use my hack as is
2) use my hack but only comment out IVA
3) use my hack but only comment out SGX

Thanks,

Kevin