blob: 53e6d471d2ec2ce4a79d4292adac06c2e5ecefd8 [file] [log] [blame]
Ian Campbell2f1afcc2014-05-05 11:52:25 +01001/*
2 * (C) Copyright 2007-2012
3 * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
4 * Berg Xing <bergxing@allwinnertech.com>
5 * Tom Cubie <tangliang@allwinnertech.com>
6 *
7 * Sunxi platform dram register definition.
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef _SUNXI_DRAM_H
13#define _SUNXI_DRAM_H
14
Hans de Goede36b25702014-12-08 13:38:21 +010015#include <asm/io.h>
Ian Campbell2f1afcc2014-05-05 11:52:25 +010016#include <linux/types.h>
17
Hans de Goede5037c452014-11-02 20:31:16 +010018/* dram regs definition */
Hans de Goede31521222014-10-25 20:27:23 +020019#if defined(CONFIG_MACH_SUN6I)
20#include <asm/arch/dram_sun6i.h>
Hans de Goedef055ed62015-04-06 20:55:39 +020021#elif defined(CONFIG_MACH_SUN8I_A23)
22#include <asm/arch/dram_sun8i_a23.h>
Vishnu Patekar575716c2015-03-01 23:49:39 +053023#elif defined(CONFIG_MACH_SUN8I_A33)
24#include <asm/arch/dram_sun8i_a33.h>
vishnupatekare302fe62015-11-29 01:07:25 +080025#elif defined(CONFIG_MACH_SUN8I_A83T)
26#include <asm/arch/dram_sun8i_a83t.h>
Jens Kuskef6138172017-01-02 11:48:42 +000027#elif defined(CONFIG_MACH_SUN8I_H3) || defined(CONFIG_MACH_SUN50I)
Jens Kuske53f018e2015-11-17 15:12:59 +010028#include <asm/arch/dram_sun8i_h3.h>
Philipp Tomsichd36af1c2016-10-28 18:21:28 +080029#elif defined(CONFIG_MACH_SUN9I)
30#include <asm/arch/dram_sun9i.h>
Hans de Goede31521222014-10-25 20:27:23 +020031#else
Hans de Goede5037c452014-11-02 20:31:16 +010032#include <asm/arch/dram_sun4i.h>
Hans de Goede31521222014-10-25 20:27:23 +020033#endif
Ian Campbell2f1afcc2014-05-05 11:52:25 +010034
35unsigned long sunxi_dram_init(void);
Hans de Goededea16d22015-02-04 12:14:56 +010036void mctl_await_completion(u32 *reg, u32 mask, u32 val);
37bool mctl_mem_matches(u32 offset);
Hans de Goedeb29de012014-12-08 13:58:53 +010038
Ian Campbell2f1afcc2014-05-05 11:52:25 +010039#endif /* _SUNXI_DRAM_H */