Import changeset
[linux-flexiantxendom0-3.2.10.git] / include / asm-arm / arch-rpc / hardware.h
1 /*
2  *  linux/include/asm-arm/arch-rpc/hardware.h
3  *
4  *  Copyright (C) 1996-1999 Russell King.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  *  This file contains the hardware definitions of the RiscPC series machines.
11  */
12 #ifndef __ASM_ARCH_HARDWARE_H
13 #define __ASM_ARCH_HARDWARE_H
14
15 #include <asm/arch/memory.h>
16
17 /*
18  * What hardware must be present
19  */
20 #define HAS_IOMD
21 #define HAS_VIDC20
22
23 /* Hardware addresses of major areas.
24  *  *_START is the physical address
25  *  *_SIZE  is the size of the region
26  *  *_BASE  is the virtual address
27  */
28 #define RAM_SIZE                0x10000000
29 #define RAM_START               0x10000000
30
31 #define EASI_SIZE               0x08000000      /* EASI I/O */
32 #define EASI_START              0x08000000
33 #define EASI_BASE               0xe5000000
34
35 #define IO_START                0x03000000      /* I/O */
36 #define IO_SIZE                 0x01000000
37 #define IO_BASE                 0xe0000000
38
39 #define SCREEN_START            0x02000000      /* VRAM */
40 #define SCREEN_END              0xdfc00000
41 #define SCREEN_BASE             0xdf800000
42
43 #define FLUSH_BASE              0xdf000000
44 #define UNCACHEABLE_ADDR        0xdf010000
45
46
47 #ifndef __ASSEMBLY__
48
49 /*
50  * for use with inb/outb
51  */
52 #define IO_VIDC_AUDIO_BASE      0x80140000
53 #define IO_VIDC_BASE            0x80100000
54 #define IO_IOMD_BASE            0x80080000
55 #define IOC_BASE                0x80080000
56
57 #define IO_EC_EASI_BASE         0x81400000
58 #define IO_EC_IOC4_BASE         0x8009c000
59 #define IO_EC_IOC_BASE          0x80090000
60 #define IO_EC_MEMC8_BASE        0x8000ac00
61 #define IO_EC_MEMC_BASE         0x80000000
62
63 /*
64  * IO definitions
65  */
66 #define EXPMASK_BASE            ((volatile unsigned char *)0xe0360000)
67 #define IOEB_BASE               ((volatile unsigned char *)0xe0350050)
68 #define PCIO_FLOPPYDMABASE      ((volatile unsigned char *)0xe002a000)
69 #define PCIO_BASE               0xe0010000
70
71 /*
72  * Offsets from RAM base
73  */
74 #define PARAMS_OFFSET           0x0100
75
76 /*
77  * RAM definitions
78  */
79 #define GET_MEMORY_END(p)       (PAGE_OFFSET + p->u1.s.page_size * \
80                                                 (p->u1.s.pages_in_bank[0] + \
81                                                  p->u1.s.pages_in_bank[1] + \
82                                                  p->u1.s.pages_in_bank[2] + \
83                                                  p->u1.s.pages_in_bank[3]))
84
85 #define Z_PARAMS_BASE           (RAM_START + PARAMS_OFFSET)
86 #define FLUSH_BASE_PHYS         0x00000000      /* ROM */
87
88 #else
89
90 #define VIDC_SND_BASE           0xe0500000
91 #define VIDC_BASE               0xe0400000
92 #define IOMD_BASE               0xe0200000
93 #define IOC_BASE                0xe0200000
94 #define PCIO_FLOPPYDMABASE      0xe002a000
95 #define PCIO_BASE               0xe0010000
96
97 #endif
98
99 #ifndef __ASSEMBLY__
100 #define __EXPMASK(offset)       (((volatile unsigned char *)EXPMASK_BASE)[offset])
101 #else
102 #define __EXPMASK(offset)       offset
103 #endif
104
105 #define EXPMASK_STATUS  __EXPMASK(0x00)
106 #define EXPMASK_ENABLE  __EXPMASK(0x04)
107
108 #endif