From: Shubhrajyoti <shubhrajyoti@ti.com>
To: ext-denis.2.karpov@nokia.com
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] mmc : omap_hsmmc : Save and restore the sysc across reset
Date: Mon, 16 Jan 2012 19:52:14 +0530 [thread overview]
Message-ID: <4F143296.8090802@ti.com> (raw)
In-Reply-To: <5E7C2FE2AE03DF4CA6AC500032BF8F77C1762A@008-AM1MPN1-072.mgdnok.nokia.com>
On Monday 16 January 2012 06:41 PM, ext-denis.2.karpov@nokia.com wrote:
> ext Shubhrajyoti D wrote on 2012-01-16:
>> The commit 11dd62:[omap_hsmmc: context save/restore support]
>>
>> does a reset and restores AUTOIDLE settings.
>> This patch saves the register does a reset and restores
>> the same configuration.
> ...
>> if (pdata->get_context_loss_count) {
>> @@ -700,6 +700,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host
>> *host)
>> && time_before(jiffies, timeout))
>> ;
>> + sysc = OMAP_HSMMC_READ(host->base, SYSCONFIG);
>> /* Do software reset */
>> OMAP_HSMMC_WRITE(host->base, SYSCONFIG, SOFTRESET);
>> timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
>> @@ -707,8 +708,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host
>> *host)
>> && time_before(jiffies, timeout))
>> ;
>> - OMAP_HSMMC_WRITE(host->base, SYSCONFIG,
>> - OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE);
>> + OMAP_HSMMC_WRITE(host->base, SYSCONFIG, sysc);
> The meaning of the code is to restore the register context after it was lost during transition into low power consumption state. SW reset is needed to bring all the registers in a consistent state before reconfiguring some of them.
Agreed thanks.
> Saving and restoring the SYSCONFIG register across SW reset is not needed.
>
> Also re-configuring AUTOIDLE feature is not necessary since SYSCONFIG reset value has is 1 already, according to TRM. I guess it was done to make things more explicit.
However in addition to autoidle there are other bits in the register
like the sidle mode , enable wakeup which will get not get overwritten now.
Do you agree?
> Denis
next prev parent reply other threads:[~2012-01-16 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 11:33 [PATCH RFC] mmc : omap_hsmmc : Save and restore the sysc across reset Shubhrajyoti D
2012-01-16 13:11 ` ext-denis.2.karpov
2012-01-16 14:22 ` Shubhrajyoti [this message]
2012-01-16 14:53 ` ext-denis.2.karpov
2012-01-16 16:49 ` Shubhrajyoti
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=4F143296.8090802@ti.com \
--to=shubhrajyoti@ti.com \
--cc=ext-denis.2.karpov@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
/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).