summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2011-11-18 15:53:49 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-01-06 17:08:09 +0530
commit97772e876318d92e34fdfc118958503e27199160 (patch)
tree4925ead22a7ea417bba3f240b209a0e4b7b3c2c3 /arch
parent09bcac7bdc4b53344faf95565a93020fd028b178 (diff)
ARM: tegra: whistler: use SKU to initialize EMC
EMC chip id is same for different whistler boards. Use SKU to initialize EMC. Change-Id: I133711e9cfdf5beb8d26e076069c096ccd98af5c Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/67892 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-whistler-memory.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-memory.c b/arch/arm/mach-tegra/board-whistler-memory.c
index d4253117755f..e54be7d97f7a 100644
--- a/arch/arm/mach-tegra/board-whistler-memory.c
+++ b/arch/arm/mach-tegra/board-whistler-memory.c
@@ -22,6 +22,7 @@
#include "board-whistler.h"
#include "tegra2_emc.h"
#include "board.h"
+#include "fuse.h"
static const struct tegra_emc_table whistler_emc_tables_elpida_300Mhz[] = {
{
@@ -594,36 +595,38 @@ static const struct tegra_emc_chip whistler_emc_chips[] = {
{
.description = "Elpida 300MHz",
.mem_manufacturer_id = 0x0303,
- .mem_revision_id1 = 0,
- .mem_revision_id2 = 0,
- .mem_pid = 0x1414,
- .table = whistler_emc_tables_elpida_300Mhz,
- .table_size = ARRAY_SIZE(whistler_emc_tables_elpida_300Mhz)
- },
- {
- .description = "Elpida 300MHz",
- .mem_manufacturer_id = 0x0303,
- .mem_revision_id1 = 0,
- .mem_revision_id2 = 0,
- .mem_pid = 0x5454,
+ .mem_revision_id1 = -1,
+ .mem_revision_id2 = -1,
+ .mem_pid = -1,
.table = whistler_emc_tables_elpida_300Mhz,
.table_size = ARRAY_SIZE(whistler_emc_tables_elpida_300Mhz)
},
+};
+
+static const struct tegra_emc_chip whistler_ap25_emc_chips[] = {
{
.description = "Elpida 380MHz",
.mem_manufacturer_id = 0x0303,
- .mem_revision_id1 = 0x0101,
- .mem_revision_id2 = 0,
- .mem_pid = 0x5454,
+ .mem_revision_id1 = -1,
+ .mem_revision_id2 = -1,
+ .mem_pid = -1,
.table = whistler_emc_tables_elpida_380Mhz,
.table_size = ARRAY_SIZE(whistler_emc_tables_elpida_380Mhz)
},
};
+#define TEGRA25_SKU 0x17
+
int __init whistler_emc_init(void)
{
- tegra_init_emc(whistler_emc_chips,
- ARRAY_SIZE(whistler_emc_chips));
+ int sku_id = tegra_sku_id();
+
+ if (sku_id == TEGRA25_SKU)
+ tegra_init_emc(whistler_ap25_emc_chips,
+ ARRAY_SIZE(whistler_ap25_emc_chips));
+ else
+ tegra_init_emc(whistler_emc_chips,
+ ARRAY_SIZE(whistler_emc_chips));
return 0;
}