Re: OMAP3: Enabling IO Daisy Chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin,

On Fri, Jul 1, 2011 at 5:03 AM, Kevin Hilman <khilman@xxxxxx> wrote:
> +Tero
>
> Mohan V <mohanvforum@xxxxxxxxx> writes:
>
>> Hello all,
>>
>> I am trying to correct the implementation of the enabling/disabling IO
>> daisy chain in omap3.
>
> Thanks for doing the investigation and proposing a fix!
>
>> I am following the steps as listed in the OMAP36xx TRM Sec. 3.5.7.2.2
>> for the same.
>
> Please add the TRM reference in the changelog (preferablly the public
> TRM reference, otherwise note it's the NDA TRM.)
>
Ok

>> Branch: linux-omap-pm: "pm" branch
>
> Patch should be generated against mainline.  There shouldn't be any
> dependencies on my PM branch.
>
>> config: omap2plus_defconfig
>>
>> Please find the below patch for the same.
>
> In the future, please send patches inline.  Any meta-comments that
> should not be in the git history can go after the '---' line in the
> changelog.
>
Ok

>> ------------------------------------------------------------
>>
>> From: Mohan <mohanv@xxxxxx>
>> Date: Thu, 30 Jun 2011 12:19:55 +0530
>> Subject: [PATCH] omap3: pm: correct enable/disable of daisy io chain
>>
>> Currently the enabling and disabling of IO Daisy chain is not
>> according to the TRM.
>> The below steps are followed to enable/disable the IO chain.
>>
>> Steps to enable IO chain:
>> (a) Set PM_WKEN_WKUP.EN_IO bit
>> (b) Set the PM_WKEN_WKUP.EN_IO_CHAIN bit
>> (c) Poll for PM_WKST_WKUP.ST_IO_CHAIN. When set to 1, clear it.
>>
>> Steps to disable IO chain:
>> [a] Clear PM_WKEN_WKUP.EN_IO_CHAIN bit
>> [b] Clear PM_WKEN_WKUP.EN_IO bit
>> [c] Clear PM_WKST_WKUP.ST_IO bit by writing 1 to it.
>
> Here, please report what platforms this was tested on.  It should at
> least be tested using off-mode on 3430 and 3630.
>
> Also, I think we need to skip step 'c' of both, since that part will be
> handled later by the PRCM interrup handler.  If we clear them here, by
> the time the PRCM interrupt handler runs, we won't be able to detect
> there was a wakeup.
>
Thanks Kevin. By skipping the step [c] in both cases, I am not seeing
the warnings.
I shall post an updated patch.

Regards,
Mohan

> Kevin
>
>> Signed-off-by: Mohan V <mohanv@xxxxxx>
>> ---
>>  arch/arm/mach-omap2/pm34xx.c |    7 ++++---
>>  1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
>> index d8c00e4..7f0d371 100644
>> --- a/arch/arm/mach-omap2/pm34xx.c
>> +++ b/arch/arm/mach-omap2/pm34xx.c
>> @@ -91,7 +91,7 @@ static void omap3_enable_io_chain(void)
>>               /* Do a readback to assure write has been done */
>>               prm_read_mod_reg(WKUP_MOD, PM_WKEN);
>>
>> -             while (!(prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
>> +             while (!(prm_read_mod_reg(WKUP_MOD, PM_WKST) &
>>                        OMAP3430_ST_IO_CHAIN_MASK)) {
>>                       timeout++;
>>                       if (timeout > 1000) {
>> @@ -99,9 +99,9 @@ static void omap3_enable_io_chain(void)
>>                                      "activation failed.\n");
>>                               return;
>>                       }
>> -                     prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
>> -                                          WKUP_MOD, PM_WKEN);
>>               }
>> +             prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
>> +                                          WKUP_MOD, PM_WKST);
>>       }
>>  }
>>
>> @@ -572,6 +572,7 @@ void omap_sram_idle(void)
>>                       core_next_state < PWRDM_POWER_ON) {
>>               prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
>>               omap3_disable_io_chain();
>> +             prm_set_mod_reg_bits(OMAP3430_ST_IO_MASK, WKUP_MOD, PM_WKST);
>>       }
>>
>>       pwrdm_post_transition();
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux