summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2016-09-26 08:09:25 -0700
committerYork Sun <york.sun@nxp.com>2016-09-26 08:53:07 -0700
commit1fdcc8dfc7612acc765cd483051dcfaac399f4f1 (patch)
tree282484829ff5a8c8c79cab37da823e7fde9b7e63 /include
parentda28e58a7fc169625334b1e40f72067b481b352a (diff)
downloadu-boot-imx-1fdcc8dfc7612acc765cd483051dcfaac399f4f1.zip
u-boot-imx-1fdcc8dfc7612acc765cd483051dcfaac399f4f1.tar.gz
u-boot-imx-1fdcc8dfc7612acc765cd483051dcfaac399f4f1.tar.bz2
driver: ddr: fsl_mmdc: Pass board parameters through data structure
Instead of using multiple macros, a data structure is used to pass board-specific parameters to MMDC DDR driver. Signed-off-by: York Sun <york.sun@nxp.com> CC: Shengzhou Liu <Shengzhou.Liu@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/ls1012afrdm.h16
-rw-r--r--include/configs/ls1012aqds.h16
-rw-r--r--include/configs/ls1012ardb.h15
-rw-r--r--include/fsl_mmdc.h21
4 files changed, 17 insertions, 51 deletions
diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
index 136d648..612f243 100644
--- a/include/configs/ls1012afrdm.h
+++ b/include/configs/ls1012afrdm.h
@@ -20,22 +20,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
-/* DDR board-specific timing parameters */
-#define CONFIG_MMDC_MDCTL 0x04180000
-#define CONFIG_MMDC_MDPDC 0x00030035
-#define CONFIG_MMDC_MDOTC 0x12554000
-#define CONFIG_MMDC_MDCFG0 0xbabf7954
-#define CONFIG_MMDC_MDCFG1 0xdb328f64
-#define CONFIG_MMDC_MDCFG2 0x01ff00db
-#define CONFIG_MMDC_MDMISC 0x00001680
-#define CONFIG_MMDC_MDREF 0x0f3c8000
-#define CONFIG_MMDC_MDRWD 0x00002000
-#define CONFIG_MMDC_MDOR 0x00bf1023
-#define CONFIG_MMDC_MDASP 0x0000003f
-#define CONFIG_MMDC_MPODTCTRL 0x0000022a
-#define CONFIG_MMDC_MPZQHWCTRL 0xa1390003
-
-
/*
* USB
*/
diff --git a/include/configs/ls1012aqds.h b/include/configs/ls1012aqds.h
index b6d12dd..54abf30 100644
--- a/include/configs/ls1012aqds.h
+++ b/include/configs/ls1012aqds.h
@@ -19,22 +19,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
-/* DDR board-specific timing parameters */
-#define CONFIG_MMDC_MDCTL 0x05180000
-#define CONFIG_MMDC_MDPDC 0x00030035
-#define CONFIG_MMDC_MDOTC 0x12554000
-#define CONFIG_MMDC_MDCFG0 0xbabf7954
-#define CONFIG_MMDC_MDCFG1 0xdb328f64
-#define CONFIG_MMDC_MDCFG2 0x01ff00db
-#define CONFIG_MMDC_MDMISC 0x00001680
-#define CONFIG_MMDC_MDREF 0x0f3c8000
-#define CONFIG_MMDC_MDRWD 0x00002000
-#define CONFIG_MMDC_MDOR 0x00bf1023
-#define CONFIG_MMDC_MDASP 0x0000003f
-#define CONFIG_MMDC_MPODTCTRL 0x0000022a
-#define CONFIG_MMDC_MPZQHWCTRL 0xa1390003
-
-
/*
* QIXIS Definitions
*/
diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h
index 2076ce5..0c13dde 100644
--- a/include/configs/ls1012ardb.h
+++ b/include/configs/ls1012ardb.h
@@ -19,21 +19,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
-/* DDR board-specific timing parameters */
-#define CONFIG_MMDC_MDCTL 0x05180000
-#define CONFIG_MMDC_MDPDC 0x00030035
-#define CONFIG_MMDC_MDOTC 0x12554000
-#define CONFIG_MMDC_MDCFG0 0xbabf7954
-#define CONFIG_MMDC_MDCFG1 0xdb328f64
-#define CONFIG_MMDC_MDCFG2 0x01ff00db
-#define CONFIG_MMDC_MDMISC 0x00001680
-#define CONFIG_MMDC_MDREF 0x0f3c8000
-#define CONFIG_MMDC_MDRWD 0x00002000
-#define CONFIG_MMDC_MDOR 0x00bf1023
-#define CONFIG_MMDC_MDASP 0x0000003f
-#define CONFIG_MMDC_MPODTCTRL 0x0000022a
-#define CONFIG_MMDC_MPZQHWCTRL 0xa1390003
-
/*
* USB
*/
diff --git a/include/fsl_mmdc.h b/include/fsl_mmdc.h
index 1d09ff4..d5c4f8d 100644
--- a/include/fsl_mmdc.h
+++ b/include/fsl_mmdc.h
@@ -150,10 +150,23 @@ struct mmdc_regs {
u32 mpdccr;
};
-void mmdc_init(void);
+struct fsl_mmdc_info {
+ u32 mdctl;
+ u32 mdpdc;
+ u32 mdotc;
+ u32 mdcfg0;
+ u32 mdcfg1;
+ u32 mdcfg2;
+ u32 mdmisc;
+ u32 mdref;
+ u32 mdrwd;
+ u32 mdor;
+ u32 mdasp;
+ u32 mpodtctrl;
+ u32 mpzqhwctrl;
+ u32 mprddlctl;
+};
-#if !defined(CONFIG_MMDC_MDCTL)
-#error Must configure board-specific timing CONFIG_MMDC_* in <board>.h for MMDC
-#endif
+void mmdc_init(const struct fsl_mmdc_info *);
#endif /* FSL_MMDC_H */