xref: /openbmc/u-boot/arch/arm/include/asm/arch-sunxi/dram.h (revision 81f50d93cbd980ce94452177a5c5d2e4b0b57fb9)
1286c3c3aSIan Campbell /*
2286c3c3aSIan Campbell  * (C) Copyright 2007-2012
3286c3c3aSIan Campbell  * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
4286c3c3aSIan Campbell  * Berg Xing <bergxing@allwinnertech.com>
5286c3c3aSIan Campbell  * Tom Cubie <tangliang@allwinnertech.com>
6286c3c3aSIan Campbell  *
7286c3c3aSIan Campbell  * Sunxi platform dram register definition.
8286c3c3aSIan Campbell  *
9286c3c3aSIan Campbell  * SPDX-License-Identifier:	GPL-2.0+
10286c3c3aSIan Campbell  */
11286c3c3aSIan Campbell 
12286c3c3aSIan Campbell #ifndef _SUNXI_DRAM_H
13286c3c3aSIan Campbell #define _SUNXI_DRAM_H
14286c3c3aSIan Campbell 
1507f4fe7dSHans de Goede #include <asm/io.h>
16286c3c3aSIan Campbell #include <linux/types.h>
17286c3c3aSIan Campbell 
18bec72c79SHans de Goede /* dram regs definition */
199a07eb0bSHans de Goede #if defined(CONFIG_MACH_SUN6I)
209a07eb0bSHans de Goede #include <asm/arch/dram_sun6i.h>
215e6bacdbSHans de Goede #elif defined(CONFIG_MACH_SUN8I_A23)
225e6bacdbSHans de Goede #include <asm/arch/dram_sun8i_a23.h>
23ffc0ae0cSVishnu Patekar #elif defined(CONFIG_MACH_SUN8I_A33)
24ffc0ae0cSVishnu Patekar #include <asm/arch/dram_sun8i_a33.h>
25*81f50d93Svishnupatekar #elif defined(CONFIG_MACH_SUN8I_A83T)
26*81f50d93Svishnupatekar #include <asm/arch/dram_sun8i_a83t.h>
270404d53fSJens Kuske #elif defined(CONFIG_MACH_SUN8I_H3)
280404d53fSJens Kuske #include <asm/arch/dram_sun8i_h3.h>
299a07eb0bSHans de Goede #else
30bec72c79SHans de Goede #include <asm/arch/dram_sun4i.h>
319a07eb0bSHans de Goede #endif
32286c3c3aSIan Campbell 
33286c3c3aSIan Campbell unsigned long sunxi_dram_init(void);
3451637afeSHans de Goede void mctl_await_completion(u32 *reg, u32 mask, u32 val);
3551637afeSHans de Goede bool mctl_mem_matches(u32 offset);
365665f50eSHans de Goede 
37286c3c3aSIan Campbell #endif /* _SUNXI_DRAM_H */
38