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 | 966d239 | 2014-12-07 14:34:27 +0100 | [diff] [blame] | 21 | #elif defined(CONFIG_MACH_SUN8I) |
| 22 | #include <asm/arch/dram_sun8i.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 23 | #else |
Hans de Goede | 5037c45 | 2014-11-02 20:31:16 +0100 | [diff] [blame] | 24 | #include <asm/arch/dram_sun4i.h> |
Hans de Goede | 3152122 | 2014-10-25 20:27:23 +0200 | [diff] [blame] | 25 | #endif |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 26 | |
| 27 | unsigned long sunxi_dram_init(void); |
Hans de Goede | dea16d2 | 2015-02-04 12:14:56 +0100 | [diff] [blame] | 28 | void mctl_await_completion(u32 *reg, u32 mask, u32 val); |
| 29 | bool mctl_mem_matches(u32 offset); |
Hans de Goede | b29de01 | 2014-12-08 13:58:53 +0100 | [diff] [blame] | 30 | |
Ian Campbell | 2f1afcc | 2014-05-05 11:52:25 +0100 | [diff] [blame] | 31 | #endif /* _SUNXI_DRAM_H */ |