xref: /openbmc/u-boot/arch/arm/include/asm/arch-sunxi/dram.h (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2286c3c3aSIan Campbell /*
3286c3c3aSIan Campbell  * (C) Copyright 2007-2012
4286c3c3aSIan Campbell  * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
5286c3c3aSIan Campbell  * Berg Xing <bergxing@allwinnertech.com>
6286c3c3aSIan Campbell  * Tom Cubie <tangliang@allwinnertech.com>
7286c3c3aSIan Campbell  *
8286c3c3aSIan Campbell  * Sunxi platform dram register definition.
9286c3c3aSIan Campbell  */
10286c3c3aSIan Campbell 
11286c3c3aSIan Campbell #ifndef _SUNXI_DRAM_H
12286c3c3aSIan Campbell #define _SUNXI_DRAM_H
13286c3c3aSIan Campbell 
1407f4fe7dSHans de Goede #include <asm/io.h>
15286c3c3aSIan Campbell #include <linux/types.h>
16286c3c3aSIan Campbell 
17bec72c79SHans de Goede /* dram regs definition */
189a07eb0bSHans de Goede #if defined(CONFIG_MACH_SUN6I)
199a07eb0bSHans de Goede #include <asm/arch/dram_sun6i.h>
205e6bacdbSHans de Goede #elif defined(CONFIG_MACH_SUN8I_A23)
215e6bacdbSHans de Goede #include <asm/arch/dram_sun8i_a23.h>
22ffc0ae0cSVishnu Patekar #elif defined(CONFIG_MACH_SUN8I_A33)
23ffc0ae0cSVishnu Patekar #include <asm/arch/dram_sun8i_a33.h>
2481f50d93Svishnupatekar #elif defined(CONFIG_MACH_SUN8I_A83T)
2581f50d93Svishnupatekar #include <asm/arch/dram_sun8i_a83t.h>
269934aba4SIcenowy Zheng #elif defined(CONFIG_SUNXI_DRAM_DW)
279934aba4SIcenowy Zheng #include <asm/arch/dram_sunxi_dw.h>
28297bb9e0SPhilipp Tomsich #elif defined(CONFIG_MACH_SUN9I)
29297bb9e0SPhilipp Tomsich #include <asm/arch/dram_sun9i.h>
309a07eb0bSHans de Goede #else
31bec72c79SHans de Goede #include <asm/arch/dram_sun4i.h>
329a07eb0bSHans de Goede #endif
33286c3c3aSIan Campbell 
34286c3c3aSIan Campbell unsigned long sunxi_dram_init(void);
3551637afeSHans de Goede void mctl_await_completion(u32 *reg, u32 mask, u32 val);
3651637afeSHans de Goede bool mctl_mem_matches(u32 offset);
375665f50eSHans de Goede 
38286c3c3aSIan Campbell #endif /* _SUNXI_DRAM_H */
39