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 v4 19/23] tegra: Add EMC settings for Seaboard
Date: Mon, 09 Apr 2012 21:51:32 -0600	[thread overview]
Message-ID: <4F83AE44.3040105@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ2N7KOLwWN1i04KMsm2uavUo4u4k+gWde0vRLO75TEycA@mail.gmail.com>

On 04/09/2012 05:07 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On Mon, Apr 9, 2012 at 3:03 PM, Olof Johansson <olof@lixom.net> wrote:
>> On Mon, Apr 9, 2012 at 2:59 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 04/09/2012 03:40 PM, Simon Glass wrote:
>>>> +Olof
>>>>
>>>> Hi Stephen,
>>>>
>>>> On Mon, Apr 9, 2012 at 2:27 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>>> On 04/05/2012 03:55 PM, Simon Glass wrote:
>>>>>> From: Jimmy Zhang <jimmzhang@nvidia.com>
>>>>>>
>>>>>> Set Seaboard to optimal memory settings based on the SOC in use (T20 or T25).
>>>>>>
>>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>>>> ---
>>>>>> Changes in v2:
>>>>>> - Move EMC tables to device tree
>>>>>> - Removed check for nominal voltage (not needed as it is done just before)
>>>>>>
>>>>>> Changes in v3:
>>>>>> - Add better error reporting when EMC setup fails
>>>>>>
>>>>>> Changes in v4:
>>>>>> - Remove support for T20 memory timings
>>>>>
>>>>>> diff --git a/board/nvidia/common/emc.c b/board/nvidia/common/emc.c
>>>>>
>>>>>> +/* This rate is hard-coded for now, until fdt provides them */
>>>>>> +#define EMC_SDRAM_RATE_T25   (380000 * 2 * 1000)
>>>>>> +
>>>>>> +int board_emc_init(void)
>>>>>> +{
>>>>>> +     unsigned rate;
>>>>>> +
>>>>>> +     switch (tegra_get_chip_type()) {
>>>>>> +     default:
>>>>>> +     case TEGRA_SOC_T20:
>>>>>> +             debug("%s: EMC timings not supported for T20 Seaboard\n",
>>>>>> +                   __func__);
>>>>>
>>>>> This isn't Seaboard-specific code, so the string shouldn't say
>>>>> "Seaboard" there.
>>>>>
>>>>> Why not support Tegra20? Many/all of the other Tegra boards U-Boot
>>>>> supports are Tegra20 not Tegra25.
>>>>>
>>>>> Presumably this code doesn't blow up if the EMC tables aren't in the
>>>>> .dts file; the code should use the tables if they're present, otherwise
>>>>> be a no-op.
>>>>
>>>> I don't mind, we can either go with v3 (with T20) or v4 (without).
>>>> Both sets of patches are on the list and the removable of T20 support
>>>> is the only change in v4. Please can you discuss this with Olof?
>>>
>>> IIRC, Olof objected to the incorrect Seaboard .dts file (which contained
>>> two unrelated sets of EMC tables for different board variants), not the
>>> ability for the EMC driver itself to function on either Tegra20 or Tegra25.
>>
>> Correct. I objected to the one device tree describing 50% inaccurate
>> contents without a documented way to tell the accurate from inaccurate
>> (unlike the case with bootid straps).
>>
>> What we do on the kernel side is that if the existing programming,
>> i.e. what's setup by BCT/u-boot is not matching the clocks in the
>> table, then we report it but continue with the existing settings. If
>> someone passes in bogus (matching) data in both BCT and the device
>> tree then all bets are off.
> 
> OK, that's different from what I understood (remove support for T20
> Seaboard as was apparently done in the kernel). So I think this means
> that this patch should revert back to the original version, right?

In the kernel, the Seaboard .dts file only supports Tegra25 since the
EMC tables we put into that .dts file are for Tegra25. There is no
Seaboard-with-Tegra20 .dts file.

I don't believe the EMC driver has any code that cares about
Tegra20-vs-Tegra25, so should work just fine for either.

In practice, we don't have any .dts files for boards with Tegra20 that
contain EMC tables though.

  reply	other threads:[~2012-04-10  3:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 21:54 [U-Boot] [PATCH v4 05/23] Add AES crypto library Simon Glass
2012-04-05 21:55 ` [U-Boot] [PATCH v4 19/23] tegra: Add EMC settings for Seaboard Simon Glass
2012-04-09 21:27   ` Stephen Warren
2012-04-09 21:40     ` Simon Glass
2012-04-09 21:59       ` Stephen Warren
2012-04-09 22:03         ` Olof Johansson
2012-04-09 23:07           ` Simon Glass
2012-04-10  3:51             ` Stephen Warren [this message]
2012-04-10  7:56               ` Marc Dietrich
2012-04-10 15:09                 ` Simon Glass
2012-04-05 21:55 ` [U-Boot] [PATCH v4 22/23] tegra: fdt: Add EMC data for Tegra2 Seaboard Simon Glass
2012-04-09 21:30   ` Stephen Warren
2012-04-09 21:53     ` Simon Glass

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=4F83AE44.3040105@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