aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-clps711x/include/mach/hardware.h
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-05-06 01:21:57 -0400
committerArnd Bergmann <arnd@arndb.de>2012-05-11 10:18:01 -0400
commit304b2c684e42af5b72d643322f783d88538dc817 (patch)
tree9e5fac4f8873a228a1f433f6f1e4dc6d8ad91f2e /arch/arm/mach-clps711x/include/mach/hardware.h
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
ARM: clps711x: Using a single definition for the PHYS and VIRT registers offset
Using a single definition for the physical and virtual address register for all variants boards clps711x. This patch also includes the use of a single function clps_read/write in some units. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-clps711x/include/mach/hardware.h')
-rw-r--r--arch/arm/mach-clps711x/include/mach/hardware.h36
1 files changed, 13 insertions, 23 deletions
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index d0b7d870be9c..1026ac968706 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -19,12 +19,21 @@
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22#ifndef __ASM_ARCH_HARDWARE_H 22#ifndef __MACH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H 23#define __MACH_HARDWARE_H
24 24
25#include <asm/hardware/clps7111.h>
26
27#define CLPS711X_VIRT_BASE IOMEM(0xff000000)
25 28
26#define CLPS7111_VIRT_BASE 0xff000000 29#ifndef __ASSEMBLY__
27#define CLPS7111_BASE CLPS7111_VIRT_BASE 30#define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off))
31#define clps_readw(off) readw(CLPS711X_VIRT_BASE + (off))
32#define clps_readl(off) readl(CLPS711X_VIRT_BASE + (off))
33#define clps_writeb(val,off) writeb(val, CLPS711X_VIRT_BASE + (off))
34#define clps_writew(val,off) writew(val, CLPS711X_VIRT_BASE + (off))
35#define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off))
36#endif
28 37
29/* 38/*
30 * The physical addresses that the external chip select signals map to is 39 * The physical addresses that the external chip select signals map to is
@@ -54,14 +63,10 @@
54 63
55#if defined (CONFIG_ARCH_EP7211) 64#if defined (CONFIG_ARCH_EP7211)
56 65
57#define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
58#define EP7211_BASE CLPS7111_VIRT_BASE
59#include <asm/hardware/ep7211.h> 66#include <asm/hardware/ep7211.h>
60 67
61#elif defined (CONFIG_ARCH_EP7212) 68#elif defined (CONFIG_ARCH_EP7212)
62 69
63#define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
64#define EP7212_BASE CLPS7111_VIRT_BASE
65#include <asm/hardware/ep7212.h> 70#include <asm/hardware/ep7212.h>
66 71
67#endif 72#endif
@@ -71,10 +76,6 @@
71 76
72#if defined (CONFIG_ARCH_AUTCPU12) 77#if defined (CONFIG_ARCH_AUTCPU12)
73 78
74#define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
75#define CS89712_BASE CLPS7111_VIRT_BASE
76
77#include <asm/hardware/clps7111.h>
78#include <asm/hardware/ep7212.h> 79#include <asm/hardware/ep7212.h>
79#include <asm/hardware/cs89712.h> 80#include <asm/hardware/cs89712.h>
80 81
@@ -83,15 +84,9 @@
83 84
84#if defined (CONFIG_ARCH_CDB89712) 85#if defined (CONFIG_ARCH_CDB89712)
85 86
86#include <asm/hardware/clps7111.h>
87#include <asm/hardware/ep7212.h> 87#include <asm/hardware/ep7212.h>
88#include <asm/hardware/cs89712.h> 88#include <asm/hardware/cs89712.h>
89 89
90/* static cdb89712_map_io() areas */
91#define REGISTER_START 0x80000000
92#define REGISTER_SIZE 0x4000
93#define REGISTER_BASE 0xff000000
94
95#define ETHER_START 0x20000000 90#define ETHER_START 0x20000000
96#define ETHER_SIZE 0x1000 91#define ETHER_SIZE 0x1000
97#define ETHER_BASE 0xfe000000 92#define ETHER_BASE 0xfe000000
@@ -154,13 +149,8 @@
154 149
155#if defined (CONFIG_ARCH_CEIVA) 150#if defined (CONFIG_ARCH_CEIVA)
156 151
157#define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
158#define CEIVA_BASE CLPS7111_VIRT_BASE
159
160#include <asm/hardware/clps7111.h>
161#include <asm/hardware/ep7212.h> 152#include <asm/hardware/ep7212.h>
162 153
163
164/* 154/*
165 * The two flash banks are wired to chip selects 0 and 1. This is the mapping 155 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
166 * for them. 156 * for them.