183d290c5STom 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> 30*da261654SIcenowy Zheng #elif defined(CONFIG_MACH_SUN50I_H6) 31*da261654SIcenowy Zheng #include <asm/arch/dram_sun50i_h6.h> 329a07eb0bSHans de Goede #else 33bec72c79SHans de Goede #include <asm/arch/dram_sun4i.h> 349a07eb0bSHans de Goede #endif 35286c3c3aSIan Campbell 36286c3c3aSIan Campbell unsigned long sunxi_dram_init(void); 3751637afeSHans de Goede void mctl_await_completion(u32 *reg, u32 mask, u32 val); 3851637afeSHans de Goede bool mctl_mem_matches(u32 offset); 395665f50eSHans de Goede 40286c3c3aSIan Campbell #endif /* _SUNXI_DRAM_H */ 41