From: jouni.hogander@nokia.com (Högander Jouni)
To: ext Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 03/10] OMAP3 SRF: omap3 srf driver
Date: Wed, 13 Aug 2008 10:08:42 +0300 [thread overview]
Message-ID: <87fxp95r45.fsf@trdhcp146196.ntc.nokia.com> (raw)
In-Reply-To: <46647.192.168.10.89.1218459995.squirrel@dbdmail.itg.ti.com> (ext Rajendra Nayak's message of "Mon, 11 Aug 2008 18:36:35 +0530 (IST)")
"ext Rajendra Nayak" <rnayak@ti.com> writes:
> +int set_pd_latency(struct shared_resource *resp, u32 latency)
> +{
> + u32 pd_lat_level, ind, i;
> + struct pd_latency_db *pd_lat_db;
> + struct powerdomain *pwrdm;
> +
> + pd_lat_db = resp->resource_data;
> + pwrdm = pd_lat_db->pd;
> + pd_lat_level = PD_LATENCY_OFF;
> + /* using the latency db map to the appropriate PD state */
> + for (ind = 0; ind < PD_LATENCY_MAXLEVEL; ind++)
> + if (pd_lat_db->latency[ind] < latency)
> + pd_lat_level = ind;
> +
> + resp->curr_level = pd_lat_level;
> + switch (pd_lat_level) {
> + case PWRDM_POWER_OFF:
> + case PWRDM_POWER_RET:
> + /* Errata 1.29: No transitions from INACTIVE to RET/OFF
> + * possible.
> + * Need to be taken care of here.
> + */
> + if (pwrdm_read_pwrst(pwrdm) != PWRDM_POWER_ON) {
> + /* Force the clock domains to ON */
> + for (i = 0; pwrdm->pwrdm_clkdms[i]; i++) {
> + omap2_clkdm_deny_idle(pwrdm->pwrdm_clkdms[i]);
> + omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[i]);
> + }
> + pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_ON);
> + pwrdm_set_next_pwrst(pwrdm, pd_lat_level);
> + for (i = 0; pwrdm->pwrdm_clkdms[i]; i++) {
> + omap2_clkdm_sleep(pwrdm->pwrdm_clkdms[i]);
> + omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[i]);
> + }
> + } else
> + pwrdm_set_next_pwrst(pwrdm, pd_lat_level);
You could use set_pwrdm_state from pm34xx.c here and update it if
necessary. This way your workaround for errate 1.29 would be available
for cpuidle, pm_idle, srf and suspend.
--
Jouni Högander
--
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
next prev parent reply other threads:[~2008-08-13 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 13:06 [PATCH 03/10] OMAP3 SRF: omap3 srf driver Rajendra Nayak
2008-08-13 7:08 ` Högander Jouni [this message]
2008-08-13 8:25 ` Rajendra Nayak
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=87fxp95r45.fsf@trdhcp146196.ntc.nokia.com \
--to=jouni.hogander@nokia.com \
--cc=linux-omap@vger.kernel.org \
--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