blob: 8002b7efdc196bc06416ffb0d284966782f2c95b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Ian Campbell2f1afcc2014-05-05 11:52:25 +01002/*
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.
Ian Campbell2f1afcc2014-05-05 11:52:25 +01009 */
10
11#ifndef _SUNXI_DRAM_H
12#define _SUNXI_DRAM_H
13
Hans de Goede36b25702014-12-08 13:38:21 +010014#include <asm/io.h>
Ian Campbell2f1afcc2014-05-05 11:52:25 +010015#include <linux/types.h>
16
Hans de Goede5037c452014-11-02 20:31:16 +010017/* dram regs definition */
Hans de Goede31521222014-10-25 20:27:23 +020018#if defined(CONFIG_MACH_SUN6I)
19#include <asm/arch/dram_sun6i.h>
Hans de Goedef055ed62015-04-06 20:55:39 +020020#elif defined(CONFIG_MACH_SUN8I_A23)
21#include <asm/arch/dram_sun8i_a23.h>
Vishnu Patekar575716c2015-03-01 23:49:39 +053022#elif defined(CONFIG_MACH_SUN8I_A33)
23#include <asm/arch/dram_sun8i_a33.h>
vishnupatekare302fe62015-11-29 01:07:25 +080024#elif defined(CONFIG_MACH_SUN8I_A83T)
25#include <asm/arch/dram_sun8i_a83t.h>
Icenowy Zhengca0bc022017-06-03 17:10:14 +080026#elif defined(CONFIG_SUNXI_DRAM_DW)
27#include <asm/arch/dram_sunxi_dw.h>
Philipp Tomsichd36af1c2016-10-28 18:21:28 +080028#elif defined(CONFIG_MACH_SUN9I)
29#include <asm/arch/dram_sun9i.h>
Icenowy Zheng4e287f62018-07-23 06:13:34 +080030#elif defined(CONFIG_MACH_SUN50I_H6)
31#include <asm/arch/dram_sun50i_h6.h>
Hans de Goede31521222014-10-25 20:27:23 +020032#else
Hans de Goede5037c452014-11-02 20:31:16 +010033#include <asm/arch/dram_sun4i.h>
Hans de Goede31521222014-10-25 20:27:23 +020034#endif
Ian Campbell2f1afcc2014-05-05 11:52:25 +010035
36unsigned long sunxi_dram_init(void);
Hans de Goededea16d22015-02-04 12:14:56 +010037void mctl_await_completion(u32 *reg, u32 mask, u32 val);
38bool mctl_mem_matches(u32 offset);
Hans de Goedeb29de012014-12-08 13:58:53 +010039
Ian Campbell2f1afcc2014-05-05 11:52:25 +010040#endif /* _SUNXI_DRAM_H */