From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP
Date: Fri, 07 Jan 2011 07:30:15 -0600 [thread overview]
Message-ID: <4D271567.2010105@ti.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1101071457540.18906@esdhcp041196.research.nokia.com>
Aaro Koskinen wrote, on 01/07/2011 07:04 AM:
> On Wed, 5 Jan 2011, Nishanth Menon wrote:
>> +static void __init beagle_opp_init(void)
>> +{
>> + int r = 0;
>> +
>> + /* Initialize the omap3 opp table */
>> + if (omap3_opp_init()) {
>> + pr_err("%s: opp default init failed\n", __func__);
>> + return;
>> + }
>> +
>> + /* Custom OPP enabled for XM */
>> + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
>> + struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
>> + struct omap_hwmod *dh = omap_hwmod_lookup("iva");
>> + struct device *dev;
>> +
>> + if (!mh || !dh) {
>> + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
>> + __func__, mh, dh);
>> + r = -EINVAL;
>> + } else {
>> + /* Enable MPU 1GHz and lower opps */
>> + dev = &mh->od->pdev.dev;
>> + r = opp_enable(dev, 800000000);
>> + /* TODO: MPU 1GHz needs SR and ABB */
>> +
>> + /* Enable IVA 800MHz and lower opps */
>> + dev = &dh->od->pdev.dev;
>> + r |= opp_enable(dev, 660000000);
>> + /* TODO: DSP 800MHz needs SR and ABB */
>> + }
>> + if (r) {
>> + pr_err("%s: failed to enable higher opp %d\n",
>> + __func__, r);
>> + /*
>> + * Cleanup - disable the higher freqs - we dont care
>> + * about the results
>> + */
>> + dev = &mh->od->pdev.dev;
>> + opp_disable(dev, 800000000);
>> + dev = &dh->od->pdev.dev;
>
> This branch will be reached also when !mh || !dh, so it won't work.
arrgh.. thanks for catching it - will fix and repost.
--
Regards,
Nishanth Menon
prev parent reply other threads:[~2011-01-07 13:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 20:49 [PATCH 0/2] OMAP3: Beagle: enable 800MHz for xm Nishanth Menon
2011-01-05 20:49 ` [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static Nishanth Menon
2011-02-01 22:01 ` Kevin Hilman
2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon
2011-01-05 23:28 ` Kevin Hilman
2011-01-06 12:24 ` Nishanth Menon
2011-01-06 13:00 ` Koen Kooi
2011-01-06 13:44 ` Nishanth Menon
2011-01-06 13:58 ` Premi, Sanjeev
2011-01-06 14:00 ` Nishanth Menon
2011-01-06 14:22 ` Premi, Sanjeev
2011-01-06 14:01 ` Koen Kooi
2011-01-06 14:07 ` Nishanth Menon
2011-01-07 13:04 ` Aaro Koskinen
2011-01-07 13:30 ` Nishanth Menon [this message]
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=4D271567.2010105@ti.com \
--to=nm@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).