ARM: at91: make sdram/ddr register base soc independent
[linux-2.6.git] / arch / arm / mach-at91 / include / mach / at91_ramc.h
1 /*
2  * Header file for the Atmel RAM Controller
3  *
4  * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5  *
6  * Under GPLv2 only
7  */
8
9 #ifndef __AT91_RAMC_H__
10 #define __AT91_RAMC_H__
11
12 #ifndef __ASSEMBLY__
13 extern void __iomem *at91_ramc_base[];
14
15 #define at91_ramc_read(id, field) \
16         __raw_readl(at91_ramc_base[id] + field)
17
18 #define at91_ramc_write(id, field, value) \
19         __raw_writel(value, at91_ramc_base[id] + field)
20 #else
21 .extern at91_ramc_base
22 #endif
23
24 #ifdef CONFIG_ARCH_AT91RM9200
25 #include <mach/at91rm9200_mc.h>
26 #else
27 #include <mach/at91sam9_ddrsdr.h>
28 #include <mach/at91sam9_sdramc.h>
29 #endif
30
31 #endif /* __AT91_RAMC_H__ */