From: Nishanth Menon <nm@ti.com>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Nishanth Menon <menon.nishanth@gmail.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nayak, Rajendra" <rnayak@ti.com>
Subject: Re: [PATCH 02/28] OMAP3: PM: GPIO context save/restore
Date: Mon, 5 Oct 2009 13:02:24 -0500 [thread overview]
Message-ID: <4ACA34B0.7080405@ti.com> (raw)
In-Reply-To: <87k4z9ycae.fsf@deeprootsystems.com>
Kevin Hilman had written, on 10/05/2009 12:35 PM, the following:
> Nishanth Menon <menon.nishanth@gmail.com> writes:
>
>> Kevin Hilman said the following on 10/01/2009 06:58 PM:
>>> From: Rajendra Nayak <rnayak@ti.com>
>>>
>>> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
>>> ---
>>> arch/arm/plat-omap/gpio.c | 92 ++++++++++++++++++++++++++++++++
>>> arch/arm/plat-omap/include/mach/gpio.h | 3 +-
>>> 2 files changed, 94 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
>>> index b0c7361..9850ade 100644
>>> --- a/arch/arm/plat-omap/gpio.c
>>> +++ b/arch/arm/plat-omap/gpio.c
>>> +
>>> +/* restore the required registers of bank 2-6 */
>>> +void omap3_gpio_restore_context(void)
>>> +{
>>> + int i;
>>> + for (i = 1; i < gpio_bank_count; i++) {
>>> + struct gpio_bank *bank = &gpio_bank[i];
>>> + __raw_writel(gpio_context[i].sysconfig,
>>> + bank->base + OMAP24XX_GPIO_SYSCONFIG);
>>> + __raw_writel(gpio_context[i].irqenable1,
>>> + bank->base + OMAP24XX_GPIO_IRQENABLE1);
>>> + __raw_writel(gpio_context[i].irqenable2,
>>> + bank->base + OMAP24XX_GPIO_IRQENABLE2);
>>>
>> do you want to write to the IRQENABLE register even before configuring
>> the rest of the registers (such as data direction etc?
>> usually my understanding was:
>> configure the device,
>> enable the irq..
>
> IIUC, the save/restore sequence was taken directly from TI internal
> kernels, so I'm not sure of the history there. Rajendra should speak
> to that as the original author of this patch.
>
> That being said, this sequence is being done in the idle path with
> interrupts disabled, so by the time interrupts are enabled, the GPIO
> banks will be fully configured.
Still troublesome to my amateur eyes. if ENABLE bit is set -it means
that GPIO block can assert interrupt & as part of the rest of the
half-baked configuration, there is a possibility of event happening (as
we configure, there will be intermediate configured state), we do not
want an event to be set at all. irq_locked state will just ensure that
my isr will be called/not called - if the events are banked, there could
be spurious events detected - but again might be a theoretical thought here.
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2009-10-05 18:03 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 23:58 [PATCH 00/28] OMAP3: PM: base OFF-mode support Kevin Hilman
2009-10-01 23:58 ` [PATCH 01/28] OMAP3: PM: GPMC context save/restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 02/28] OMAP3: PM: GPIO " Kevin Hilman
2009-10-01 23:58 ` [PATCH 03/28] OMAP3: PM: INTC " Kevin Hilman
2009-10-01 23:58 ` [PATCH 04/28] OMAP3: PM: PRCM " Kevin Hilman
2009-10-01 23:58 ` [PATCH 05/28] OMAP3: PM: Populate scratchpad contents Kevin Hilman
2009-10-01 23:58 ` [PATCH 06/28] OMAP3: PM: SCM context save/restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 07/28] OMAP3: PM: SRAM restore function Kevin Hilman
2009-10-01 23:58 ` [PATCH 08/28] OMAP3: PM: handle PER/NEON/CORE in idle Kevin Hilman
2009-10-01 23:58 ` [PATCH 09/28] OMAP3: PM: Restore MMU table entry Kevin Hilman
2009-10-01 23:58 ` [PATCH 10/28] OMAP3: PM: MPU off-mode support Kevin Hilman
2009-10-01 23:58 ` [PATCH 11/28] OMAP3: PM: CORE domain " Kevin Hilman
2009-10-01 23:58 ` [PATCH 12/28] OMAP: PM: DMA context save / restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 13/28] OMAP: PM: off-mode support for DMA on EMU/HS devices Kevin Hilman
2009-10-01 23:58 ` [PATCH 14/28] OMAP3 PM: off-mode support for HS/EMU devices Kevin Hilman
2009-10-01 23:58 ` [PATCH 15/28] OMAP3: PM: save secure RAM only during init Kevin Hilman
2009-10-01 23:58 ` [PATCH 16/28] OMAP3: PM: Enable SDRAM auto-refresh during sleep Kevin Hilman
2009-10-01 23:58 ` [PATCH 17/28] PM: Added three PLL registers to the PRCM context save Kevin Hilman
2009-10-01 23:58 ` [PATCH 18/28] PM: Changed secure RAM storage size from 0x8000 to 0x803F Kevin Hilman
2009-10-01 23:58 ` [PATCH 19/28] OMAP3: PM: Save and restore also CM_CLKSEL1_PLL_IVA2 Kevin Hilman
2009-10-01 23:58 ` [PATCH 20/28] OMAP3: PM: Fix secure SRAM context save/restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 21/28] ARM: OMAP: Add missing SMS_SYSCONFIG save/restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 22/28] OMAP3: PM: Fix PLL_MOD CLKEN offset in scratchpad Kevin Hilman
2009-10-01 23:58 ` [PATCH 23/28] OMAP: PM: Clear DMA channel state after a wakeup Kevin Hilman
2009-10-01 23:58 ` [PATCH 24/28] OMAP: Store reboot mode in scratchpad on OMAP34xx Kevin Hilman
2009-10-01 23:58 ` [PATCH 25/28] OMAP3: PM: SDRC auto-refresh workaround for off-mode Kevin Hilman
2009-10-01 23:58 ` [PATCH 26/28] OMAP3: PM: Fix INTC context save/restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 27/28] PM: Disable usb host HW save and restore Kevin Hilman
2009-10-01 23:58 ` [PATCH 28/28] OMAP3: PM: Wait for SDRC ready iso a blind delay Kevin Hilman
2009-10-03 14:53 ` [PATCH 02/28] OMAP3: PM: GPIO context save/restore Nishanth Menon
2009-10-05 17:35 ` Kevin Hilman
2009-10-05 18:02 ` Nishanth Menon [this message]
2009-10-05 18:21 ` Kevin Hilman
2009-10-03 14:48 ` [PATCH 01/28] OMAP3: PM: GPMC " Nishanth Menon
2009-10-05 17:17 ` Kevin Hilman
2009-10-05 17:31 ` Nishanth Menon
2009-10-05 17:29 ` Kevin Hilman
2009-10-05 17:58 ` Nishanth Menon
2009-10-05 18:15 ` Kevin Hilman
2009-10-05 18:32 ` Nishanth Menon
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=4ACA34B0.7080405@ti.com \
--to=nm@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=menon.nishanth@gmail.com \
--cc=rnayak@ti.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