diff options
author | Lucas Correia Villa Real <lucasvr@gobolinux.org> | 2006-01-26 10:20:50 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-26 10:20:50 -0500 |
commit | 0367a8d37af6028b64127ac70922717575b81113 (patch) | |
tree | c61c592d68ce6a582a3508220bec1bd004764c0a /arch | |
parent | c43e6f027de1092678980e9e2494a6f9b051b93f (diff) |
[ARM] 3266/1: S3C2400 - adds macro S3C24XX
Patch from Lucas Correia Villa Real
This patch defines S3C2400 memory map and adds a S3C24XX macro for
common resources between S3C2400, S3C2410 and S3C2440 cpus.
Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/cpu.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/devs.c | 57 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/sleep.S | 6 |
4 files changed, 35 insertions, 33 deletions
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index 9cbe5eef492b..fc1067783f6d 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
@@ -17,11 +17,12 @@ | |||
17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call | 17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call |
18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT | 18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT |
19 | * 14-Mar-2005 BJD Updated for __iomem | 19 | * 14-Mar-2005 BJD Updated for __iomem |
20 | * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 23 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
23 | 24 | ||
24 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C2410_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 25 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
25 | 26 | ||
26 | #ifndef MHZ | 27 | #ifndef MHZ |
27 | #define MHZ (1000*1000) | 28 | #define MHZ (1000*1000) |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index f58406e6ef5a..b8d994a24d1c 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | 12 | * Modifications: |
13 | * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices | ||
13 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} | 14 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} |
14 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv | 15 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv |
15 | * 29-Aug-2004 BJD Added timers 0 through 3 | 16 | * 29-Aug-2004 BJD Added timers 0 through 3 |
@@ -46,8 +47,8 @@ struct platform_device *s3c24xx_uart_devs[3]; | |||
46 | 47 | ||
47 | static struct resource s3c_usb_resource[] = { | 48 | static struct resource s3c_usb_resource[] = { |
48 | [0] = { | 49 | [0] = { |
49 | .start = S3C2410_PA_USBHOST, | 50 | .start = S3C24XX_PA_USBHOST, |
50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, | 51 | .end = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, |
51 | .flags = IORESOURCE_MEM, | 52 | .flags = IORESOURCE_MEM, |
52 | }, | 53 | }, |
53 | [1] = { | 54 | [1] = { |
@@ -76,8 +77,8 @@ EXPORT_SYMBOL(s3c_device_usb); | |||
76 | 77 | ||
77 | static struct resource s3c_lcd_resource[] = { | 78 | static struct resource s3c_lcd_resource[] = { |
78 | [0] = { | 79 | [0] = { |
79 | .start = S3C2410_PA_LCD, | 80 | .start = S3C24XX_PA_LCD, |
80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, | 81 | .end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1, |
81 | .flags = IORESOURCE_MEM, | 82 | .flags = IORESOURCE_MEM, |
82 | }, | 83 | }, |
83 | [1] = { | 84 | [1] = { |
@@ -139,8 +140,8 @@ EXPORT_SYMBOL(s3c_device_nand); | |||
139 | 140 | ||
140 | static struct resource s3c_usbgadget_resource[] = { | 141 | static struct resource s3c_usbgadget_resource[] = { |
141 | [0] = { | 142 | [0] = { |
142 | .start = S3C2410_PA_USBDEV, | 143 | .start = S3C24XX_PA_USBDEV, |
143 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, | 144 | .end = S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, |
144 | .flags = IORESOURCE_MEM, | 145 | .flags = IORESOURCE_MEM, |
145 | }, | 146 | }, |
146 | [1] = { | 147 | [1] = { |
@@ -164,8 +165,8 @@ EXPORT_SYMBOL(s3c_device_usbgadget); | |||
164 | 165 | ||
165 | static struct resource s3c_wdt_resource[] = { | 166 | static struct resource s3c_wdt_resource[] = { |
166 | [0] = { | 167 | [0] = { |
167 | .start = S3C2410_PA_WATCHDOG, | 168 | .start = S3C24XX_PA_WATCHDOG, |
168 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, | 169 | .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, |
169 | .flags = IORESOURCE_MEM, | 170 | .flags = IORESOURCE_MEM, |
170 | }, | 171 | }, |
171 | [1] = { | 172 | [1] = { |
@@ -189,8 +190,8 @@ EXPORT_SYMBOL(s3c_device_wdt); | |||
189 | 190 | ||
190 | static struct resource s3c_i2c_resource[] = { | 191 | static struct resource s3c_i2c_resource[] = { |
191 | [0] = { | 192 | [0] = { |
192 | .start = S3C2410_PA_IIC, | 193 | .start = S3C24XX_PA_IIC, |
193 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, | 194 | .end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1, |
194 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
195 | }, | 196 | }, |
196 | [1] = { | 197 | [1] = { |
@@ -214,8 +215,8 @@ EXPORT_SYMBOL(s3c_device_i2c); | |||
214 | 215 | ||
215 | static struct resource s3c_iis_resource[] = { | 216 | static struct resource s3c_iis_resource[] = { |
216 | [0] = { | 217 | [0] = { |
217 | .start = S3C2410_PA_IIS, | 218 | .start = S3C24XX_PA_IIS, |
218 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, | 219 | .end = S3C24XX_PA_IIS + S3C24XX_SZ_IIS -1, |
219 | .flags = IORESOURCE_MEM, | 220 | .flags = IORESOURCE_MEM, |
220 | } | 221 | } |
221 | }; | 222 | }; |
@@ -239,8 +240,8 @@ EXPORT_SYMBOL(s3c_device_iis); | |||
239 | 240 | ||
240 | static struct resource s3c_rtc_resource[] = { | 241 | static struct resource s3c_rtc_resource[] = { |
241 | [0] = { | 242 | [0] = { |
242 | .start = S3C2410_PA_RTC, | 243 | .start = S3C24XX_PA_RTC, |
243 | .end = S3C2410_PA_RTC + 0xff, | 244 | .end = S3C24XX_PA_RTC + 0xff, |
244 | .flags = IORESOURCE_MEM, | 245 | .flags = IORESOURCE_MEM, |
245 | }, | 246 | }, |
246 | [1] = { | 247 | [1] = { |
@@ -268,8 +269,8 @@ EXPORT_SYMBOL(s3c_device_rtc); | |||
268 | 269 | ||
269 | static struct resource s3c_adc_resource[] = { | 270 | static struct resource s3c_adc_resource[] = { |
270 | [0] = { | 271 | [0] = { |
271 | .start = S3C2410_PA_ADC, | 272 | .start = S3C24XX_PA_ADC, |
272 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, | 273 | .end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1, |
273 | .flags = IORESOURCE_MEM, | 274 | .flags = IORESOURCE_MEM, |
274 | }, | 275 | }, |
275 | [1] = { | 276 | [1] = { |
@@ -316,8 +317,8 @@ EXPORT_SYMBOL(s3c_device_sdi); | |||
316 | 317 | ||
317 | static struct resource s3c_spi0_resource[] = { | 318 | static struct resource s3c_spi0_resource[] = { |
318 | [0] = { | 319 | [0] = { |
319 | .start = S3C2410_PA_SPI, | 320 | .start = S3C24XX_PA_SPI, |
320 | .end = S3C2410_PA_SPI + 0x1f, | 321 | .end = S3C24XX_PA_SPI + 0x1f, |
321 | .flags = IORESOURCE_MEM, | 322 | .flags = IORESOURCE_MEM, |
322 | }, | 323 | }, |
323 | [1] = { | 324 | [1] = { |
@@ -341,8 +342,8 @@ EXPORT_SYMBOL(s3c_device_spi0); | |||
341 | 342 | ||
342 | static struct resource s3c_spi1_resource[] = { | 343 | static struct resource s3c_spi1_resource[] = { |
343 | [0] = { | 344 | [0] = { |
344 | .start = S3C2410_PA_SPI + 0x20, | 345 | .start = S3C24XX_PA_SPI + 0x20, |
345 | .end = S3C2410_PA_SPI + 0x20 + 0x1f, | 346 | .end = S3C24XX_PA_SPI + 0x20 + 0x1f, |
346 | .flags = IORESOURCE_MEM, | 347 | .flags = IORESOURCE_MEM, |
347 | }, | 348 | }, |
348 | [1] = { | 349 | [1] = { |
@@ -366,8 +367,8 @@ EXPORT_SYMBOL(s3c_device_spi1); | |||
366 | 367 | ||
367 | static struct resource s3c_timer0_resource[] = { | 368 | static struct resource s3c_timer0_resource[] = { |
368 | [0] = { | 369 | [0] = { |
369 | .start = S3C2410_PA_TIMER + 0x0C, | 370 | .start = S3C24XX_PA_TIMER + 0x0C, |
370 | .end = S3C2410_PA_TIMER + 0x0C + 0xB, | 371 | .end = S3C24XX_PA_TIMER + 0x0C + 0xB, |
371 | .flags = IORESOURCE_MEM, | 372 | .flags = IORESOURCE_MEM, |
372 | }, | 373 | }, |
373 | [1] = { | 374 | [1] = { |
@@ -391,8 +392,8 @@ EXPORT_SYMBOL(s3c_device_timer0); | |||
391 | 392 | ||
392 | static struct resource s3c_timer1_resource[] = { | 393 | static struct resource s3c_timer1_resource[] = { |
393 | [0] = { | 394 | [0] = { |
394 | .start = S3C2410_PA_TIMER + 0x18, | 395 | .start = S3C24XX_PA_TIMER + 0x18, |
395 | .end = S3C2410_PA_TIMER + 0x23, | 396 | .end = S3C24XX_PA_TIMER + 0x23, |
396 | .flags = IORESOURCE_MEM, | 397 | .flags = IORESOURCE_MEM, |
397 | }, | 398 | }, |
398 | [1] = { | 399 | [1] = { |
@@ -416,8 +417,8 @@ EXPORT_SYMBOL(s3c_device_timer1); | |||
416 | 417 | ||
417 | static struct resource s3c_timer2_resource[] = { | 418 | static struct resource s3c_timer2_resource[] = { |
418 | [0] = { | 419 | [0] = { |
419 | .start = S3C2410_PA_TIMER + 0x24, | 420 | .start = S3C24XX_PA_TIMER + 0x24, |
420 | .end = S3C2410_PA_TIMER + 0x2F, | 421 | .end = S3C24XX_PA_TIMER + 0x2F, |
421 | .flags = IORESOURCE_MEM, | 422 | .flags = IORESOURCE_MEM, |
422 | }, | 423 | }, |
423 | [1] = { | 424 | [1] = { |
@@ -441,8 +442,8 @@ EXPORT_SYMBOL(s3c_device_timer2); | |||
441 | 442 | ||
442 | static struct resource s3c_timer3_resource[] = { | 443 | static struct resource s3c_timer3_resource[] = { |
443 | [0] = { | 444 | [0] = { |
444 | .start = S3C2410_PA_TIMER + 0x30, | 445 | .start = S3C24XX_PA_TIMER + 0x30, |
445 | .end = S3C2410_PA_TIMER + 0x3B, | 446 | .end = S3C24XX_PA_TIMER + 0x3B, |
446 | .flags = IORESOURCE_MEM, | 447 | .flags = IORESOURCE_MEM, |
447 | }, | 448 | }, |
448 | [1] = { | 449 | [1] = { |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 65feaf20d23e..4dbd8e758ea6 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -1152,7 +1152,7 @@ static int __init s3c2410_init_dma(void) | |||
1152 | 1152 | ||
1153 | printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); | 1153 | printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); |
1154 | 1154 | ||
1155 | dma_base = ioremap(S3C2410_PA_DMA, 0x200); | 1155 | dma_base = ioremap(S3C24XX_PA_DMA, 0x200); |
1156 | if (dma_base == NULL) { | 1156 | if (dma_base == NULL) { |
1157 | printk(KERN_ERR "dma failed to remap register block\n"); | 1157 | printk(KERN_ERR "dma failed to remap register block\n"); |
1158 | return -ENOMEM; | 1158 | return -ENOMEM; |
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index 61768dac7fee..e9a055b779b7 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S | |||
@@ -133,12 +133,12 @@ ENTRY(s3c2410_cpu_resume) | |||
133 | @@ load UART to allow us to print the two characters for | 133 | @@ load UART to allow us to print the two characters for |
134 | @@ resume debug | 134 | @@ resume debug |
135 | 135 | ||
136 | mov r2, #S3C2410_PA_UART & 0xff000000 | 136 | mov r2, #S3C24XX_PA_UART & 0xff000000 |
137 | orr r2, r2, #S3C2410_PA_UART & 0xff000 | 137 | orr r2, r2, #S3C24XX_PA_UART & 0xff000 |
138 | 138 | ||
139 | #if 0 | 139 | #if 0 |
140 | /* SMDK2440 LED set */ | 140 | /* SMDK2440 LED set */ |
141 | mov r14, #S3C2410_PA_GPIO | 141 | mov r14, #S3C24XX_PA_GPIO |
142 | ldr r12, [ r14, #0x54 ] | 142 | ldr r12, [ r14, #0x54 ] |
143 | bic r12, r12, #3<<4 | 143 | bic r12, r12, #3<<4 |
144 | orr r12, r12, #1<<7 | 144 | orr r12, r12, #1<<7 |