public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/9] ARM: tegra: pinmux: add note re: drive group field defines
Date: Tue, 24 Feb 2015 17:08:15 -0700	[thread overview]
Message-ID: <54ED126F.3050009@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ2CeXsbav88ggBP3M9cjNCo5XAfk92WwtgvwnwQKRd75Q@mail.gmail.com>

On 02/24/2015 04:44 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 24 February 2015 at 14:08, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Tegra's drive group registers have a remarkably inconsistent layout. The
>> current U-Boot driver doesn't take this into account at all. Add a
>> comment to describe the issue, so at least anyone debugging the driver
>> will be aware of this. To solve this, we'd need to add a per-drive-group
>> data structure describing the layout for the individual register. Since
>> we don't set up too many drive groups in U-Boot at present, this
>> hopefully isn't causing too much practical issue. Still, we probably need
>> to fix this sometime.
>>
>> Wth Tegra210, the register layout becomes almost entirely consistent, so
>> this problem partially solves itself over time.
>>
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>> ---
>>   arch/arm/cpu/tegra-common/pinmux-common.c | 15 +++++++++++++++
>>   1 file changed, 15 insertions(+)
>>
>> diff --git a/arch/arm/cpu/tegra-common/pinmux-common.c b/arch/arm/cpu/tegra-common/pinmux-common.c
>> index 64baed45d591..0bef6e246357 100644
>> --- a/arch/arm/cpu/tegra-common/pinmux-common.c
>> +++ b/arch/arm/cpu/tegra-common/pinmux-common.c
>> @@ -347,6 +347,21 @@ void pinmux_config_pingrp_table(const struct pmux_pingrp_config *config,
>>   #define SCHMT_SHIFT    3
>>   #define LPMD_SHIFT     4
>>   #define LPMD_MASK      (3 << LPMD_SHIFT)
>> +/*
>> + * Note that the following DRV* and SLW* defines are accurate for many drive
>
> Do you mean 'accurate'? That seems like a good thing so wonder if this
> should be reworded a bit compared to your commit message.

I think "accurate" is correct; the defines accurately describe the 
layout of the register in many cases, but not all. In cases where the 
register layout is different, the defines are not accurate for those 
cases. I suppose "correct" and "incorrect" would be suitable synonyms 
for "accurate" and "not accurate" if you wish.

>> + * groups on many SoCs. We really need a per-group data structure to solve
>> + * this, since the fields are in different positions/sizes in different
>> + * registers (for different groups).
>> + *
>> + * On Tegra30/114/124, the DRV*_SHIFT values vary.
>> + * On Tegra30, the SLW*_SHIFT values vary.
>> + * On Tegra30/114/124/210, the DRV*_MASK values vary, although the values
>> + *   below are wide enough to cover the widest fields, and hopefully don't
>> + *   interfere with any other fields.
>> + * On Tegra30, the SLW*_MASK values vary, but we can't use a value that's
>> + *   wide enough to cover all cases, since that would cause the field to
>> + *   overlap with other fields in the narrower cases.
>> + */
>>   #define DRVDN_SHIFT    12
>>   #define DRVDN_MASK     (0x7F << DRVDN_SHIFT)
>>   #define DRVUP_SHIFT    20
>> --
>> 1.9.1

  reply	other threads:[~2015-02-25  0:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 21:08 [U-Boot] [PATCH 0/9] ARM: tegra: pinmux: Tegra210 support Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 1/9] ARM: tegra: pinmux: add note re: drive group field defines Stephen Warren
2015-02-24 23:44   ` Simon Glass
2015-02-25  0:08     ` Stephen Warren [this message]
2015-02-26  0:55       ` Simon Glass
2015-02-24 21:08 ` [U-Boot] [PATCH 2/9] ARM: tegra: pinmux: simplify some defines Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 3/9] ARM: tegra: pinmux: handle feature removal on newer SoCs Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 4/9] ARM: tegra: pinmux: move some type definitions Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 5/9] ARM: tegra: pinmux: partially handle varying register layouts Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 6/9] ARM: tegra: pinmux: support hsm/schmitt on pins Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 7/9] ARM: tegra: pinmux: account for different drivegroup base registers Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 8/9] ARM: tegra: pinmux: support Tegra210's e_io_hv pin option Stephen Warren
2015-02-24 21:08 ` [U-Boot] [PATCH 9/9] ARM: tegra: pinmux: add Tegra210 support Stephen Warren
2015-02-24 23:44 ` [U-Boot] [PATCH 0/9] ARM: tegra: pinmux: " Simon Glass
2015-02-25  0:06   ` Stephen Warren
2015-02-26  0:54     ` Simon Glass
2015-02-26  3:44       ` Stephen Warren
2015-02-28  5:12         ` Simon Glass
2015-03-03 20:20 ` Stephen Warren
2015-03-03 20:58   ` Tom 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=54ED126F.3050009@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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