From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] ARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28
Date: Fri, 24 Jan 2014 14:44:48 +0100 [thread overview]
Message-ID: <20140124134446.GA25720@ulmo.nvidia.com> (raw)
In-Reply-To: <1390422036-31947-2-git-send-email-swarren@wwwdotorg.org>
On Wed, Jan 22, 2014 at 01:20:32PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> The only place where the MASK_BITS_* values are used is in
> adjust_periph_pll(), which interprets the value 4 (old MASK_BITS_29_28,
> new MASK_BITS_31_28) as being associated with mask OUT_CLK_SOURCE4_MASK,
> i.e. bits 31:28. Rename the MASK_BITS_ macro to reflect how it's actually
> implemented.
>
> Note that no Tegra clock register actually uses all of bits 31:28 as
> the mux field. Rather, bits 30:28, 29:28, or 28 are used. However, in
> those cases, nothing is stored in the bits about the mux field, so it's
s/about/above/ perhaps?
> safe to pretend that the mux field extends all the way to the end of the
> register. As such, the U-Boot clock driver is currently a bit lazy, and
> doesn't distinguish between 31:28, 30:28, 29:29 and 29; it just lumps
Shouldn't that list be: "31:28, 30:28, 29:28 and 28"?
> them all together and pretends they're all 31:28. This patch doesn't
> cause this issue; it was pre-existing. Hopefully, future patches will
> clean this up.
Yes, that'd be nice.
> diff --git a/arch/arm/include/asm/arch-tegra/clock.h b/arch/arm/include/asm/arch-tegra/clock.h
[...]
> +/*
> + * Note that no Tegra clock register actually uses all of bits 31:28 as
> + * the mux field. Rather, bits 30:28, 29:28, or 28 are used. However, in
> + * those cases, nothing is stored in the bits about the mux field, so it's
> + * safe to pretend that the mux field extends all the way to the end of the
> + * register. As such, the U-Boot clock driver is currently a bit lazy, and
> + * doesn't distinguish between 31:28, 30:28, 29:29 and 29; it just lumps
The list seems wrong here as well, but it looks like it's copy/pasted to
or from the commit message.
> enum {
> MASK_BITS_31_30 = 2, /* num of bits used to specify clock source */
> MASK_BITS_31_29,
> - MASK_BITS_29_28,
> + MASK_BITS_31_28,
> };
If this ever gets cleaned up I think it'd be clearer to explicitly
define them to the number of bits that they use by turning them into
#defines.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140124/ab8a50a7/attachment.pgp>
next prev parent reply other threads:[~2014-01-24 13:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 20:20 [U-Boot] [PATCH 1/6] ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 2/6] ARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28 Stephen Warren
2014-01-24 13:44 ` Thierry Reding [this message]
2014-01-24 17:08 ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 3/6] ARM: tegra: rename OUT_CLK_SOURCE_* Stephen Warren
2014-01-24 13:47 ` Thierry Reding
2014-01-24 17:08 ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 4/6] ARM: tegra: use MASK_BITS_* macros everywhere Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 5/6] ARM: tegra: MASK_BITS_ no longer needs specific values Stephen Warren
2014-01-24 13:50 ` Thierry Reding
2014-01-24 17:09 ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 6/6] ARM: tegra: implement MASK_BITS_31_29 Stephen Warren
2014-01-22 21:35 ` [U-Boot] [PATCH 1/6] ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum Tom Warren
2014-01-22 21:54 ` Stephen Warren
2014-01-22 22:05 ` Tom Warren
2014-01-24 13:54 ` Thierry Reding
2014-01-24 17:15 ` Stephen Warren
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=20140124134446.GA25720@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=u-boot@lists.denx.de \
/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