1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2007-2012
4  * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
5  * Berg Xing <bergxing@allwinnertech.com>
6  * Tom Cubie <tangliang@allwinnertech.com>
7  *
8  * Sunxi platform dram register definition.
9  */
10 
11 #ifndef _SUNXI_DRAM_H
12 #define _SUNXI_DRAM_H
13 
14 #include <asm/io.h>
15 #include <linux/types.h>
16 
17 /* dram regs definition */
18 #if defined(CONFIG_MACH_SUN6I)
19 #include <asm/arch/dram_sun6i.h>
20 #elif defined(CONFIG_MACH_SUN8I_A23)
21 #include <asm/arch/dram_sun8i_a23.h>
22 #elif defined(CONFIG_MACH_SUN8I_A33)
23 #include <asm/arch/dram_sun8i_a33.h>
24 #elif defined(CONFIG_MACH_SUN8I_A83T)
25 #include <asm/arch/dram_sun8i_a83t.h>
26 #elif defined(CONFIG_SUNXI_DRAM_DW)
27 #include <asm/arch/dram_sunxi_dw.h>
28 #elif defined(CONFIG_MACH_SUN9I)
29 #include <asm/arch/dram_sun9i.h>
30 #elif defined(CONFIG_MACH_SUN50I_H6)
31 #include <asm/arch/dram_sun50i_h6.h>
32 #else
33 #include <asm/arch/dram_sun4i.h>
34 #endif
35 
36 unsigned long sunxi_dram_init(void);
37 void mctl_await_completion(u32 *reg, u32 mask, u32 val);
38 bool mctl_mem_matches(u32 offset);
39 
40 #endif /* _SUNXI_DRAM_H */
41