summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2020-11-05 15:10:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-09 08:44:55 +0100
commit61682b59363fca0fbf51d37ece46ec6d47ea35d4 (patch)
treea6c7caa2bee20a60072e50a6bd99e7ca743b393c /include
parent33f25eb1908b8b3e3c56a0bb2a24376a2735833a (diff)
downloadbarebox-61682b59363fca0fbf51d37ece46ec6d47ea35d4.tar.gz
barebox-61682b59363fca0fbf51d37ece46ec6d47ea35d4.tar.xz
ddr: imx8m: clean up entry points
The DDRC address in the memory map and the TF-A parameter store address is the same for all i.MX8M* SoCs. The only difference (for now) is in the power up sequence. Add a enum for the DDRC type, so we can take different code paths in imx8m_ddr_init() depending on the SoC. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/soc/imx8m/ddr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/soc/imx8m/ddr.h b/include/soc/imx8m/ddr.h
index 5b2747ed1f..1408ffcfb5 100644
--- a/include/soc/imx8m/ddr.h
+++ b/include/soc/imx8m/ddr.h
@@ -363,8 +363,15 @@ struct dram_timing_info {
extern struct dram_timing_info dram_timing;
+enum ddrc_type {
+ DDRC_TYPE_MM,
+ DDRC_TYPE_MQ,
+ DDRC_TYPE_MP,
+};
+
int imx8mm_ddr_init(struct dram_timing_info *timing_info);
int imx8mq_ddr_init(struct dram_timing_info *timing_info);
+int imx8mp_ddr_init(struct dram_timing_info *timing_info);
int ddr_cfg_phy(struct dram_timing_info *timing_info);
void load_lpddr4_phy_pie(void);
void ddrphy_trained_csr_save(struct dram_cfg_param *param, unsigned int num);