All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>,
	linux-omap mailing list <linux-omap@vger.kernel.org>,
	"Turquette, Mike" <mturquette@ti.com>
Subject: Re: Setting OMAP DSS fck
Date: Thu, 1 Dec 2011 09:58:43 +0100	[thread overview]
Message-ID: <4ED741C3.9010904@ti.com> (raw)
In-Reply-To: <1322727382.16429.4.camel@deskari>

Hi Tomi,

On 12/1/2011 9:16 AM, Tomi Valkeinen wrote:
> Hi,
>
> Why is it that the rate of DSS functional clock (dss_dss_clk on OMAP4)
> cannot be set, but we need to get the parent of the fck, and set the
> rate of that? The same is on OMAP3.

This is a limitation of the clock fmwk, you cannot change the rate if 
you do not have a .set_rate function in your clock node. It is not 
propagated automatically to the parent.

In your case, here is the parent:

static struct clk dpll_per_m5x2_ck = {
	.name		= "dpll_per_m5x2_ck",
	.parent		= &dpll_per_x2_ck,
	.clksel		= dpll_per_m2x2_div,
	.clksel_reg	= OMAP4430_CM_DIV_M5_DPLL_PER,
	.clksel_mask	= OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
	.ops		= &clkops_omap4_dpllmx_ops,
	.recalc		= &omap2_clksel_recalc,
	.round_rate	= &omap2_clksel_round_rate,
	.set_rate	= &omap2_clksel_set_rate,
};

And here is the child you are trying to set the rate to.

static struct clk dss_dss_clk = {
	.name		= "dss_dss_clk",
	.ops		= &clkops_omap2_dflt,
	.enable_reg	= OMAP4430_CM_DSS_DSS_CLKCTRL,
	.enable_bit	= OMAP4430_OPTFCLKEN_DSSCLK_SHIFT,
	.clkdm_name	= "l3_dss_clkdm",
	.parent		= &dpll_per_m5x2_ck,
	.recalc		= &followparent_recalc,
};

Propagating a set_rate to a parent is not a simple task because the fmwk 
do not have a clue about the siblings you might potentially have. And 
changing the parent will have an impact on every potential children.

In this case, it seems that there is only one child, so it might be 
possible.

I know this kind of issue was discussed during the new common clock fmwk 
discussion.

I'm Cc'ing Mike who will know the status of such feature.

>  From driver's perspective I think this only makes things more complex,
> as the driver is not interested in the parent, only about the dss fck.

Fully agree. It should transparent for the driver.

Regards,
Benoit

  reply	other threads:[~2011-12-01  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  8:16 Setting OMAP DSS fck Tomi Valkeinen
2011-12-01  8:58 ` Cousson, Benoit [this message]
2011-12-01 17:00   ` Turquette, Mike
2011-12-01 18:23 ` Paul Walmsley
2011-12-02  7:39   ` Tomi Valkeinen

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=4ED741C3.9010904@ti.com \
    --to=b-cousson@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@ti.com \
    --cc=paul@pwsan.com \
    --cc=tomi.valkeinen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.