aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2015-03-12 10:48:02 -0400
committerThierry Reding <treding@nvidia.com>2015-05-05 05:10:19 -0400
commit3d9dd6fdd23695a038633f1a87aee0708fe4b8e0 (patch)
treeba3f42569584f9eae8377be535acf160cd070fb0 /include/soc
parent6b22194d5e34f45b71628b7fd0a61e63df9e7dd7 (diff)
memory: tegra: Add API needed by the EMC driver
The EMC driver needs to know the number of external memory devices and also needs to update the EMEM configuration based on the new rate of the memory bus. To know how to update the EMEM config, looks up the values of the burst regs in the DT, for a given timing. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/tegra/mc.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h
index 63deb8d9f82a..90b558e2f3cd 100644
--- a/include/soc/tegra/mc.h
+++ b/include/soc/tegra/mc.h
@@ -20,6 +20,12 @@ struct tegra_smmu_enable {
20 unsigned int bit; 20 unsigned int bit;
21}; 21};
22 22
23struct tegra_mc_timing {
24 unsigned long rate;
25
26 u32 *emem_data;
27};
28
23/* latency allowance */ 29/* latency allowance */
24struct tegra_mc_la { 30struct tegra_mc_la {
25 unsigned int reg; 31 unsigned int reg;
@@ -84,7 +90,7 @@ struct tegra_mc_soc {
84 const struct tegra_mc_client *clients; 90 const struct tegra_mc_client *clients;
85 unsigned int num_clients; 91 unsigned int num_clients;
86 92
87 const unsigned int *emem_regs; 93 const unsigned long *emem_regs;
88 unsigned int num_emem_regs; 94 unsigned int num_emem_regs;
89 95
90 unsigned int num_address_bits; 96 unsigned int num_address_bits;
@@ -102,6 +108,12 @@ struct tegra_mc {
102 108
103 const struct tegra_mc_soc *soc; 109 const struct tegra_mc_soc *soc;
104 unsigned long tick; 110 unsigned long tick;
111
112 struct tegra_mc_timing *timings;
113 unsigned int num_timings;
105}; 114};
106 115
116void tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate);
117unsigned int tegra_mc_get_emem_device_count(struct tegra_mc *mc);
118
107#endif /* __SOC_TEGRA_MC_H__ */ 119#endif /* __SOC_TEGRA_MC_H__ */