diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-07 01:47:12 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-07 01:47:12 -0500 |
commit | 3c9b3a8575b4f2551e3b5b74ffa1c3559c6338eb (patch) | |
tree | 7f8d84353852401ec74e005f6f0b1eb958b9a70d /include/asm-arm | |
parent | c0d3c0c0ce94d3db893577ae98e64414d92e49d8 (diff) | |
parent | c03296a868ae7c91aa2d8b372184763b18f16d7a (diff) |
Merge branch 'master'
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-s3c2410/debug-macro.S | 6 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/hardware.h | 7 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/map.h | 38 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-gpio.h | 22 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-serial.h | 6 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/uncompress.h | 6 | ||||
-rw-r--r-- | include/asm-arm/checksum.h | 2 | ||||
-rw-r--r-- | include/asm-arm/mach/map.h | 1 | ||||
-rw-r--r-- | include/asm-arm/pgtable.h | 1 |
9 files changed, 79 insertions, 10 deletions
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index abfbe45cd17c..5f8223e700d3 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -25,7 +25,7 @@ | |||
25 | .macro addruart, rx | 25 | .macro addruart, rx |
26 | mrc p15, 0, \rx, c1, c0 | 26 | mrc p15, 0, \rx, c1, c0 |
27 | tst \rx, #1 | 27 | tst \rx, #1 |
28 | ldreq \rx, = S3C2410_PA_UART | 28 | ldreq \rx, = S3C24XX_PA_UART |
29 | ldrne \rx, = S3C24XX_VA_UART | 29 | ldrne \rx, = S3C24XX_VA_UART |
30 | #if CONFIG_DEBUG_S3C2410_UART != 0 | 30 | #if CONFIG_DEBUG_S3C2410_UART != 0 |
31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) | 31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) |
@@ -44,7 +44,7 @@ | |||
44 | 1003: | 44 | 1003: |
45 | mrc p15, 0, \rd, c1, c0 | 45 | mrc p15, 0, \rd, c1, c0 |
46 | tst \rd, #1 | 46 | tst \rd, #1 |
47 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 47 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
49 | bic \rd, \rd, #0xff000 | 49 | bic \rd, \rd, #0xff000 |
50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
@@ -75,7 +75,7 @@ | |||
75 | 1003: | 75 | 1003: |
76 | mrc p15, 0, \rd, c1, c0 | 76 | mrc p15, 0, \rd, c1, c0 |
77 | tst \rd, #1 | 77 | tst \rd, #1 |
78 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 78 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
80 | bic \rd, \rd, #0xff000 | 80 | bic \rd, \rd, #0xff000 |
81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 1c9de29cafef..a2330bf83695 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | 17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio |
18 | * 01-Oct-2004 BJD Added the new gpio functions | 18 | * 01-Oct-2004 BJD Added the new gpio functions |
19 | * 16-Oct-2004 BJD Removed the clock variables | 19 | * 16-Oct-2004 BJD Removed the clock variables |
20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #ifndef __ASM_ARCH_HARDWARE_H | 23 | #ifndef __ASM_ARCH_HARDWARE_H |
@@ -55,6 +56,12 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | |||
55 | 56 | ||
56 | extern int s3c2410_gpio_getirq(unsigned int pin); | 57 | extern int s3c2410_gpio_getirq(unsigned int pin); |
57 | 58 | ||
59 | #ifdef CONFIG_CPU_S3C2400 | ||
60 | |||
61 | extern int s3c2400_gpio_getirq(unsigned int pin); | ||
62 | |||
63 | #endif /* CONFIG_CPU_S3C2400 */ | ||
64 | |||
58 | /* s3c2410_gpio_irqfilter | 65 | /* s3c2410_gpio_irqfilter |
59 | * | 66 | * |
60 | * set the irq filtering on the given pin | 67 | * set the irq filtering on the given pin |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 1833ea5c4220..c380d264a847 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -14,6 +14,7 @@ | |||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | 14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out |
15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | 15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv |
16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | 16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names |
17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
17 | */ | 18 | */ |
18 | 19 | ||
19 | #ifndef __ASM_ARCH_MAP_H | 20 | #ifndef __ASM_ARCH_MAP_H |
@@ -188,5 +189,42 @@ | |||
188 | 189 | ||
189 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | 190 | #define S3C2400_SDRAM_PA (S3C2400_CS6) |
190 | 191 | ||
192 | /* Use a single interface for common resources between S3C24XX cpus */ | ||
193 | |||
194 | #ifdef CONFIG_CPU_S3C2400 | ||
195 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
196 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
197 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
198 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
199 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
200 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
201 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
202 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
203 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
204 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
205 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
206 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
207 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
208 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
209 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
210 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
211 | #else | ||
212 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ | ||
213 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL | ||
214 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST | ||
215 | #define S3C24XX_PA_DMA S3C2410_PA_DMA | ||
216 | #define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR | ||
217 | #define S3C24XX_PA_LCD S3C2410_PA_LCD | ||
218 | #define S3C24XX_PA_UART S3C2410_PA_UART | ||
219 | #define S3C24XX_PA_TIMER S3C2410_PA_TIMER | ||
220 | #define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV | ||
221 | #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG | ||
222 | #define S3C24XX_PA_IIC S3C2410_PA_IIC | ||
223 | #define S3C24XX_PA_IIS S3C2410_PA_IIS | ||
224 | #define S3C24XX_PA_GPIO S3C2410_PA_GPIO | ||
225 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | ||
226 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | ||
227 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | ||
228 | #endif | ||
191 | 229 | ||
192 | #endif /* __ASM_ARCH_MAP_H */ | 230 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 7f1be48ad67e..9697f93afe74 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -22,6 +22,7 @@ | |||
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | 22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 |
23 | * 26-Oct-2005 BJD Added generic configuration types | 23 | * 26-Oct-2005 BJD Added generic configuration types |
24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | 24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers |
25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
25 | */ | 26 | */ |
26 | 27 | ||
27 | 28 | ||
@@ -39,6 +40,27 @@ | |||
39 | #define S3C2410_GPIO_BANKG (32*6) | 40 | #define S3C2410_GPIO_BANKG (32*6) |
40 | #define S3C2410_GPIO_BANKH (32*7) | 41 | #define S3C2410_GPIO_BANKH (32*7) |
41 | 42 | ||
43 | #ifdef CONFIG_CPU_S3C2400 | ||
44 | #define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x) | ||
45 | #define S3C24XX_MISCCR S3C2400_MISCCR | ||
46 | #else | ||
47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) | ||
48 | #define S3C24XX_MISCCR S3C2410_MISCCR | ||
49 | #endif /* CONFIG_CPU_S3C2400 */ | ||
50 | |||
51 | |||
52 | /* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */ | ||
53 | |||
54 | #define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32) | ||
55 | #define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2)) | ||
56 | #define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \ | ||
57 | (2 * (S3C2400_BANKNUM(pin)-2))) | ||
58 | |||
59 | #define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \ | ||
60 | S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \ | ||
61 | S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO) | ||
62 | |||
63 | |||
42 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) | 64 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) |
43 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) | 65 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) |
44 | 66 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index ce1bbbaad6d3..83b01254c4ac 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) |
40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) |
41 | 41 | ||
42 | #define S3C2410_PA_UART0 (S3C2410_PA_UART) | 42 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
43 | #define S3C2410_PA_UART1 (S3C2410_PA_UART + 0x4000 ) | 43 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
44 | #define S3C2410_PA_UART2 (S3C2410_PA_UART + 0x8000 ) | 44 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) |
45 | 45 | ||
46 | #define S3C2410_URXH (0x24) | 46 | #define S3C2410_URXH (0x24) |
47 | #define S3C2410_UTXH (0x20) | 47 | #define S3C2410_UTXH (0x20) |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index ddd1578a7ee0..4367ec054b51 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -35,13 +35,13 @@ | |||
35 | #undef S3C2410_GPIOREG | 35 | #undef S3C2410_GPIOREG |
36 | #undef S3C2410_WDOGREG | 36 | #undef S3C2410_WDOGREG |
37 | 37 | ||
38 | #define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) | 38 | #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) |
39 | #define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) | 39 | #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) |
40 | 40 | ||
41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ |
42 | #define FIFO_MAX (14) | 42 | #define FIFO_MAX (14) |
43 | 43 | ||
44 | #define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) | 44 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) |
45 | 45 | ||
46 | static __inline__ void | 46 | static __inline__ void |
47 | uart_wr(unsigned int reg, unsigned int val) | 47 | uart_wr(unsigned int reg, unsigned int val) |
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h index d4256d5f3a7c..747bdd31a74b 100644 --- a/include/asm-arm/checksum.h +++ b/include/asm-arm/checksum.h | |||
@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl) | |||
77 | mov %0, %0, lsr #16" | 77 | mov %0, %0, lsr #16" |
78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) | 78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) |
79 | : "1" (iph), "2" (ihl) | 79 | : "1" (iph), "2" (ihl) |
80 | : "cc"); | 80 | : "cc", "memory"); |
81 | return sum; | 81 | return sum; |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index 3351b77fab36..e8ea67c97c73 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -26,6 +26,7 @@ struct meminfo; | |||
26 | #define MT_MEMORY 5 | 26 | #define MT_MEMORY 5 |
27 | #define MT_ROM 6 | 27 | #define MT_ROM 6 |
28 | #define MT_IXP2000_DEVICE 7 | 28 | #define MT_IXP2000_DEVICE 7 |
29 | #define MT_NONSHARED_DEVICE 8 | ||
29 | 30 | ||
30 | extern void create_memmap_holes(struct meminfo *); | 31 | extern void create_memmap_holes(struct meminfo *); |
31 | extern void memtable_init(struct meminfo *); | 32 | extern void memtable_init(struct meminfo *); |
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 5a0d19b466b0..70e00d08345e 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -168,6 +168,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | 169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) |
170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
171 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
171 | 172 | ||
172 | /* | 173 | /* |
173 | * - coarse table (not used) | 174 | * - coarse table (not used) |