From: Kevin Hilman <khilman@deeprootsystems.com>
To: Sanjeev Premi <premi@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP3 : PM : Functions to get freq from opp and vice-versa
Date: Wed, 30 Sep 2009 11:17:38 -0700 [thread overview]
Message-ID: <87fxa4mh4t.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1252495499-8455-1-git-send-email-premi@ti.com> (Sanjeev Premi's message of "Wed\, 9 Sep 2009 16\:54\:59 +0530")
Sanjeev Premi <premi@ti.com> writes:
> There is no generic function to get OPP corresponding to frequency
> and vice versa.
>
> Function get_opp() - in resource34xx.c - is included only when
> CONFIG_OMAP_PM_SRF is enabled. Moreover, it is always called with
> an explicit addition of MAX_VDDn_OPP e.g.
> opp = get_opp(mpu_opps + MAX_VDD1_OPP, clk->rate);
> opp = get_opp(l3_opps + MAX_VDD2_OPP, clk->rate);
>
> This is 'addition' is required as there is no encapsulation of
> MIN and MAX VDDs associated to the table.
>
> This patch fixes the issue by creating a 'table' object that
> encapsulates the MIN and MAX values and the existing rate table.
>
> Signed-off-by: Sanjeev Premi <premi@ti.com>
Looks ok, minor comment below...
[...]
> diff --git a/arch/arm/plat-omap/include/mach/omap-pm.h b/arch/arm/plat-omap/include/mach/omap-pm.h
> index 583e540..cf910ef 100644
> --- a/arch/arm/plat-omap/include/mach/omap-pm.h
> +++ b/arch/arm/plat-omap/include/mach/omap-pm.h
> @@ -33,6 +33,20 @@ struct omap_opp {
> u16 vsel;
> };
>
> +/* struct omap_opp_table - View OPP table as an object
> + * @min: Minimum OPP id
> + * @max: Maximim OPP id
> + * @opps: Pointer to array defining the OPPs.
> + *
> + * An OPP table has varied length. Knowing minimum and maximum
> + * OPP ids allow easy traversal.
> + */
> +struct omap_opp_table {
> + u8 min;
> + u8 max;
> + struct omap_opp* opps;
> +};
> +
> extern struct omap_opp *mpu_opps;
> extern struct omap_opp *dsp_opps;
> extern struct omap_opp *l3_opps;
> @@ -49,6 +63,17 @@ extern struct omap_opp *l3_opps;
> #define OCP_INITIATOR_AGENT 2
>
> /**
> + *
> + */
Either add a useful comment or remove the comment block (preferably the latter)
> +int opp_to_freq(unsigned long* freq, const struct omap_opp_table* table, u8 opp);
> +
> +/**
> + *
> + */
ditto
Kevin
next prev parent reply other threads:[~2009-09-30 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 11:24 [PATCH] OMAP3 : PM : Functions to get freq from opp and vice-versa Sanjeev Premi
2009-09-30 18:17 ` Kevin Hilman [this message]
2009-10-01 12:31 ` Premi, Sanjeev
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=87fxa4mh4t.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=premi@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.