diff options
author | James Wylder <james.wylder@motorola.com> | 2011-03-01 09:25:06 -0600 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:37:01 -0800 |
commit | 7ee88889b91757b950fad97414dbe219df858209 (patch) | |
tree | c64a49bfc79dd6d52a1556cff15d62ff8c550f79 /arch/arm/mach-tegra/tegra2_emc.h | |
parent | 7bbc0de22b33875e13aedbf6124d6c97564657a2 (diff) |
ARM: tegra: add generic memory vendor matching
Update tegra_init_emc to provide generic memory
vendor matching. Read values from EMC_MRR_0, to
uniquely identify memory types and compare them
to table of memory passed in.
Change-Id: Ie116fa6f497076149c87ff6c0ae0621309bac65f
Signed-off-by: James Wylder <james.wylder@motorola.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra2_emc.h')
-rw-r--r-- | arch/arm/mach-tegra/tegra2_emc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra2_emc.h b/arch/arm/mach-tegra/tegra2_emc.h index 19f08cb31603..871387fdeea3 100644 --- a/arch/arm/mach-tegra/tegra2_emc.h +++ b/arch/arm/mach-tegra/tegra2_emc.h @@ -22,6 +22,17 @@ struct tegra_emc_table { u32 regs[TEGRA_EMC_NUM_REGS]; }; +struct tegra_emc_chip { + const char *description; + int mem_manufacturer_id; /* LPDDR2 MR5 or -1 to ignore */ + int mem_revision_id1; /* LPDDR2 MR6 or -1 to ignore */ + int mem_revision_id2; /* LPDDR2 MR7 or -1 to ignore */ + int mem_pid; /* LPDDR2 MR8 or -1 to ignore */ + + const struct tegra_emc_table *table; + int table_size; +}; + int tegra_emc_set_rate(unsigned long rate); long tegra_emc_round_rate(unsigned long rate); -void tegra_init_emc(const struct tegra_emc_table *table, int table_size); +void tegra_init_emc(const struct tegra_emc_chip *chips, int chips_size); |