All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] Tegra30: Add arch-tegra30 include files
Date: Wed, 03 Oct 2012 16:32:19 -0600	[thread overview]
Message-ID: <506CBCF3.1010302@wwwdotorg.org> (raw)
In-Reply-To: <CA+m5__J1qg5Yu9gc5xuO37DQL8eMN6kuFTMTSwciztxFbQi=2w@mail.gmail.com>

On 10/03/2012 03:48 PM, Tom Warren wrote:
> Stephen,
> 
> On Wed, Oct 3, 2012 at 1:31 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 10/02/2012 04:45 PM, Tom Warren wrote:
>>> Common Tegra files are in arch-tegra, shared between T20 and T30.
>>> Tegra30-specific headers are in arch-tegra30. Note that some of
>>> these will be filled in as more T30 support is added (drivers,
>>> WB/LP0 support, etc.).
...
>>> diff --git a/arch/arm/include/asm/arch-tegra30/emc.h b/arch/arm/include/asm/arch-tegra30/emc.h
>>
>> This file seems to be:
>>
>> a) An exact duplicate of the Tegra20 file. Did the register layout
>> really not change at all? That seems unlikely. If so, shouldn't the file
>> be shared?
>>
>> b) Not used by anything in this patch series, so shouldn't be needed.
>>
>> c) Incorrect; struct emc_ctlr doesn't actually match the register layout
>> for Tegra20 or Tegra30 (at least, offset 0 is interrupt status in HW in
>> both chips, not cfg as in the struct). Some fields match though.
> 
> I'll revisit it in our internal U-Boot source. I tried to go through
> all the include files and make sure any not used on T30 initially were
> removed, but if it's used in a common file, I didn't want to add #if
> defined(CONFIG_TEGRA20) fencing if not necessary.

Hmm. I guess this should be conditional on something like
CONFIG_TEGRA_EMC irrespective of the new Tegra30 changes; I imagine any
EMC-related code is quite optional even on Tegra20 where there is a
driver coded up.

>>> diff --git a/arch/arm/include/asm/arch-tegra30/gpio.h b/arch/arm/include/asm/arch-tegra30/gpio.h
>>
>>> + * The Tegra 3x GPIO controller has 246 GPIOS in 8 banks of 4 ports,
>>> + *  each with 8 GPIOs.
>>
>> Extra space there after *.
>>
>>> diff --git a/arch/arm/include/asm/arch-tegra30/hardware.h b/arch/arm/include/asm/arch-tegra30/hardware.h
>>
>> This file is empty except for comments. Is it really useful? The Tegra20
>> file is empty too
> 
> It's included from include/asm/hardware.h, which is included in 3 or
> so arm720t files, so it's mandatory. I hate empty files, but I don't
> see a way around it without polluting some arm720t files with
> #ifdef's. the integratorap_cm720t does the same thing.

OK, makes sense.

>>> diff --git a/arch/arm/include/asm/arch-tegra30/pinmux-config-common.h b/arch/arm/include/asm/arch-tegra30/pinmux-config-common.h
>>
>> The content of this file presumably describes Cardhu (which revision?)
>> Surely it should be in board/nvidia/cardhu/*.c?
> 
> On the previous review cycle (before I commonized Tegra files), this
> file lived in board/nvidia/cardhu, and I think it was Tom Rini (or
> maybe Simon) that pointed out that it had no 'cardhu' identifiers in
> it, so it should be moved to a more Tegra30-centric area, hence the
> move to arch-tegra30. Again, this is from our internal repo, and I
> don't believe there's any rev info in that file (except for
> commented-out tables that aren't used, so I removed them).  I think
> it's valid to say this file is common to all Tegra30 builds, and
> additional sparse pinmux tables could be added in board files/areas
> for board-specific / rev-specific mux changes.

Sorry, there's no way those tables aren't Cardhu-specific; they're
picking specific pinmux options for all/many of the pins, and there's no
reason in general to believe that every Tegra30 board will use the exact
same pinmux setup.

In practice, I know that e.g. Waluigi and Beaver use a very similar
pinmux, but I imagine there are some differences even there. So, chunks
of the table could be re-used, but certainly not the whole thing. I
think the best way forward here is to put this current file into the
Cardhu directory, and then implement pinmux-from-device-tree before
adding support for any other boards that need a different pinmux.

  reply	other threads:[~2012-10-03 22:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 22:45 [U-Boot] [PATCH 0/7] Add T30 Cardhu support Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 1/7] Tegra30: Add AVP (arm720t) files Tom Warren
2012-10-03 18:23   ` Stephen Warren
2012-10-03 20:15     ` Tom Warren
2012-10-04  1:11     ` Simon Glass
2012-10-04  0:57   ` Simon Glass
2012-10-02 22:45 ` [U-Boot] [PATCH 2/7] Tegra30: Add CPU (armv7) files Tom Warren
2012-10-03 18:26   ` Stephen Warren
2012-10-03 20:03     ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 3/7] Tegra30: Add common CPU (shared) files Tom Warren
2012-10-03 19:49   ` Stephen Warren
2012-10-03 20:27     ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 4/7] Tegra30: Add arch-tegra30 include files Tom Warren
2012-10-03 20:31   ` Stephen Warren
2012-10-03 21:48     ` Tom Warren
2012-10-03 22:32       ` Stephen Warren [this message]
2012-10-02 22:45 ` [U-Boot] [PATCH 5/7] Tegra30: Cardhu: Add DT files Tom Warren
2012-10-03  0:07   ` Lucas Stach
2012-10-03 16:05     ` Tom Warren
2012-10-03 20:36   ` Stephen Warren
2012-10-03 21:49     ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 6/7] Tegra30: Add generic Tegra30 build support Tom Warren
2012-10-03 20:38   ` Stephen Warren
2012-10-03 21:56     ` Tom Warren
2012-10-03 22:27       ` Stephen Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 7/7] Tegra30: Add/enable Cardhu build (T30 reference board) Tom Warren
2012-10-03 20:46   ` Stephen Warren
2012-10-03 21:05     ` Tom Warren
2012-10-03 16:46 ` [U-Boot] [PATCH 0/7] Add T30 Cardhu support 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=506CBCF3.1010302@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 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.