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#elif defined(CONFIG_MACH_SUN50I_H6) 31#include <asm/arch/dram_sun50i_h6.h> 32#elif defined(CONFIG_MACH_SUN50I_H616) 33#include <asm/arch/dram_sun50i_h616.h> 34#elif defined(CONFIG_MACH_SUNIV) 35#include <asm/arch/dram_suniv.h> 36#else 37#include <asm/arch/dram_sun4i.h> 38#endif 39 40unsigned long sunxi_dram_init(void); 41void mctl_await_completion(u32 *reg, u32 mask, u32 val); 42bool mctl_mem_matches(u32 offset); 43bool mctl_mem_matches_base(u32 offset, ulong base); 44 45#endif /* _SUNXI_DRAM_H */ 46