Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 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. |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef _SUNXI_DRAM_H |
| 12 | #define _SUNXI_DRAM_H |
| 13 | |
Hans de Goede | 36b2570 | 2014-12-08 13:38:21 +0100 | [diff] [blame] | 14 | #include <asm/io.h> |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 15 | #include <linux/types.h> |
| 16 | |
Hans de Goede | 5037c45 | 2014-11-02 20:31:16 +0100 | [diff] [blame] | 17 | /* dram regs definition */ |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 18 | #if defined(CONFIG_MACH_SUN6I) |
| 19 | #include <asm/arch/dram_sun6i.h> |
Hans de Goede | f055ed6 | 2015-04-06 20:55:39 +0200 | [diff] [blame] | 20 | #elif defined(CONFIG_MACH_SUN8I_A23) |
| 21 | #include <asm/arch/dram_sun8i_a23.h> |
Vishnu Patekar | 575716c | 2015-03-01 23:49:39 +0530 | [diff] [blame] | 22 | #elif defined(CONFIG_MACH_SUN8I_A33) |
| 23 | #include <asm/arch/dram_sun8i_a33.h> |
vishnupatekar | e302fe6 | 2015-11-29 01:07:25 +0800 | [diff] [blame] | 24 | #elif defined(CONFIG_MACH_SUN8I_A83T) |
| 25 | #include <asm/arch/dram_sun8i_a83t.h> |
Icenowy Zheng | ca0bc02 | 2017-06-03 17:10:14 +0800 | [diff] [blame] | 26 | #elif defined(CONFIG_SUNXI_DRAM_DW) |
| 27 | #include <asm/arch/dram_sunxi_dw.h> |
Philipp Tomsich | d36af1c | 2016-10-28 18:21:28 +0800 | [diff] [blame] | 28 | #elif defined(CONFIG_MACH_SUN9I) |
| 29 | #include <asm/arch/dram_sun9i.h> |
Icenowy Zheng | 4e287f6 | 2018-07-23 06:13:34 +0800 | [diff] [blame] | 30 | #elif defined(CONFIG_MACH_SUN50I_H6) |
| 31 | #include <asm/arch/dram_sun50i_h6.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 32 | #else |
Hans de Goede | 5037c45 | 2014-11-02 20:31:16 +0100 | [diff] [blame] | 33 | #include <asm/arch/dram_sun4i.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 34 | #endif |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 35 | |
| 36 | unsigned long sunxi_dram_init(void); |
Hans de Goede | dea16d2 | 2015-02-04 12:14:56 +0100 | [diff] [blame] | 37 | void mctl_await_completion(u32 *reg, u32 mask, u32 val); |
| 38 | bool mctl_mem_matches(u32 offset); |
Hans de Goede | b29de01 | 2014-12-08 13:58:53 +0100 | [diff] [blame] | 39 | |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 40 | #endif /* _SUNXI_DRAM_H */ |