public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rajendra Nayak" <rnayak@ti.com>
To: "'\"Högander\" Jouni'" <jouni.hogander@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: RE: [PATCH 03/10] OMAP3 SRF: omap3 srf driver
Date: Wed, 13 Aug 2008 13:55:49 +0530	[thread overview]
Message-ID: <00d801c8fd1e$3157c120$LocalHost@wipultra1382> (raw)
In-Reply-To: <87fxp95r45.fsf@trdhcp146196.ntc.nokia.com>


> -----Original Message-----
> From: "Högander" Jouni [mailto:jouni.hogander@nokia.com] 
> Sent: Wednesday, August 13, 2008 12:39 PM
> To: ext Rajendra Nayak
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH 03/10] OMAP3 SRF: omap3 srf driver
> 
> "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.

Ok, will see how I can do that. 

> 
> --
> 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

      reply	other threads:[~2008-08-13  8:26 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
2008-08-13  8:25   ` Rajendra Nayak [this message]

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='00d801c8fd1e$3157c120$LocalHost@wipultra1382' \
    --to=rnayak@ti.com \
    --cc=jouni.hogander@nokia.com \
    --cc=linux-omap@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