diff options
Diffstat (limited to 'include/asm-arm/arch-s3c2410/map.h')
-rw-r--r-- | include/asm-arm/arch-s3c2410/map.h | 85 |
1 files changed, 9 insertions, 76 deletions
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 19e77f038042..b33ed3b05ef5 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -13,58 +13,36 @@ | |||
13 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
14 | #define __ASM_ARCH_MAP_H | 14 | #define __ASM_ARCH_MAP_H |
15 | 15 | ||
16 | /* we have a bit of a tight squeeze to fit all our registers from | 16 | #include <asm/plat-s3c/map.h> |
17 | * 0xF00000000 upwards, since we use all of the nGCS space in some | ||
18 | * capacity, and also need to fit the S3C2410 registers in as well... | ||
19 | * | ||
20 | * we try to ensure stuff like the IRQ registers are available for | ||
21 | * an single MOVS instruction (ie, only 8 bits of set data) | ||
22 | * | ||
23 | * Note, we are trying to remove some of these from the implementation | ||
24 | * as they are only useful to certain drivers... | ||
25 | */ | ||
26 | |||
27 | #ifndef __ASSEMBLY__ | ||
28 | #define S3C2410_ADDR(x) ((void __iomem __force *)0xF0000000 + (x)) | ||
29 | #else | ||
30 | #define S3C2410_ADDR(x) (0xF0000000 + (x)) | ||
31 | #endif | ||
32 | 17 | ||
33 | #define S3C2400_ADDR(x) S3C2410_ADDR(x) | 18 | #define S3C2410_ADDR(x) S3C_ADDR(x) |
34 | 19 | ||
35 | /* interrupt controller is the first thing we put in, to make | 20 | /* interrupt controller is the first thing we put in, to make |
36 | * the assembly code for the irq detection easier | 21 | * the assembly code for the irq detection easier |
37 | */ | 22 | */ |
38 | #define S3C24XX_VA_IRQ S3C2410_ADDR(0x00000000) | 23 | #define S3C24XX_VA_IRQ S3C_VA_IRQ |
39 | #define S3C2400_PA_IRQ (0x14400000) | ||
40 | #define S3C2410_PA_IRQ (0x4A000000) | 24 | #define S3C2410_PA_IRQ (0x4A000000) |
41 | #define S3C24XX_SZ_IRQ SZ_1M | 25 | #define S3C24XX_SZ_IRQ SZ_1M |
42 | 26 | ||
43 | /* memory controller registers */ | 27 | /* memory controller registers */ |
44 | #define S3C24XX_VA_MEMCTRL S3C2410_ADDR(0x00100000) | 28 | #define S3C24XX_VA_MEMCTRL S3C_VA_MEM |
45 | #define S3C2400_PA_MEMCTRL (0x14000000) | ||
46 | #define S3C2410_PA_MEMCTRL (0x48000000) | 29 | #define S3C2410_PA_MEMCTRL (0x48000000) |
47 | #define S3C24XX_SZ_MEMCTRL SZ_1M | 30 | #define S3C24XX_SZ_MEMCTRL SZ_1M |
48 | 31 | ||
49 | /* USB host controller */ | 32 | /* USB host controller */ |
50 | #define S3C2400_PA_USBHOST (0x14200000) | ||
51 | #define S3C2410_PA_USBHOST (0x49000000) | 33 | #define S3C2410_PA_USBHOST (0x49000000) |
52 | #define S3C24XX_SZ_USBHOST SZ_1M | 34 | #define S3C24XX_SZ_USBHOST SZ_1M |
53 | 35 | ||
54 | /* DMA controller */ | 36 | /* DMA controller */ |
55 | #define S3C2400_PA_DMA (0x14600000) | ||
56 | #define S3C2410_PA_DMA (0x4B000000) | 37 | #define S3C2410_PA_DMA (0x4B000000) |
57 | #define S3C24XX_SZ_DMA SZ_1M | 38 | #define S3C24XX_SZ_DMA SZ_1M |
58 | 39 | ||
59 | /* Clock and Power management */ | 40 | /* Clock and Power management */ |
60 | #define S3C24XX_VA_CLKPWR S3C2410_ADDR(0x00200000) | 41 | #define S3C24XX_VA_CLKPWR S3C_VA_SYS |
61 | #define S3C2400_PA_CLKPWR (0x14800000) | ||
62 | #define S3C2410_PA_CLKPWR (0x4C000000) | 42 | #define S3C2410_PA_CLKPWR (0x4C000000) |
63 | #define S3C24XX_SZ_CLKPWR SZ_1M | 43 | #define S3C24XX_SZ_CLKPWR SZ_1M |
64 | 44 | ||
65 | /* LCD controller */ | 45 | /* LCD controller */ |
66 | #define S3C24XX_VA_LCD S3C2410_ADDR(0x00300000) | ||
67 | #define S3C2400_PA_LCD (0x14A00000) | ||
68 | #define S3C2410_PA_LCD (0x4D000000) | 46 | #define S3C2410_PA_LCD (0x4D000000) |
69 | #define S3C24XX_SZ_LCD SZ_1M | 47 | #define S3C24XX_SZ_LCD SZ_1M |
70 | 48 | ||
@@ -72,41 +50,30 @@ | |||
72 | #define S3C2410_PA_NAND (0x4E000000) | 50 | #define S3C2410_PA_NAND (0x4E000000) |
73 | #define S3C24XX_SZ_NAND SZ_1M | 51 | #define S3C24XX_SZ_NAND SZ_1M |
74 | 52 | ||
75 | /* MMC controller - available on the S3C2400 */ | ||
76 | #define S3C2400_PA_MMC (0x15A00000) | ||
77 | #define S3C2400_SZ_MMC SZ_1M | ||
78 | |||
79 | /* UARTs */ | 53 | /* UARTs */ |
80 | #define S3C24XX_VA_UART S3C2410_ADDR(0x00400000) | 54 | #define S3C24XX_VA_UART S3C_VA_UART |
81 | #define S3C2400_PA_UART (0x15000000) | ||
82 | #define S3C2410_PA_UART (0x50000000) | 55 | #define S3C2410_PA_UART (0x50000000) |
83 | #define S3C24XX_SZ_UART SZ_1M | 56 | #define S3C24XX_SZ_UART SZ_1M |
84 | 57 | ||
85 | /* Timers */ | 58 | /* Timers */ |
86 | #define S3C24XX_VA_TIMER S3C2410_ADDR(0x00500000) | 59 | #define S3C24XX_VA_TIMER S3C_VA_TIMER |
87 | #define S3C2400_PA_TIMER (0x15100000) | ||
88 | #define S3C2410_PA_TIMER (0x51000000) | 60 | #define S3C2410_PA_TIMER (0x51000000) |
89 | #define S3C24XX_SZ_TIMER SZ_1M | 61 | #define S3C24XX_SZ_TIMER SZ_1M |
90 | 62 | ||
91 | /* USB Device port */ | 63 | /* USB Device port */ |
92 | #define S3C24XX_VA_USBDEV S3C2410_ADDR(0x00600000) | ||
93 | #define S3C2400_PA_USBDEV (0x15200140) | ||
94 | #define S3C2410_PA_USBDEV (0x52000000) | 64 | #define S3C2410_PA_USBDEV (0x52000000) |
95 | #define S3C24XX_SZ_USBDEV SZ_1M | 65 | #define S3C24XX_SZ_USBDEV SZ_1M |
96 | 66 | ||
97 | /* Watchdog */ | 67 | /* Watchdog */ |
98 | #define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00700000) | 68 | #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG |
99 | #define S3C2400_PA_WATCHDOG (0x15300000) | ||
100 | #define S3C2410_PA_WATCHDOG (0x53000000) | 69 | #define S3C2410_PA_WATCHDOG (0x53000000) |
101 | #define S3C24XX_SZ_WATCHDOG SZ_1M | 70 | #define S3C24XX_SZ_WATCHDOG SZ_1M |
102 | 71 | ||
103 | /* IIC hardware controller */ | 72 | /* IIC hardware controller */ |
104 | #define S3C2400_PA_IIC (0x15400000) | ||
105 | #define S3C2410_PA_IIC (0x54000000) | 73 | #define S3C2410_PA_IIC (0x54000000) |
106 | #define S3C24XX_SZ_IIC SZ_1M | 74 | #define S3C24XX_SZ_IIC SZ_1M |
107 | 75 | ||
108 | /* IIS controller */ | 76 | /* IIS controller */ |
109 | #define S3C2400_PA_IIS (0x15508000) | ||
110 | #define S3C2410_PA_IIS (0x55000000) | 77 | #define S3C2410_PA_IIS (0x55000000) |
111 | #define S3C24XX_SZ_IIS SZ_1M | 78 | #define S3C24XX_SZ_IIS SZ_1M |
112 | 79 | ||
@@ -116,27 +83,23 @@ | |||
116 | * it is the same distance apart from the UART in the | 83 | * it is the same distance apart from the UART in the |
117 | * phsyical address space, as the initial mapping for the IO | 84 | * phsyical address space, as the initial mapping for the IO |
118 | * is done as a 1:1 maping. This puts it (currently) at | 85 | * is done as a 1:1 maping. This puts it (currently) at |
119 | * 0xF6800000, which is not in the way of any current mapping | 86 | * 0xFA800000, which is not in the way of any current mapping |
120 | * by the base system. | 87 | * by the base system. |
121 | */ | 88 | */ |
122 | 89 | ||
123 | #define S3C2400_PA_GPIO (0x15600000) | ||
124 | #define S3C2410_PA_GPIO (0x56000000) | 90 | #define S3C2410_PA_GPIO (0x56000000) |
125 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | 91 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) |
126 | #define S3C24XX_SZ_GPIO SZ_1M | 92 | #define S3C24XX_SZ_GPIO SZ_1M |
127 | 93 | ||
128 | /* RTC */ | 94 | /* RTC */ |
129 | #define S3C2400_PA_RTC (0x15700040) | ||
130 | #define S3C2410_PA_RTC (0x57000000) | 95 | #define S3C2410_PA_RTC (0x57000000) |
131 | #define S3C24XX_SZ_RTC SZ_1M | 96 | #define S3C24XX_SZ_RTC SZ_1M |
132 | 97 | ||
133 | /* ADC */ | 98 | /* ADC */ |
134 | #define S3C2400_PA_ADC (0x15800000) | ||
135 | #define S3C2410_PA_ADC (0x58000000) | 99 | #define S3C2410_PA_ADC (0x58000000) |
136 | #define S3C24XX_SZ_ADC SZ_1M | 100 | #define S3C24XX_SZ_ADC SZ_1M |
137 | 101 | ||
138 | /* SPI */ | 102 | /* SPI */ |
139 | #define S3C2400_PA_SPI (0x15900000) | ||
140 | #define S3C2410_PA_SPI (0x59000000) | 103 | #define S3C2410_PA_SPI (0x59000000) |
141 | #define S3C24XX_SZ_SPI SZ_1M | 104 | #define S3C24XX_SZ_SPI SZ_1M |
142 | 105 | ||
@@ -177,37 +140,8 @@ | |||
177 | 140 | ||
178 | #define S3C2410_SDRAM_PA (S3C2410_CS6) | 141 | #define S3C2410_SDRAM_PA (S3C2410_CS6) |
179 | 142 | ||
180 | #define S3C2400_CS0 (0x00000000) | ||
181 | #define S3C2400_CS1 (0x02000000) | ||
182 | #define S3C2400_CS2 (0x04000000) | ||
183 | #define S3C2400_CS3 (0x06000000) | ||
184 | #define S3C2400_CS4 (0x08000000) | ||
185 | #define S3C2400_CS5 (0x0A000000) | ||
186 | #define S3C2400_CS6 (0x0C000000) | ||
187 | #define S3C2400_CS7 (0x0E000000) | ||
188 | |||
189 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | ||
190 | |||
191 | /* Use a single interface for common resources between S3C24XX cpus */ | 143 | /* Use a single interface for common resources between S3C24XX cpus */ |
192 | 144 | ||
193 | #ifdef CONFIG_CPU_S3C2400 | ||
194 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
195 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
196 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
197 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
198 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
199 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
200 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
201 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
202 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
203 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
204 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
205 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
206 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
207 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
208 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
209 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
210 | #else | ||
211 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ | 145 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ |
212 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL | 146 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL |
213 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST | 147 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST |
@@ -224,7 +158,6 @@ | |||
224 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | 158 | #define S3C24XX_PA_RTC S3C2410_PA_RTC |
225 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | 159 | #define S3C24XX_PA_ADC S3C2410_PA_ADC |
226 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | 160 | #define S3C24XX_PA_SPI S3C2410_PA_SPI |
227 | #endif | ||
228 | 161 | ||
229 | /* deal with the registers that move under the 2412/2413 */ | 162 | /* deal with the registers that move under the 2412/2413 */ |
230 | 163 | ||