From: Nishanth Menon <nm@ti.com>
To: "Premi, Sanjeev" <premi@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [RFC] omap3: Enable SmartReflex calculations for 720MHz
Date: Sat, 08 Jan 2011 08:55:49 -0600 [thread overview]
Message-ID: <4D287AF5.3070300@ti.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB593024829AF66@dbde02.ent.ti.com>
Premi, Sanjeev wrote, on 01/08/2011 06:29 AM:
[..]
>>> [1] SPRUFF1D-June 2009 section 1.5.2.1.1
>> Where is this doc?
[..]
> [sp] Thanks for pointing out. It is not accessible for some reasons.
> It can be... and is being looked into as i write this message.
>
thanks.
> [snip]...[snip]
>
>>> +#define SWCALC_OPP6_DELTA_NNT 379
>>> +#define SWCALC_OPP6_DELTA_PNT 227
>>> +#define GAIN_MAXLIMIT 16
>>
>> Magic numbers - do they scale from 3430 to 3630?
>
> [sp] The patch is meant for 720MHz - which is applicable for 3430 only.
> So, these values are meant for 3430.
Right - and since sr_device is common for omap3, omap4 etc.. does'nt it
make sense to isolate code properly out?
>
> [snip]...[snip]
>
>>
>>> +
>>> +static u32 swcalc_opp6_nvalue(u32 opp5_nvalue)
>> so what does this actually do?
>
> [sp] Returns a nvalue which corresponds to opp6 based on input which
> is nvalue of opp5. Elementary?
yes Sherlock :). I apologize that I was'nt clear. But I was wondering
about the following:
what does the algo actually do - does it add a specific voltage delta or
some %v to previous nTarget?
It takes an input and does some magic - what does that magic algo do to
produce output?
it is possible that it is self evident to you, but it is not to me -
probably because I dont have the mentioned doc to refer to.
what is the overall objective of this code?
we have start nTarget from OPP5 and we are trying to put in a new one
for OPP6 out of the previous one.
things that pop in my mind are:
a) if this was the case, I just need OPP1 value, I could generate values
for all other OPPs.
b) if the algo itself was generic enough, we could use it in OMAP3430,
3630, OMAP4 etc.. - as far as I have confirmed from h/w team in the last
couple of years multiple times, ntarget generation algo for OMAP34,36,4x
series is not algo based, but production floor operation based (making
it unique and not really an algo based mechanism of nTarget programming).
>
>>> +{
>
> [snip]...[snip]
>
>>> + opp6_nvalue = (opp6_senPgain<< 0x14) |
>> (opp6_senNgain< 0x10) |
>>> + (opp6_senPRN<< 0x8) | opp6_senNRN;
>>> +
>>> + return opp6_nvalue;
>
> [sp] Elementary, if you preferred to read the code. Rather that glossing
> over in hurry to respond compulsively.
I had hoped you could help my time a little (I do other things other
than review as well ;)) by documenting the algo in the function header?
>
>>> +}
>
> [snip]...[snip]
>
>> Sorry, Dumb question:
>> a) You are using OPP5's nTarget to use in OPP6's nTarget?
>> is'nt it fused
>> in for OPP6 offset?
>
> [sp] Again, in hurry to respond, you missed the description for the patch
> [quote]
> The eFuse registers do not contain the nValue to be used
> with 720MHz (OPP6). This patch implements procedure to
> calculate the nValue(OPP6) based on the nValue(OPP5).
> [/quote]
Right - how does it calculate the value for OPP6 from OPP5?
>
>> b) you are using OMAP343X_CONTROL_FUSE_OPP5_VDD1 itself
>
> [sp] Quoting the description:
> [quote]
> The eFuse registers do not contain the nValue to be used
> with 720MHz (OPP6). This patch implements procedure to
> calculate the nValue(OPP6) based on the nValue(OPP5).
> [/quote]
>
> Repeating again, just in case you missed: nvalues for OPP6 are
> calculated based on the nvalues for OPP5. So, i need to use
> OMAP343X_CONTROL_FUSE_OPP5_VDD1.
why not define CONTROL_FUSE_OPP6_VDD1 with the same offset?
>
>> c) these should be __init functions.
>
> [sp] They will be when i post formal patch.
>
>> d) how would you allow this code to work with 3440?
>
> [sp] Does 3440 have same behavior? If so, it is quite easy by
> updating this check.
> [quote]
> + if (cpu_is_omap34xx()&& omap3_has_720mhz()) {
> + nvalue_table[count-1].nvalue = swcalc_opp6_nvalue(
> + nvalue_table[count-2].nvalue);
> + }
> [/quote]
>
> However, i am not conversant with 3440. This will have to be
> covered by a separate patch.
Right - could you help start a TI internal conversation and alignment to
ensure 3440 is not broken by this change?
>
>> e) next time could you please try STOP using CaMELCASInG in your
>> variables and functions?
>
> [sp] Did you ever notice any camelcase in any of my formal patch
> submissions earlier. 10 brownie points for catching it here!
why do you waste reviewer time by posting CamelCasing anyways? your
responses make me wonder why did I even care to spend time to review
your code? could have waited for your formal patch and NAKed it :). ok..
no more discussions from me anymore untill your formal patch arrives
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2011-01-08 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 17:26 [RFC] omap3: Enable SmartReflex calculations for 720MHz Sanjeev Premi
2011-01-07 19:55 ` Nishanth Menon
2011-01-08 11:12 ` Premi, Sanjeev
2011-01-08 12:29 ` Premi, Sanjeev
2011-01-08 14:55 ` Nishanth Menon [this message]
2011-01-10 12:32 ` Premi, Sanjeev
2011-01-08 20:46 ` Premi, Sanjeev
2011-01-07 22:12 ` Koen Kooi
2011-01-08 10:42 ` Premi, Sanjeev
2011-01-08 10:59 ` Koen Kooi
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=4D287AF5.3070300@ti.com \
--to=nm@ti.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.