From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
Benoit Cousson <b-cousson@ti.com>, Jon Hunter <jon-hunter@ti.com>,
Madhusudhan Chikkature Rajashekar <madhu.cr@ti.com>,
Paul Walmsley <paul@pwsan.com>, Romit Dasgupta <romit@ti.com>,
Sanjeev Premi <premi@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Sergio Alberto Aguirre Rodriguez <saaguirre@ti.com>,
SuiLun Lam <s-lam@ti.com>, Thara Gopinath <thara@ti.com>,
Vishwanath Sripathy <vishwanath.bs@ti.com>
Subject: Re: [PATCH 8/9 v2] omap3: pm: introduce dynamic OPP
Date: Fri, 13 Nov 2009 17:31:28 -0800 [thread overview]
Message-ID: <87hbsxnb7z.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1258092322-30833-9-git-send-email-nm@ti.com> (Nishanth Menon's message of "Fri\, 13 Nov 2009 00\:05\:21 -0600")
Nishanth Menon <nm@ti.com> writes:
> OPP tables have been used as static arrays till now this causes
> limitations in terms of ability to dynamically making decisions
> for cpu types and populating it with the right values. This
> implementation is based on the discussions in the thread:
> http://marc.info/?l=linux-omap&m=125482970102327&w=2
> inputs from Romit, Benoit, Kevin, Sanjeev, Santosh acked.
>
> omap3_pm_init_opp_table is introduced here, and the default omap3
> tables have been renamed to omap34xx_ tables, original omap3_xx
> tables are now dynamically allocated and populated.
>
> Corresponding board files calling omap2_init_common_hw with the
> active opp table params have been updated with this patch.
>
> This now paves way to introduce 3630 OPP tables.
>
> Tested on: SDP3430 - SDP3630 boot breaks with this patch
> (as SDP3630 needs corresponding correct VDD2 freq w.r.t SDRC clk.
> The next patch in this series fixes things)
>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Madhusudhan Chikkature Rajashekar <madhu.cr@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Romit Dasgupta <romit@ti.com>
> Cc: Sanjeev Premi <premi@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Sergio Alberto Aguirre Rodriguez <saaguirre@ti.com>
> Cc: SuiLun Lam <s-lam@ti.com>
> Cc: Thara Gopinath <thara@ti.com>
> Cc: Vishwanath Sripathy <vishwanath.bs@ti.com>
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
[...]
> +void __init omap3_pm_init_opp_table(void)
> +{
> + /* Populate the base CPU rate tables here */
> + omap3_mpu_rate_table = kmalloc(sizeof(omap34xx_mpu_rate_table),
> + GFP_KERNEL);
> + omap3_dsp_rate_table = kmalloc(sizeof(omap34xx_dsp_rate_table),
> + GFP_KERNEL);
> + omap3_l3_rate_table = kmalloc(sizeof(omap34xx_l3_rate_table),
> + GFP_KERNEL);
> +
> + BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table ||
> + !omap3_l3_rate_table);
> +
> + memcpy(omap3_mpu_rate_table, omap34xx_mpu_rate_table,
> + sizeof(omap34xx_mpu_rate_table));
> + memcpy(omap3_dsp_rate_table, omap34xx_dsp_rate_table,
> + sizeof(omap34xx_dsp_rate_table));
> + memcpy(omap3_l3_rate_table, omap34xx_l3_rate_table,
> + sizeof(omap34xx_l3_rate_table));
> +}
> +
Minor issue, but FYI... rather than the kmalloc + memcpy, you can use
kmemdup() to do the same thing.
Kevin
next prev parent reply other threads:[~2009-11-14 1:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 6:05 [PATCH 0/9 v2] omap3: pm: introduce support for 3630 OPPs Nishanth Menon
2009-11-13 6:05 ` [PATCH 1/9] omap3: pm: introduce enabled flag to omap_opp Nishanth Menon
2009-11-13 6:05 ` [PATCH 2/9 v2] omap3: pm: introduce opp accessor functions Nishanth Menon
2009-11-13 6:05 ` [PATCH 3/9] omap3: pm: srf: use opp accessor function Nishanth Menon
2009-11-13 6:05 ` [PATCH 4/9] omap3: pm: use opp accessor functions for omap-target Nishanth Menon
2009-11-13 6:05 ` [PATCH 5/9] omap3: pm: sr: replace get_opp with freq_to_opp Nishanth Menon
2009-11-13 6:05 ` [PATCH 6/9] omap3: clk: use pm accessor functions for cpufreq table Nishanth Menon
2009-11-13 6:05 ` [PATCH 7/9] omap3: pm: remove VDDx_MIN/MAX macros Nishanth Menon
2009-11-13 6:05 ` [PATCH 8/9 v2] omap3: pm: introduce dynamic OPP Nishanth Menon
2009-11-13 6:05 ` [PATCH 9/9 v2] omap3: pm: introduce 3630 opps Nishanth Menon
2009-11-18 20:07 ` Jon Hunter
2009-11-19 14:00 ` Sripathy, Vishwanath
2009-11-14 1:31 ` Kevin Hilman [this message]
2009-11-15 14:20 ` [PATCH 8/9 v2] omap3: pm: introduce dynamic OPP Menon, Nishanth
2009-11-14 0:58 ` [PATCH 2/9 v2] omap3: pm: introduce opp accessor functions Kevin Hilman
2009-11-15 14:54 ` Menon, Nishanth
2009-11-18 3:08 ` Nishanth Menon
2009-11-20 1:31 ` Kevin Hilman
2009-11-20 2:16 ` Nishanth Menon
2009-11-21 3:00 ` Nishanth Menon
2009-11-21 16:07 ` Cousson, Benoit
2009-11-21 19:08 ` Menon, Nishanth
2009-11-21 22:22 ` Cousson, Benoit
2009-11-22 3:35 ` Menon, Nishanth
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=87hbsxnb7z.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.com \
--cc=jon-hunter@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=madhu.cr@ti.com \
--cc=nm@ti.com \
--cc=paul@pwsan.com \
--cc=premi@ti.com \
--cc=romit@ti.com \
--cc=s-lam@ti.com \
--cc=saaguirre@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=thara@ti.com \
--cc=vishwanath.bs@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.