public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Kim Kyuwon <chammoru@gmail.com>
Cc: Kim Kyuwon <q1.kim@samsung.com>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 01/13] Revert "ARM: OMAP: Mask interrupts when disabling  interrupts, v2"
Date: Fri, 22 May 2009 11:16:38 -0700	[thread overview]
Message-ID: <87hbzd57g9.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4d34a0a70905220851y240a2e71w89fe82f49270a813@mail.gmail.com> (Kim Kyuwon's message of "Sat\, 23 May 2009 00\:51\:11 +0900")

Kim Kyuwon <chammoru@gmail.com> writes:

> On Fri, May 22, 2009 at 11:54 PM, Kevin Hilman
> <khilman@deeprootsystems.com> wrote:
>> Kim Kyuwon <q1.kim@samsung.com> writes:
>>
>>> Kevin Hilman wrote:
>>>> This reverts commit 5461af5af5c6a7fee78978aafe720541bf3a2f55.
>>>>
>>>> Adding a disable hook to the irq_chip is not the way to fix the
>>>> problem being addressed by this patch.  Instead, we need to fix
>>>> support for [enable|disable]_irq_wake().
>>>
>>> Agree with you if we can use disable_irq_wake for MPU Interrupt with
>>> not masking the IRQ. Can you explain how we can fix support for
>>> disable_irq_wake() for omap_irq_chip?
>>
>> Yes.  The PRCM has a wake-enable per device bit that can be set (see
>> PM_WKEN_<pwrdm>) to control device wakeup enables.
>
> PM_WKEN_<pwrdm> is not entirely matched to each MPU interrupt.

Correct.  This bit disables the module from generating any wakeup
event to the PRCM.

> If you want to use disable_irq_wake() with enabling PRCM_Interrupt,
> you should disable all PM_WKEN_<pwrdm> bits.
> And how can you make support of disable_irq_wake() for other MPU interrupts?

To control the ability of a module to wake the MPU directly, we would
need to use the PM_MPUGRPSEL_<pwrdm> regs.

>> But the implemenation of that should not hold up this revert because
>> this patch breaks *all* wakeups since the PRCM interrupt itself is
>> disabled in the suspend path.
>
> Yes, I saw the same problem. This is caused by resume_device_irqs()
> recently added by Rafael not by my patch. 

The point is, with your patch applied, *all* OMAP wakeups are broken
upstream.

You're right, your patch didn't cause the broken wakeup problem by
itself, but your patch on top of Rafael's in combination with the new
lazy-disable support which are both already in mainline breaks *all*
OMAP wakeup capabilities.  Therefore it should be reverted and the
OMAP specific IRQ wake support fixed.

I am working on fixing the OMAP IRQ wake support, but I do not want
that to hold up this series getting upstream.

> I'm asking him that he made a right decision.

Yes, we had a long discussion on that on linux-pm and I came to the
conclusion that while his change was probably premature, it's the
right decision and platforms with wakeup capabilities should
use/fix their set_irq_wakeup() functionality.

>> As a workaround for your USB problem that this patch was initially
>> intended to fix you could manually disable USB OTG wakeups like this:
>>
>>        wken = prm_read_mod_reg(CORE_MOD, PM_WKEN);
>>        wken &= ~OMAP3430_EN_HSOTGUSB;
>>        prm_write_mod_reg(wken, CORE_MOD, PM_WKEN);
>
> Did you checked this masking prevent waking up from the interrupt of USB HOST?

No I did not test, nor was I able to reproduce your original problem
since the description wasn't that clear to me.

This will disable the USB OTG controller module from generating
wakeups for any reason.  If disabling the device wakeup in PM_WKEN is
still resutling in interrupts, then the powerdomain with that device
is most likely not in retention/off.

I do know that disabling PM_WKEN for UARTs in the same powerdomain as
USB OTG (CORE) will stop the UART from waking, and thus from
generating interrupts, as long as the powerdomain has actually
transitioned to retention/off.

Re: USB HOST.  The problem you reported in your original patch was
that you were waking from IRQ 92, which is the USB OTG interrupt.  If
your problem is with USBHOST, that is in a different powerdomain.

Kevin

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

  reply	other threads:[~2009-05-22 18:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 23:19 [PATCH v2 00/13] OMAP2/3: PM sync-up Kevin Hilman
2009-05-20 23:19 ` [PATCH 01/13] Revert "ARM: OMAP: Mask interrupts when disabling interrupts, v2" Kevin Hilman
2009-05-20 23:19   ` [PATCH 02/13] OMAP2/3: PM: push core PM code from linux-omap Kevin Hilman
2009-05-20 23:19     ` [PATCH 03/13] OMAP: Add new function to check wether there is irq pending Kevin Hilman
2009-05-20 23:19       ` [PATCH 04/13] OMAP3: PM: Force IVA2 into idle during bootup Kevin Hilman
2009-05-20 23:19         ` [PATCH 05/13] OMAP3: PM: Add wake-up bit defintiions for CONTROL_PADCONF_X Kevin Hilman
2009-05-20 23:19           ` [PATCH 06/13] OMAP3: PM: UART: disable clocks when idle and off-mode support Kevin Hilman
2009-05-20 23:19             ` [PATCH 07/13] OMAP: UART: Add sysfs interface for adjusting UART sleep timeout Kevin Hilman
2009-05-20 23:19               ` [PATCH 08/13] OMAP3: PM: Add D2D clocks and auto-idle setup to PRCM init Kevin Hilman
2009-05-20 23:19                 ` [PATCH 09/13] OMAP3: PM: D2D clockdomain supports SW supervised transitions Kevin Hilman
2009-05-20 23:19                   ` [PATCH 10/13] OMAP3: PM: Ensure MUSB block can idle when driver not loaded Kevin Hilman
2009-05-20 23:19                     ` [PATCH 11/13] OMAP3: PM: Ensure PRCM interrupts are cleared at boot Kevin Hilman
2009-05-20 23:19                       ` [PATCH 12/13] OMAP3: PM: Clear pending PRCM reset flags on init Kevin Hilman
2009-05-20 23:19                         ` [PATCH 13/13] OMAP3: PM: prevent module wakeups from waking IVA2 Kevin Hilman
2009-05-28 15:48     ` [PATCH 02/13] OMAP2/3: PM: push core PM code from linux-omap Russell King - ARM Linux
2009-05-28 16:51       ` Kevin Hilman
2009-05-28 18:22         ` Kevin Hilman
2009-05-21 23:38   ` [PATCH 01/13] Revert "ARM: OMAP: Mask interrupts when disabling interrupts, v2" Kim Kyuwon
2009-05-22 14:54     ` Kevin Hilman
2009-05-22 15:51       ` Kim Kyuwon
2009-05-22 18:16         ` Kevin Hilman [this message]
2009-05-22 22:59           ` Kim Kyuwon
2009-05-25  5:33           ` Kim Kyuwon
2009-05-22 23:22       ` Russell King - ARM Linux
2009-05-23  0:47         ` Kim Kyuwon
2009-05-26 23:12 ` [PATCH v2 00/13] OMAP2/3: PM sync-up Tony Lindgren

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=87hbzd57g9.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=chammoru@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=q1.kim@samsung.com \
    /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