1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2011 The Chromium OS Authors.
9 #include <asm/arch/clock.h>
10 #include <asm/arch/emc.h>
11 #include <asm/arch/tegra.h>
12 #include <asm/arch-tegra/ap.h>
13 #include <asm/arch-tegra/clk_rst.h>
14 #include <asm/arch-tegra/pmu.h>
15 #include <asm/arch-tegra/sys_proto.h>
17 DECLARE_GLOBAL_DATA_PTR;
19 /* These rates are hard-coded for now, until fdt provides them */
20 #define EMC_SDRAM_RATE_T20 (333000 * 2 * 1000)
21 #define EMC_SDRAM_RATE_T25 (380000 * 2 * 1000)
23 int board_emc_init(void)
27 switch (tegra_get_chip_sku()) {
30 rate = EMC_SDRAM_RATE_T20;
33 rate = EMC_SDRAM_RATE_T25;
36 return tegra_set_emc(gd->fdt_blob, rate);