From 97772e876318d92e34fdfc118958503e27199160 Mon Sep 17 00:00:00 2001 From: Prashant Gaikwad Date: Fri, 18 Nov 2011 15:53:49 +0530 Subject: 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 Reviewed-on: http://git-master/r/67892 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani --- arch/arm/mach-tegra/board-whistler-memory.c | 37 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'arch') 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; } -- cgit v1.2.3