public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/14] tegra: Add EMC settings for Seaboard, Harmony
Date: Tue, 10 Jan 2012 11:46:54 -0700	[thread overview]
Message-ID: <4F0C879E.1040504@nvidia.com> (raw)
In-Reply-To: <1324927987-13100-14-git-send-email-sjg@chromium.org>

On 12/26/2011 12:33 PM, Simon Glass wrote:
> From: Jimmy Zhang <jimmzhang@nvidia.com>
> 
> Set Seaboard and Harmony to optimal memory settings based on the SOC
> in use (T20 or T25).
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

> diff --git a/board/nvidia/common/emc.c b/board/nvidia/common/emc.c
...
> +static const struct tegra_emc_table seaboard_emc_tables_hynix_333Mhz[] = {
...
> +static const struct tegra_emc_table seaboard_emc_tables_hynix_380Mhz[] = {
...
> +void seaboard_emc_init(void)
...
> +static struct emc_init board_table[] = {
> +       {
> +               .id     = MACH_TYPE_HARMONY,
> +               .init   = NULL,
> +       },
> +       {
> +               .id     = MACH_TYPE_SEABOARD,
> +               .init   = seaboard_emc_init,
> +       },
> +};

Why not just put the Seaboard-specific code into Seaboard's board
directory instead of a common location? Then you wouldn't need this
table at all, and boards other than Seaboard wouldn't be required to
carry the Seaboard EMC tables.

There don't appear to be any tables for Harmony, which is inconsistent
with the commit description.

> +int board_emc_init(void)
> +{
> +       int     i;
> +       DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifdef CONFIG_TEGRA_PMU
> +       /* if voltage has not been set properly, return */
> +       if (!pmu_is_voltage_nominal())
> +               return -1;
> +#endif

Why/when would the PMU voltage not be nominal?

Can't we error out the compile if the options that cause the PMU voltage
to be initialized to nominal are not set, instead of detecting this at
runtime?

Finally, I don't think there are EMC tables here for all the EMC
frequencies that we have BCTs for. Perhaps that's not an issue, and
perhaps I should ignore the other BCTs (e.g. 400MHZ EMC) since nobody
actually uses them?

-- 
nvpublic

  reply	other threads:[~2012-01-10 18:46 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 19:32 [U-Boot] [PATCH 0/14] tegra: warmboot (suspend / resume) support Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 01/14] Add AES crypto library Simon Glass
2012-01-08  5:49   ` Mike Frysinger
2012-01-08  8:57     ` Marek Vasut
2012-01-08  9:09       ` Mike Frysinger
2012-01-08 10:40         ` Marek Vasut
2012-01-08 16:35           ` Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 02/14] tegra: Move ap20.h header into arch location Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 03/14] tegra: Add crypto library for warmboot code Simon Glass
2012-01-08  5:51   ` Mike Frysinger
2012-01-08 16:42     ` Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 04/14] tegra: Add flow, gp_padctl, fuse, sdram headers Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 05/14] tegra: Add tegra_get_chip_type() to detect SKU Simon Glass
2012-01-09 23:24   ` Stephen Warren
2012-01-12 19:35     ` Simon Glass
2012-01-12 19:48       ` Stephen Warren
2012-01-13 21:06         ` Simon Glass
2011-12-26 19:32 ` [U-Boot] [PATCH 06/14] tegra: Add EMC support for optimal memory timings Simon Glass
2012-01-09 23:38   ` Stephen Warren
2012-01-12 20:43     ` Simon Glass
2012-01-13 17:47       ` Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 07/14] tegra: Add PMU to manage power supplies Simon Glass
2012-01-10 17:56   ` Stephen Warren
2012-01-12 23:17     ` Simon Glass
2012-01-12 23:43       ` Stephen Warren
2012-01-12 23:55         ` Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 08/14] tegra: Set up PMU for Nvidia boards Simon Glass
2012-01-10 18:02   ` Stephen Warren
2012-01-12 23:42     ` Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 09/14] tegra: Add warmboot implementation Simon Glass
2012-01-10 18:30   ` Stephen Warren
2012-01-13 19:34     ` Simon Glass
2012-01-13 22:04       ` Yen Lin
2012-01-13 23:05         ` Simon Glass
2012-01-13 23:08           ` Stephen Warren
2012-01-14  0:04             ` Yen Lin
2011-12-26 19:33 ` [U-Boot] [PATCH 10/14] tegra: Setup PMC scratch info from ap20 setup Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 11/14] tegra: Set up warmboot code on Nvidia boards Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 12/14] tegra: Set vdd_core and vdd_cpu to high Simon Glass
2012-01-10 18:40   ` Stephen Warren
2012-01-13 17:55     ` Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 13/14] tegra: Add EMC settings for Seaboard, Harmony Simon Glass
2012-01-10 18:46   ` Stephen Warren [this message]
2012-01-12 23:05     ` Simon Glass
2012-01-12 23:42       ` Stephen Warren
2012-01-12 23:54         ` Simon Glass
2012-01-13  0:01           ` Stephen Warren
2012-01-13  0:05             ` Simon Glass
2012-01-13  0:10               ` Stephen Warren
2012-01-13  0:18                 ` Simon Glass
2011-12-26 19:33 ` [U-Boot] [PATCH 14/14] tegra: Enable LP0 on Seaboard 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=4F0C879E.1040504@nvidia.com \
    --to=swarren@nvidia.com \
    --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