Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 1 | /* |
| 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 Goede | 36b2570 | 2014-12-08 13:38:21 +0100 | [diff] [blame] | 15 | #include <asm/io.h> |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 16 | #include <linux/types.h> |
| 17 | |
Hans de Goede | 5037c45 | 2014-11-02 20:31:16 +0100 | [diff] [blame] | 18 | /* dram regs definition */ |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 19 | #if defined(CONFIG_MACH_SUN6I) |
| 20 | #include <asm/arch/dram_sun6i.h> |
Hans de Goede | f055ed6 | 2015-04-06 20:55:39 +0200 | [diff] [blame] | 21 | #elif defined(CONFIG_MACH_SUN8I_A23) |
| 22 | #include <asm/arch/dram_sun8i_a23.h> |
Vishnu Patekar | 575716c | 2015-03-01 23:49:39 +0530 | [diff] [blame] | 23 | #elif defined(CONFIG_MACH_SUN8I_A33) |
| 24 | #include <asm/arch/dram_sun8i_a33.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 25 | #else |
Hans de Goede | 5037c45 | 2014-11-02 20:31:16 +0100 | [diff] [blame] | 26 | #include <asm/arch/dram_sun4i.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 27 | #endif |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 28 | |
| 29 | unsigned long sunxi_dram_init(void); |
Hans de Goede | dea16d2 | 2015-02-04 12:14:56 +0100 | [diff] [blame] | 30 | void mctl_await_completion(u32 *reg, u32 mask, u32 val); |
| 31 | bool mctl_mem_matches(u32 offset); |
Hans de Goede | b29de01 | 2014-12-08 13:58:53 +0100 | [diff] [blame] | 32 | |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 33 | #endif /* _SUNXI_DRAM_H */ |