xref: /openbmc/u-boot/arch/arm/include/asm/arch-sunxi/dram.h (revision 51637afe98ba1745976382f64afc270f7f0b6974)
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>
2108fd1479SHans de Goede #elif defined(CONFIG_MACH_SUN8I)
2208fd1479SHans de Goede #include <asm/arch/dram_sun8i.h>
239a07eb0bSHans de Goede #else
24bec72c79SHans de Goede #include <asm/arch/dram_sun4i.h>
259a07eb0bSHans de Goede #endif
26286c3c3aSIan Campbell 
27286c3c3aSIan Campbell unsigned long sunxi_dram_init(void);
28*51637afeSHans de Goede void mctl_await_completion(u32 *reg, u32 mask, u32 val);
29*51637afeSHans de Goede bool mctl_mem_matches(u32 offset);
305665f50eSHans de Goede 
31286c3c3aSIan Campbell #endif /* _SUNXI_DRAM_H */
32