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 #else
31 #include <asm/arch/dram_sun4i.h>
32 #endif
33 
34 unsigned long sunxi_dram_init(void);
35 void mctl_await_completion(u32 *reg, u32 mask, u32 val);
36 bool mctl_mem_matches(u32 offset);
37 
38 #endif /* _SUNXI_DRAM_H */
39