From 1fdcc8dfc7612acc765cd483051dcfaac399f4f1 Mon Sep 17 00:00:00 2001 From: York Sun Date: Mon, 26 Sep 2016 08:09:25 -0700 Subject: 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 CC: Shengzhou Liu Reviewed-by: Tom Rini --- include/fsl_mmdc.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'include/fsl_mmdc.h') diff --git a/include/fsl_mmdc.h b/include/fsl_mmdc.h index 1d09ff4cb1..d5c4f8d59a 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 .h for MMDC -#endif +void mmdc_init(const struct fsl_mmdc_info *); #endif /* FSL_MMDC_H */ -- cgit