2 * linux/include/asm-arm/arch-sa1100/hardware.h
4 * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
6 * This file contains the hardware definitions for SA1100 architecture
8 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
9 * Definitions for SA1111 added.
12 #ifndef __ASM_ARCH_HARDWARE_H
13 #define __ASM_ARCH_HARDWARE_H
15 #include <linux/config.h>
16 #include <asm/mach-types.h>
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
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.
31 #define PCMCIA_IO_0_BASE 0xf6000000
32 #define PCMCIA_IO_1_BASE 0xf7000000
36 * We requires absolute addresses i.e. (PCMCIA_IO_0_BASE + 0x3f8) for
37 * in*()/out*() macros to be usable for all cases.
43 * SA1100 internal I/O mappings
45 * We have the following mapping:
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 */
58 ( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
60 ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
63 #include <asm/types.h>
66 # define __REG(x) (*((volatile u32 *)io_p2v(x)))
69 * This __REG() version gives the same results as the one above, except
70 * that we are fooling gcc somehow so it generates far better and smaller
71 * assembly code for access to contigous registers. It's a shame that gcc
72 * doesn't guess this by itself.
74 typedef struct { volatile u32 offset[4096]; } __regbase;
75 # define __REGP(x) ((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
76 # define __REG(x) __REGP(io_p2v(x))
79 # define __PREG(x) (io_v2p((u32)&(x)))
83 # define __REG(x) io_p2v(x)
84 # define __PREG(x) io_v2p(x)
92 * SA1100 GPIO edge detection for IRQs:
93 * IRQs are generated on Falling-Edge, Rising-Edge, or both.
94 * This must be called *before* the corresponding IRQ is registered.
95 * Use this instead of directly setting GRER/GFER.
97 #define GPIO_NO_EDGES 0
98 #define GPIO_FALLING_EDGE 1
99 #define GPIO_RISING_EDGE 2
100 #define GPIO_BOTH_EDGES 3
102 extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
107 * Implementation specifics.
109 * *** BIG FAT NOTE ***
111 * Any definitions in these files should be prefixed by an identifier -
112 * eg, ASSABET_UCB1300_IRQ This will allow us to eleminate these
113 * ifdefs, and lots of other preprocessor gunk elsewhere.
115 * Also, please try to add your entry in alphabetical order. The
116 * initial ones below are the start of the alphabetical list.
118 * Do NOT add your ifdefs around your file.
129 #ifdef CONFIG_SA1100_PANGOLIN
130 #include "pangolin.h"
133 #ifdef CONFIG_SA1100_HUW_WEBPANEL
134 #include "huw_webpanel.h"
137 #ifdef CONFIG_SA1100_PFS168
142 #ifdef CONFIG_SA1100_YOPY
146 #ifdef CONFIG_SA1100_FREEBIRD
147 #include "freebird.h"
150 #ifdef CONFIG_SA1100_CERF
154 #ifdef CONFIG_SA1100_EMPEG
158 #ifdef CONFIG_SA1100_ITSY
162 #if defined(CONFIG_SA1100_GRAPHICSCLIENT)
163 #include "graphicsclient.h"
166 #if defined(CONFIG_SA1100_OMNIMETER)
167 #include "omnimeter.h"
170 #if defined(CONFIG_SA1100_JORNADA720)
171 #include "jornada720.h"
174 #if defined(CONFIG_SA1100_PLEB)
178 #if defined(CONFIG_SA1100_LART)
182 #ifdef CONFIG_SA1100_SIMPAD
186 #ifdef CONFIG_SA1100_SIMPUTER
187 #include "simputer.h"
190 #if defined(CONFIG_SA1100_GRAPHICSMASTER)
191 #include "graphicsmaster.h"
194 #if defined(CONFIG_SA1100_ADSAGC)
198 #if defined(CONFIG_SA1100_ADSBITSY)
199 #include "adsbitsy.h"
202 #if defined(CONFIG_SA1100_ADSBITSYPLUS)
203 #include "adsbitsyplus.h"
209 * We have mapped the sa1101 depending on the value of SA1101_BASE.
210 * It then appears from 0xf4000000.
213 #define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xf4000000)
214 #define SA1101_v2p( x ) ((x) - 0xf4000000 + SA1101_BASE)
220 #if defined(CONFIG_SA1100_OMNIMETER)
221 #include "omnimeter.h"
224 #if defined(CONFIG_SA1100_JORNADA720)
225 #include "jornada720.h"
228 #if defined(CONFIG_SA1100_FLEXANET)
229 #include "flexanet.h"
232 #endif /* _ASM_ARCH_HARDWARE_H */