RE: [PATCH 04/10] OMAP3 SRF: OMAP PM srf implementation

[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:47 PM
> To: ext Rajendra Nayak
> Cc: linux-omap@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 04/10] OMAP3 SRF: OMAP PM srf implementation
> 
> Hello Rajendra,
> 
> "ext Rajendra Nayak" <rnayak@xxxxxx> writes:
> 
> > +/*
> > + * Powerdomain usecounting hooks
> > + */
> > +
> > +void omap_pm_pwrdm_active(struct powerdomain *pwrdm) {
> > +	char *res_name;
> > +
> > +	if (!pwrdm) {
> > +		WARN_ON(1);
> > +		return;
> > +	};
> > +
> > +	if (!strcmp(pwrdm->name, "wkup_pwrdm") ||
> > +			 !strcmp(pwrdm->name, "core_pwrdm"))
> > +		return;
> > +
> > +	pr_debug("OMAP PM: powerdomain %s is becoming active\n", 
> > +pwrdm->name);
> > +
> > +	res_name = get_lat_res_name(pwrdm->name);
> > +	/* Request for a zero latency which puts the Power 
> Domain in ON state*/
> > +	resource_request(res_name, &omap_pm_dev, 0);
> > +	return;
> > +}
> > +
> > +void omap_pm_pwrdm_inactive(struct powerdomain *pwrdm) {
> > +	char *res_name;
> > +
> > +	if (!pwrdm) {
> > +		WARN_ON(1);
> > +		return;
> > +	};
> > +
> > +	if (!strcmp(pwrdm->name, "wkup_pwrdm") ||
> > +			!strcmp(pwrdm->name, "core_pwrdm"))
> > +		return;
> > +
> > +	pr_debug("OMAP PM: powerdomain %s is becoming inactive\n",
> > +		 pwrdm->name);
> > +
> > +	res_name = get_lat_res_name(pwrdm->name);
> > +	/* Release the latency requested */
> > +	resource_release(res_name, &omap_pm_dev);
> > +	return;
> > +}
> 
> For what these two functions are? Why they are 
> requesting/releasing resource?

Its needed so that a power domain is turned ON while the first clock node in it is 
requested, and turned OFF while the last clock node is disabled.

>  
> > +
> > +/*
> > + * Should be called before clk framework since clk fw will call
> > + * omap_pm_pwrdm_{in,}active()
> > + */
> > +int __init omap_pm_if_early_init(void) {
> > +	return 0;
> > +}
> 
> Why clock framework (omap2_clkdm_clk_enable/disable) is 
> calling omap_pm_pwrdm_{in,}active()? Is it for keeping track 
> of OFF transitions?

This is for clockdomain layer to indicate that a powerdomain should wake up or be put to sleep

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