From: toddpoynor@google.com (Todd Poynor)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 03/13] OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros
Date: Thu, 7 Jul 2011 11:27:58 -0700 [thread overview]
Message-ID: <20110707182758.GA32199@google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1107070223340.30028@utopia.booyaka.com>
On Thu, Jul 07, 2011 at 02:25:23AM -0600, Paul Walmsley wrote:
> On Fri, 1 Jul 2011, Benoit Cousson wrote:
>
> > The CLKCTRL register was accessed using an absolute address.
> > The usage of hardcoded macros to calculate virtual address from physical
> > one should be avoided as much as possible.
> > The usage of a offset will allow future improvement like migration from
> > the current architecture code toward a module driver.
> >
> > Update cm_xxx accessor, move definition to the proper header file and
> > update copyrights.
> >
> > Signed-off-by: Benoit Cousson <b-cousson@ti.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Rajendra Nayak <rnayak@ti.com>
>
> This patch was updated to use '_cminst_' in the function names that are in
> the cminst44xx.c file, rather than '_cm_', to preserve consistency with
> the rest of the file. Updated patch below.
>
...
> -int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg)
> +int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
> {
> int i = 0;
>
> - if (!clkctrl_reg)
> + if (!clkctrl_offs)
> return 0;
>
> omap_test_timeout((
> - ((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) == 0) ||
> - (((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) >>
> - OMAP4430_IDLEST_SHIFT) == 0x2)),
> + _clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) == 0 ||
> + _clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) == 0x2),
> MAX_MODULE_READY_TIME, i);
Suggest adding symbols for the constant IDLEST values, next to the 0x3
value added for "[PATCH v2 04/13] OMAP: hwmod: Wait the idle status to
be disabled".
Would be nice to call _clkctrl_idlest() once.
Similar vague questioning of the API names as for the above-mentioned
patch: this waits for the module slave to be ready, don't know if
anything similar is needed for module masters or if it's important to
keep this distinction.
Todd
next prev parent reply other threads:[~2011-07-07 18:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 21:09 [PATCH v3 00/13] OMAP4: Add modulemode support to hwmod framework Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 01/13] OMAP4: hwmod data: Add clock domain attribute Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 02/13] OMAP2+: hwmod: Init clkdm field at boot time Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 03/13] OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros Benoit Cousson
2011-07-07 8:25 ` Paul Walmsley
2011-07-07 18:27 ` Todd Poynor [this message]
2011-07-07 21:40 ` Paul Walmsley
2011-07-07 21:42 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 04/13] OMAP: hwmod: Wait the idle status to be disabled Benoit Cousson
2011-07-05 18:21 ` Todd Poynor
2011-07-07 8:10 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 05/13] OMAP2+: hwmod: Replace clkdm access from main_clk using hwmod attribute Benoit Cousson
2011-07-06 23:27 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 06/13] OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros Benoit Cousson
2011-07-07 8:28 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 07/13] OMAP4: prm: Replace warm reset API with the offset based version Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 08/13] OMAP4: prm: Remove deprecated functions Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 09/13] OMAP4: hwmod data: Align interconnect format with regular modules Benoit Cousson
2011-07-06 22:42 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 10/13] OMAP4: hwmod data: Add PRM context register offset Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 11/13] OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure Benoit Cousson
2011-07-01 21:09 ` [PATCH v3 12/13] OMAP4: cm: Add two new APIs for modulemode control Benoit Cousson
2011-07-07 8:32 ` Paul Walmsley
2011-07-01 21:09 ` [PATCH v3 13/13] OMAP4: hwmod: Introduce the module control in hwmod control Benoit Cousson
2011-07-07 8:17 ` [PATCH v3 00/13] OMAP4: Add modulemode support to hwmod framework Paul Walmsley
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=20110707182758.GA32199@google.com \
--to=toddpoynor@google.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).