From: Nishanth Menon <nm@ti.com>
To: "Sripathy, Vishwanath" <vishwanath.bs@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
Kevin <khilman@deeprootsystems.com>,
Jean Pihet <jean.pihet@newoldbits.com>, Tony <tony@atomide.com>
Subject: Re: [PATCH 02/13] OMAP3: PM: Errata i581 suppport: dll kick strategy
Date: Wed, 24 Nov 2010 11:24:26 -0600 [thread overview]
Message-ID: <4CED4A4A.3050108@ti.com> (raw)
In-Reply-To: <AANLkTi=cb1LDS0nJr+gS47qc2qpw_kRz8+ZxV_x2gSJ0@mail.gmail.com>
Sripathy, Vishwanath had written, on 11/24/2010 10:51 AM, the following:
> On Fri, Nov 19, 2010 at 7:24 AM, Nishanth Menon <nm@ti.com> wrote:
>> From: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
>>
>> Errata i581 impacts OMAP3 platforms.
>> PRCM DPLL control FSM removes SDRC_IDLEREQ before DPLL3 locks causing
>> the DPLL not to be locked at times.
>>
>> IMPORTANT: this is not a complete workaround implementation as recommended
>> by the silicon errata. this is a support logic for detecting lockups and
>> attempting to recover where possible and is known to provide stability
>> in multiple platforms.
>
> How does this WA work when Core enters off mode? SRAM contents are
> lost when Core enters off. So how this code is copied to SRAM upon
> wakeup? Where is this code placed when Core entered off mode?
It depends on the location of wait_sdram_ok - ideally speaking yep, you
are right the current wait_sdram_ok for OFF makes no sense at all as it
wakes off the ddr. For retention though, it makes sense. after the
discussion we had on Jean's series
http://marc.info/?t=128532555200004&r=1&w=2, I am pretty sure that
refactor that Jean is doing will help us clean this mess up.
Maybe we can refactor this as part of Jean's cleanups.
>
> Vishwa
>> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
>> ---
>> arch/arm/mach-omap2/sleep34xx.S | 52 +++++++++++++++++++++++++++++++++++---
>> 1 files changed, 47 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
>> index 8f207b2..5a4468f 100644
>> --- a/arch/arm/mach-omap2/sleep34xx.S
>> +++ b/arch/arm/mach-omap2/sleep34xx.S
>> @@ -42,6 +42,7 @@
>> OMAP3430_PM_PREPWSTST)
>> #define PM_PWSTCTRL_MPU_P OMAP3430_PRM_BASE + MPU_MOD + OMAP2_PM_PWSTCTRL
>> #define CM_IDLEST1_CORE_V OMAP34XX_CM_REGADDR(CORE_MOD, CM_IDLEST1)
>> +#define CM_IDLEST_CKGEN_V OMAP34XX_CM_REGADDR(PLL_MOD, CM_IDLEST)
>> #define SRAM_BASE_P 0x40200000
>> #define CONTROL_STAT 0x480022F0
>> #define SCRATCHPAD_MEM_OFFS 0x310 /* Move this as correct place is
>> @@ -554,31 +555,67 @@ skip_l2_inval:
>>
>> /* Make sure SDRC accesses are ok */
>> wait_sdrc_ok:
>> +
>> +/* DPLL3 must be locked before accessing the SDRC. Maybe the HW ensures this. */
>> + ldr r4, cm_idlest_ckgen
>> +wait_dpll3_lock:
>> + ldr r5, [r4]
>> + tst r5, #1
>> + beq wait_dpll3_lock
>> +
>> ldr r4, cm_idlest1_core
>> +wait_sdrc_ready:
>> ldr r5, [r4]
>> - and r5, r5, #0x2
>> - cmp r5, #0
>> - bne wait_sdrc_ok
>> + tst r5, #0x2
>> + bne wait_sdrc_ready
>> + /* allow DLL powerdown upon hw idle req */
>> ldr r4, sdrc_power
>> ldr r5, [r4]
>> bic r5, r5, #0x40
>> str r5, [r4]
>> -wait_dll_lock:
>> +is_dll_in_lock_mode:
>> +
>> /* Is dll in lock mode? */
>> ldr r4, sdrc_dlla_ctrl
>> ldr r5, [r4]
>> tst r5, #0x4
>> bxne lr
>> /* wait till dll locks */
>> - ldr r4, sdrc_dlla_status
>> +wait_dll_lock_timed:
>> + ldr r4, wait_dll_lock_counter
>> + add r4, r4, #1
>> + str r4, wait_dll_lock_counter
>> + ldr r4, sdrc_dlla_status
>> + mov r6, #8 /* Wait 20uS for lock */
>> +wait_dll_lock:
>> + subs r6, r6, #0x1
>> + beq kick_dll
>> ldr r5, [r4]
>> and r5, r5, #0x4
>> cmp r5, #0x4
>> bne wait_dll_lock
>> bx lr
>>
>> + /* disable/reenable DLL if not locked */
>> +kick_dll:
>> + ldr r4, sdrc_dlla_ctrl
>> + ldr r5, [r4]
>> + mov r6, r5
>> + bic r6, #(1<<3) /* disable dll */
>> + str r6, [r4]
>> + dsb
>> + orr r6, r6, #(1<<3) /* enable dll */
>> + str r6, [r4]
>> + dsb
>> + ldr r4, kick_counter
>> + add r4, r4, #1
>> + str r4, kick_counter
>> + b wait_dll_lock_timed
>> +
>> cm_idlest1_core:
>> .word CM_IDLEST1_CORE_V
>> +cm_idlest_ckgen:
>> + .word CM_IDLEST_CKGEN_V
>> sdrc_dlla_status:
>> .word SDRC_DLLA_STATUS_V
>> sdrc_dlla_ctrl:
>> @@ -615,5 +652,10 @@ control_stat:
>> .word CONTROL_STAT
>> kernel_flush:
>> .word v7_flush_dcache_all
>> + /* these 2 words need to be at the end !!! */
>> +kick_counter:
>> + .word 0
>> +wait_dll_lock_counter:
>> + .word 0
>> ENTRY(omap34xx_cpu_suspend_sz)
>> .word . - omap34xx_cpu_suspend
>> --
>> 1.6.3.3
>>
>>
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2010-11-24 17:24 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 1:54 [PATCH 00/13] OMAP3: OFF mode fixes Nishanth Menon
2010-11-19 1:54 ` [PATCH 01/13] OMAP3: PM: Update clean_l2 to use v7_flush_dcache_all Nishanth Menon
2010-11-19 9:46 ` Jean Pihet
2010-11-19 9:57 ` Peter 'p2' De Schrijver
2010-11-19 10:15 ` Jean Pihet
2010-11-19 1:54 ` [PATCH 02/13] OMAP3: PM: Errata i581 suppport: dll kick strategy Nishanth Menon
2010-11-24 16:51 ` Sripathy, Vishwanath
2010-11-24 17:24 ` Nishanth Menon [this message]
2010-11-25 6:39 ` Sripathy, Vishwanath
2010-11-25 12:22 ` Peter 'p2' De Schrijver
2010-11-19 1:54 ` [PATCH 03/13] OMAP3: PM: make secure ram save size configurable Nishanth Menon
2010-11-19 1:54 ` [PATCH 04/13] OMAP3: PM: Save secure RAM context before entering WFI Nishanth Menon
2010-11-19 1:54 ` [PATCH 05/13] OMAP3: PM: optional save secure RAM context every core off cycle Nishanth Menon
2010-11-19 1:54 ` [PATCH 06/13] OMAP3: PM: Fix secure save size for OMAP3 Nishanth Menon
2010-11-19 1:54 ` [PATCH 07/13] OMAP3: PM: allocate secure RAM context memory from low-mem Nishanth Menon
2010-11-19 1:54 ` [PATCH 08/13] OMAP3: PM: Deny MPU idle while saving secure RAM Nishanth Menon
2010-11-19 17:08 ` Kevin Hilman
2010-11-19 17:16 ` Nishanth Menon
2010-11-19 17:18 ` Santosh Shilimkar
2010-11-19 17:24 ` Nishanth Menon
2010-11-19 17:28 ` Santosh Shilimkar
2010-11-19 18:51 ` Nishanth Menon
2010-11-19 20:39 ` Kevin Hilman
2010-11-19 20:54 ` Nishanth Menon
2010-11-19 21:06 ` Kevin Hilman
2010-11-19 21:15 ` Nishanth Menon
2010-11-20 10:04 ` Santosh Shilimkar
2010-11-19 19:41 ` Kevin Hilman
2010-11-19 20:18 ` Nishanth Menon
2010-11-19 20:55 ` Kevin Hilman
2010-11-19 21:02 ` Nishanth Menon
2010-11-19 21:09 ` Kevin Hilman
2010-11-20 10:02 ` Santosh Shilimkar
2010-11-19 1:54 ` [PATCH 09/13] OMAP3: PM: Apply errata i540 before save secure ram Nishanth Menon
2010-11-19 10:09 ` Jean Pihet
2010-11-19 12:12 ` Nishanth Menon
2010-11-19 12:54 ` Jean Pihet
2010-11-19 17:15 ` Kevin Hilman
2010-11-19 17:18 ` Nishanth Menon
2010-11-19 19:47 ` Kevin Hilman
2010-11-19 20:08 ` Nishanth Menon
2010-11-19 1:54 ` [PATCH 10/13] OMAP3: PM: Errata i582: per domain reset issue: uart Nishanth Menon
2010-11-22 18:59 ` Kevin Hilman
2010-11-19 1:54 ` [PATCH 11/13] OMAP3630: PM: Errata i608: disable RTA Nishanth Menon
2010-11-19 9:57 ` Jean Pihet
2010-11-19 12:09 ` Nishanth Menon
2010-11-19 1:54 ` [PATCH 12/13] OMAP3630: PM: Disable L2 cache while invalidating L2 cache Nishanth Menon
2010-11-19 1:54 ` [PATCH 13/13] OMAP3630: PM: Errata i583: disable coreoff if < ES1.2 Nishanth Menon
2010-11-19 10:07 ` Jean Pihet
2010-11-19 12:14 ` Nishanth Menon
2010-11-19 10:18 ` [PATCH 00/13] OMAP3: OFF mode fixes Jean Pihet
2010-11-19 12:03 ` Nishanth Menon
2010-11-19 21:20 ` Kevin Hilman
2010-11-19 21:37 ` Nishanth Menon
2010-11-20 9:56 ` Santosh Shilimkar
2010-11-22 16:08 ` Kevin Hilman
2010-11-22 19:16 ` Kevin Hilman
2010-11-23 9:02 ` Santosh Shilimkar
2010-11-23 20:35 ` Kevin Hilman
2010-11-24 5:34 ` Santosh Shilimkar
2010-11-24 9:22 ` Santosh Shilimkar
2010-11-24 17:11 ` Jean Pihet
2010-11-24 17:21 ` 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=4CED4A4A.3050108@ti.com \
--to=nm@ti.com \
--cc=jean.pihet@newoldbits.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vishwanath.bs@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;
as well as URLs for NNTP newsgroup(s).