[U-Boot] [PATCH v2 2/2] Tegra: MMC: Add DT support to MMC driver for all T20 boards

Tom Warren
2013-02-13T20:06:57Z

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.

Tom