From: James Wylder Date: Wed, 2 Mar 2011 18:39:50 +0000 (-0600) Subject: ARM: tegra: stingray: use generic memory vendor matching X-Git-Tag: firefly_0821_release~9834^2~66 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ae2833c5e5ce0e62a20aa5dea7e189f9aa7219c5;p=firefly-linux-kernel-4.4.55.git ARM: tegra: stingray: use generic memory vendor matching Initialize arrays to utilize new signature of tegra_init_emc. Memory types are matched internally and command line option is no longer needed. Change-Id: Icc7d44e4a82031638c78eeac3b172b713e0ca97b Signed-off-by: James Wylder --- diff --git a/arch/arm/mach-tegra/board-stingray-memory.c b/arch/arm/mach-tegra/board-stingray-memory.c index 2f6aea1fccfe..139a02f775ae 100644 --- a/arch/arm/mach-tegra/board-stingray-memory.c +++ b/arch/arm/mach-tegra/board-stingray-memory.c @@ -21,9 +21,6 @@ #include "board-stingray.h" #include "tegra2_emc.h" -static long stingray_mem_vid; -static long stingray_mem_pid; - static const struct tegra_emc_table stingray_emc_tables_samsung[] = { { .rate = 60000, /* SDRAM frquency */ @@ -438,30 +435,28 @@ static const struct tegra_emc_table stingray_emc_tables_elpida[] = { } }; -static int __init stingray_param_mem_vid(char *options) -{ - return strict_strtol(options, 0, &stingray_mem_vid); -} -__setup("mem_vid=", stingray_param_mem_vid); - -static int __init stingray_param_mem_pid(char *options) -{ - return strict_strtol(options, 0, &stingray_mem_pid); -} -__setup("mem_pid=", stingray_param_mem_pid); +struct tegra_emc_chip stingray_emc_chips[] = { + { + .description = "Samsung", + .mem_manufacturer_id = 0x0101, + .mem_revision_id1 = -1, + .mem_revision_id2 = -1, + .mem_pid = 0x5454, + .table = stingray_emc_tables_samsung, + .table_size = ARRAY_SIZE(stingray_emc_tables_samsung) + }, + { + .description = "Elpida 50nm", + .mem_manufacturer_id = 0x0303, + .mem_revision_id1 = -1, + .mem_revision_id2 = -1, + .mem_pid = 0x5454, + .table = stingray_emc_tables_elpida, + .table_size = ARRAY_SIZE(stingray_emc_tables_elpida) + } +}; void stingray_init_emc(void) { - if (stingray_mem_vid == 0x101 && stingray_mem_pid == 0x5454) { - pr_info("%s: Samsung memory found\n", __func__); - tegra_init_emc(stingray_emc_tables_samsung, - ARRAY_SIZE(stingray_emc_tables_samsung)); - } else if (stingray_mem_vid == 0x303 && stingray_mem_pid == 0x5454) { - pr_info("%s: Elpida memory found\n", __func__); - tegra_init_emc(stingray_emc_tables_elpida, - ARRAY_SIZE(stingray_emc_tables_elpida)); - } else { - pr_info("%s: Memory not recognized, memory scaling disabled\n", - __func__); - } + tegra_init_emc(stingray_emc_chips, ARRAY_SIZE(stingray_emc_chips)); }