From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 09 Apr 2012 15:27:50 -0600 Subject: [U-Boot] [PATCH v4 19/23] tegra: Add EMC settings for Seaboard In-Reply-To: <1333662916-17958-20-git-send-email-sjg@chromium.org> References: <1333662916-17958-6-git-send-email-sjg@chromium.org> <1333662916-17958-20-git-send-email-sjg@chromium.org> Message-ID: <4F835456.2040901@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/05/2012 03:55 PM, Simon Glass wrote: > From: Jimmy Zhang > > Set Seaboard to optimal memory settings based on the SOC in use (T20 or T25). > > Signed-off-by: Simon Glass > --- > 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. > + return -1; > + case TEGRA_SOC_T25: > + rate = EMC_SDRAM_RATE_T25; > + break; > + } > + return tegra_set_emc(gd->fdt_blob, rate); > +}