1/*
2 * linux/include/asm-arm/arch-sa1100/hardware.h
3 *
4 * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware definitions for SA1100 architecture
7 *
8 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
9 *      Definitions for SA1111 added.
10 */
11
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15#include <linux/config.h>
16#include <asm/mach-types.h>
17
18
19/* Flushing areas */
20#define FLUSH_BASE_PHYS		0xe0000000	/* SA1100 zero bank */
21#define FLUSH_BASE		0xf5000000
22#define FLUSH_BASE_MINICACHE	0xf5800000
23#define UNCACHEABLE_ADDR	0xfa050000
24
25
26/*
27 * Those are statically mapped PCMCIA IO space for designs using it as a
28 * generic IO bus, typically with ISA parts, hardwired IDE interfaces, etc.
29 * The actual PCMCIA code is mapping required IO region at run time.
30 */
31#define PCMCIA_IO_0_BASE	0xf6000000
32#define PCMCIA_IO_1_BASE	0xf7000000
33
34
35/*
36 * We requires absolute addresses i.e. (PCMCIA_IO_0_BASE + 0x3f8) for
37 * in*()/out*() macros to be usable for all cases.
38 */
39#define PCIO_BASE		0
40
41
42/*
43 * SA1100 internal I/O mappings
44 *
45 * We have the following mapping:
46 *      phys            virt
47 *      80000000        f8000000
48 *      90000000        fa000000
49 *      a0000000        fc000000
50 *      b0000000        fe000000
51 */
52
53#define VIO_BASE        0xf8000000	/* virtual start of IO space */
54#define VIO_SHIFT       3		/* x = IO space shrink power */
55#define PIO_START       0x80000000	/* physical start of IO space */
56
57#define io_p2v( x )             \
58   ( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
59#define io_v2p( x )             \
60   ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
61
62#ifndef __ASSEMBLY__
63#include <asm/types.h>
64
65/*
66 * This __REG() version gives the same results as the one above,  except
67 * that we are fooling gcc somehow so it generates far better and smaller
68 * assembly code for access to contigous registers.  It's a shame that gcc
69 * doesn't guess this by itself.
70 */
71typedef struct { volatile u32 offset[4096]; } __regbase;
72# define __REGP(x)	((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
73# define __REG(x)	__REGP(io_p2v(x))
74
75# define __PREG(x)	(io_v2p((u32)&(x)))
76
77#else
78
79# define __REG(x)	io_p2v(x)
80# define __PREG(x)	io_v2p(x)
81
82#endif
83
84#include "SA-1100.h"
85
86
87/*
88 * SA1100 GPIO edge detection for IRQs:
89 * IRQs are generated on Falling-Edge, Rising-Edge, or both.
90 * This must be called *before* the corresponding IRQ is registered.
91 * Use this instead of directly setting GRER/GFER.
92 */
93#define GPIO_NO_EDGES		0
94#define GPIO_FALLING_EDGE	1
95#define GPIO_RISING_EDGE	2
96#define GPIO_BOTH_EDGES 	3
97#ifndef __ASSEMBLY__
98extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
99#endif
100
101
102/*
103 * Implementation specifics.
104 *
105 *                      *** BIG FAT NOTE ***
106 *
107 * Any definitions in these files should be prefixed by an identifier -
108 * eg, ASSABET_UCB1300_IRQ  This will allow us to eleminate these
109 * ifdefs, and lots of other preprocessor gunk elsewhere.
110 *
111 * Also, please try to add your entry in alphabetical order.  The
112 * initial ones below are the start of the alphabetical list.
113 *
114 * Do NOT add your ifdefs around your file.
115 */
116
117#include "badge4.h"
118
119#include "frodo.h"
120
121#include "h3600.h"
122
123#include "system3.h"
124
125#ifdef CONFIG_SA1100_PANGOLIN
126#include "pangolin.h"
127#endif
128
129#ifdef CONFIG_SA1100_HUW_WEBPANEL
130#include "huw_webpanel.h"
131#endif
132
133#ifdef CONFIG_SA1100_PFS168
134#include "pfs168.h"
135#endif
136
137
138#ifdef CONFIG_SA1100_YOPY
139#include "yopy.h"
140#endif
141
142#ifdef CONFIG_SA1100_FREEBIRD
143#include "freebird.h"
144#endif
145
146#ifdef CONFIG_SA1100_CERF
147#include "cerf.h"
148#endif
149
150#ifdef CONFIG_SA1100_EMPEG
151#include "empeg.h"
152#endif
153
154#ifdef CONFIG_SA1100_ITSY
155#include "itsy.h"
156#endif
157
158#if defined(CONFIG_SA1100_GRAPHICSCLIENT)
159#include "graphicsclient.h"
160#endif
161
162#if defined(CONFIG_SA1100_OMNIMETER)
163#include "omnimeter.h"
164#endif
165
166#if defined(CONFIG_SA1100_JORNADA720)
167#include "jornada720.h"
168#endif
169
170#if defined(CONFIG_SA1100_PLEB)
171#include "pleb.h"
172#endif
173
174#if defined(CONFIG_SA1100_LART)
175#include "lart.h"
176#endif
177
178#ifdef CONFIG_SA1100_SIMPAD
179#include "simpad.h"
180#endif
181
182#if defined(CONFIG_SA1100_GRAPHICSMASTER)
183#include "graphicsmaster.h"
184#endif
185
186#if defined(CONFIG_SA1100_ADSBITSY)
187#include "adsbitsy.h"
188#endif
189
190#ifdef CONFIG_SA1101
191
192/*
193 * We have mapped the sa1101 depending on the value of SA1101_BASE.
194 * It then appears from 0xf4000000.
195 */
196
197#define SA1101_p2v( x )         ((x) - SA1101_BASE + 0xf4000000)
198#define SA1101_v2p( x )         ((x) - 0xf4000000  + SA1101_BASE)
199
200#include "SA-1101.h"
201
202#endif
203
204#if defined(CONFIG_SA1100_OMNIMETER)
205#include "omnimeter.h"
206#endif
207
208#if defined(CONFIG_SA1100_JORNADA720)
209#include "jornada720.h"
210#endif
211
212#if defined(CONFIG_SA1100_FLEXANET)
213#include "flexanet.h"
214#endif
215
216#endif  /* _ASM_ARCH_HARDWARE_H */
217