RE: [PATCH 03/10] OMAP3 SRF: omap3 srf driver

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

 



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