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 v2 2/2] Tegra: MMC: Add DT support to MMC driver for all T20 boards
Date: Wed, 13 Feb 2013 13:09:37 -0700	[thread overview]
Message-ID: <511BF301.3000900@wwwdotorg.org> (raw)
In-Reply-To: <CA+m5__KwzWR8FbO0DCcrLRJnP3JKAuNG2L9vk1Hst1fHe__rhA@mail.gmail.com>

On 02/13/2013 01:06 PM, Tom Warren wrote:
> Stephen,
> 
> On Wed, Feb 13, 2013 at 1:02 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 02/13/2013 12:59 PM, Tom Warren wrote:
>>> Stephen,
>>>
>>> On Tue, Feb 12, 2013 at 2:06 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>> On 02/12/2013 01:57 PM, Tom Warren wrote:
>>>>> Stephen,
>>>>>
>>>>> On Tue, Feb 12, 2013 at 1:38 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>>>> On 02/11/2013 10:17 AM, Tom Warren wrote:
>>>>>>> tegra_mmc_init() now parses the DT info for bus width, WP/CD GPIOs, etc.
>>>>>>> Tested on Seaboard, fully functional.
>>>>>>>
>>>>>>> Tamonten boards (medcom-wide, plutux, and tec) use a different/new
>>>>>>> dtsi file w/common settings.
>>>>
>>>>>>> diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h
>>>>>>> diff --git a/include/configs/plutux.h b/include/configs/plutux.h
>>>>>>> diff --git a/include/configs/tec.h b/include/configs/tec.h
>>>>>>
>>>>>> In all 3 of those files ...
>>>>>>
>>>>>>>  #define CONFIG_DEFAULT_DEVICE_TREE   tegra20-medcom-wide
>>>>>>
>>>>>> Why not change that define ...
>>>>>>
>>>>>>>  #define CONFIG_OF_CONTROL
>>>>>>>  #define CONFIG_OF_SEPARATE
>>>>>>> +#undef CONFIG_ARCH_DEVICE_TREE
>>>>>>> +#define CONFIG_ARCH_DEVICE_TREE              tegra20-tamonten
>>>>>>
>>>>>> rather than adding that one? All the other Tegra boards only set
>>>>>> CONFIG_DEFAULT_DEVICE_TREE.
>>>>>
>>>>> CONFIG_DEFAULT_DEVICE_TREE is the .dts file (board/nvidia/dts).
>>>>> CONFIG_ARCH_DEVICE_TREE is the .dtsi file (arch/arm/dts). See
>>>>> Thierry's explanation, also.
>>>>
>>>> So why set CONFIG_ARCH_DEVICE_TREE to tegra20-tamonten here; if that
>>>> variable is supposed to point at the SoC .dtsi file, that value is
>>>> wrong; it *should* be tegra20.dtsi.
>>>>
>>>> Oh yuck. I see what's going on now. e.g. tegra20-medcom-wide.dts is
>>>> including ARCH_CPU_DTS. It should be including tegra20-tamonten.dtsi,
>>>> which then includes ARCH_CPU_DTS. The ARCH_CPU_DTS variable is supposed
>>>> to only ever point at the SoC .dtsi file, not any "intermediate" .dtsi
>>>> file... You probably need to put tegra20-tamonten.dtsi into
>>>> board/avionic-design/dts rather than arch/arm/dts to make that work.
>>>
>>> OK, I've removed the overrides for CONFIG_ARCH_DEVICE_TREE in the AD
>>> config files, and added 'tegra20-tamonten.dtsi' to the include line in
>>> the AD .dts files.
>>
>> Great.
>>
>>> I have to add an include path to the DTC command
>>> line in dts/Makefile so it can find tegra20-tamonten.dtsi in
>>> arch/$(ARCH)/dts, but it all builds fine.
>>
>> If you move tegra20-tamonten.dtsi to boards/avionic-design/dts, do you
>> still need an include path? Since that file is board-/vendor-specific,
>> it really shouldn't be in arch/arm/dts if that directory typically only
>> contains SoC .dtsi files.
>
> I tried both places, and had to add the include path to get it to build.
> 
> I'll try it from board/avionic-design/dts with a new include path.

Hmmm. Odd.

Since IIRC U-Boot is already running the .dts files through the C
pre-processor, you could try:

#include "tegra20-tamonten.dtsi"

rather than:

/include/ "tegra20-tamonten.dtsi";

The kernel is likely moving to this scheme, so U-Boot might want to
follow this, even pre-emptively, in order to re-use DT files sometime
anyway.

      reply	other threads:[~2013-02-13 20:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 17:17 [U-Boot] [PATCH v2 0/2] Tegra: MMC: Add DT support for MMC to T20 boards Tom Warren
2013-02-11 17:17 ` [U-Boot] [PATCH v2 1/2] Tegra: fdt: Add/enhance sdhci (mmc) nodes for all T20 DT files Tom Warren
2013-02-11 17:28   ` Lucas Stach
2013-02-11 17:56     ` Tom Warren
2013-02-11 18:55       ` Lucas Stach
2013-02-11 19:11       ` Thierry Reding
2013-02-11 19:21         ` Tom Warren
2013-02-12  6:51           ` Thierry Reding
2013-02-12 10:41             ` Thierry Reding
2013-02-12 10:53               ` Thierry Reding
2013-02-12 17:36                 ` Tom Warren
2013-02-12 20:19               ` Stephen Warren
2013-02-12 20:47                 ` Thierry Reding
2013-02-12 20:17           ` Stephen Warren
2013-02-12 20:29   ` Stephen Warren
2013-02-12 20:52     ` Tom Warren
2013-02-11 17:17 ` [U-Boot] [PATCH v2 2/2] Tegra: MMC: Add DT support to MMC driver for all T20 boards Tom Warren
2013-02-11 17:33   ` Lucas Stach
2013-02-11 17:59     ` Tom Warren
2013-02-12 19:24       ` Tom Warren
2013-02-12 19:41         ` Lucas Stach
2013-02-12 19:50           ` Tom Warren
2013-02-12 20:38   ` Stephen Warren
2013-02-12 20:57     ` Tom Warren
2013-02-12 21:06       ` Stephen Warren
2013-02-13 19:59         ` Tom Warren
2013-02-13 20:02           ` Stephen Warren
2013-02-13 20:06             ` Tom Warren
2013-02-13 20:09               ` Stephen Warren [this message]

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=511BF301.3000900@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