diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-29 03:55:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-29 03:55:47 -0500 |
commit | b71d4da092801634d04190693a38ca03bdbe2505 (patch) | |
tree | e4adc88ade5832b844768c114b15d4d97253c4d0 /include | |
parent | 656563e32c3f1dfdc35b3944305ece1c5dfeade5 (diff) | |
parent | 624f54be206adf970cd8eece16446b027913e533 (diff) |
Merge branch 'master'
Diffstat (limited to 'include')
47 files changed, 498 insertions, 191 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h index 36505bb4e8cb..6183eab006d4 100644 --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h | |||
@@ -118,8 +118,6 @@ static __inline__ long atomic_add_return(int i, atomic_t * v) | |||
118 | return result; | 118 | return result; |
119 | } | 119 | } |
120 | 120 | ||
121 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
122 | |||
123 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) | 121 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) |
124 | { | 122 | { |
125 | long temp, result; | 123 | long temp, result; |
@@ -189,6 +187,9 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
189 | }) | 187 | }) |
190 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 188 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
191 | 189 | ||
190 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
191 | #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) | ||
192 | |||
192 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) | 193 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) |
193 | #define atomic64_dec_return(v) atomic64_sub_return(1,(v)) | 194 | #define atomic64_dec_return(v) atomic64_sub_return(1,(v)) |
194 | 195 | ||
@@ -199,6 +200,8 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
199 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0) | 200 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0) |
200 | 201 | ||
201 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | 202 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) |
203 | #define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0) | ||
204 | |||
202 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 205 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
203 | #define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0) | 206 | #define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0) |
204 | 207 | ||
diff --git a/include/asm-arm/arch-ebsa110/io.h b/include/asm-arm/arch-ebsa110/io.h index 68e04c0bb3f7..ae048441c9ed 100644 --- a/include/asm-arm/arch-ebsa110/io.h +++ b/include/asm-arm/arch-ebsa110/io.h | |||
@@ -64,7 +64,7 @@ void __writel(u32 val, void __iomem *addr); | |||
64 | #define writew(v,b) __writew(v,b) | 64 | #define writew(v,b) __writew(v,b) |
65 | #define writel(v,b) __writel(v,b) | 65 | #define writel(v,b) __writel(v,b) |
66 | 66 | ||
67 | #define __arch_ioremap(cookie,sz,c,a) ((void __iomem *)(cookie)) | 67 | #define __arch_ioremap(cookie,sz,c) ((void __iomem *)(cookie)) |
68 | #define __arch_iounmap(cookie) do { } while (0) | 68 | #define __arch_iounmap(cookie) do { } while (0) |
69 | 69 | ||
70 | extern void insb(unsigned int port, void *buf, int sz); | 70 | extern void insb(unsigned int port, void *buf, int sz); |
diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h index d4187fe9a85a..472badb451c4 100644 --- a/include/asm-arm/arch-iop3xx/timex.h +++ b/include/asm-arm/arch-iop3xx/timex.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * IOP3xx architecture timex specifications | 4 | * IOP3xx architecture timex specifications |
5 | */ | 5 | */ |
6 | #include <linux/config.h> | 6 | #include <linux/config.h> |
7 | 7 | #include <asm/hardware.h> | |
8 | 8 | ||
9 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) | 9 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) |
10 | 10 | ||
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h index 2b149ed59149..9444958bec1e 100644 --- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h +++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h | |||
@@ -47,6 +47,7 @@ | |||
47 | * Queue Manager | 47 | * Queue Manager |
48 | */ | 48 | */ |
49 | #define IXP4XX_QMGR_BASE_PHYS (0x60000000) | 49 | #define IXP4XX_QMGR_BASE_PHYS (0x60000000) |
50 | #define IXP4XX_QMGR_REGION_SIZE (0x00004000) | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * Expansion BUS Configuration registers | 53 | * Expansion BUS Configuration registers |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index cb33d57c146c..7f1be48ad67e 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -21,6 +21,7 @@ | |||
21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
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 | */ | 25 | */ |
25 | 26 | ||
26 | 27 | ||
@@ -54,12 +55,16 @@ | |||
54 | 55 | ||
55 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) | 56 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) |
56 | 57 | ||
57 | /* port A - 22bits, zero in bit X makes pin X output | 58 | /* port A - S3C2410: 22bits, zero in bit X makes pin X output |
59 | * S3C2400: 18bits, zero in bit X makes pin X output | ||
58 | * 1 makes port special function, this is default | 60 | * 1 makes port special function, this is default |
59 | */ | 61 | */ |
60 | #define S3C2410_GPACON S3C2410_GPIOREG(0x00) | 62 | #define S3C2410_GPACON S3C2410_GPIOREG(0x00) |
61 | #define S3C2410_GPADAT S3C2410_GPIOREG(0x04) | 63 | #define S3C2410_GPADAT S3C2410_GPIOREG(0x04) |
62 | 64 | ||
65 | #define S3C2400_GPACON S3C2410_GPIOREG(0x00) | ||
66 | #define S3C2400_GPADAT S3C2410_GPIOREG(0x04) | ||
67 | |||
63 | #define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0) | 68 | #define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0) |
64 | #define S3C2410_GPA0_OUT (0<<0) | 69 | #define S3C2410_GPA0_OUT (0<<0) |
65 | #define S3C2410_GPA0_ADDR0 (1<<0) | 70 | #define S3C2410_GPA0_ADDR0 (1<<0) |
@@ -103,34 +108,42 @@ | |||
103 | #define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10) | 108 | #define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10) |
104 | #define S3C2410_GPA10_OUT (0<<10) | 109 | #define S3C2410_GPA10_OUT (0<<10) |
105 | #define S3C2410_GPA10_ADDR25 (1<<10) | 110 | #define S3C2410_GPA10_ADDR25 (1<<10) |
111 | #define S3C2400_GPA10_SCKE (1<<10) | ||
106 | 112 | ||
107 | #define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11) | 113 | #define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11) |
108 | #define S3C2410_GPA11_OUT (0<<11) | 114 | #define S3C2410_GPA11_OUT (0<<11) |
109 | #define S3C2410_GPA11_ADDR26 (1<<11) | 115 | #define S3C2410_GPA11_ADDR26 (1<<11) |
116 | #define S3C2400_GPA11_nCAS0 (1<<11) | ||
110 | 117 | ||
111 | #define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12) | 118 | #define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12) |
112 | #define S3C2410_GPA12_OUT (0<<12) | 119 | #define S3C2410_GPA12_OUT (0<<12) |
113 | #define S3C2410_GPA12_nGCS1 (1<<12) | 120 | #define S3C2410_GPA12_nGCS1 (1<<12) |
121 | #define S3C2400_GPA12_nCAS1 (1<<12) | ||
114 | 122 | ||
115 | #define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13) | 123 | #define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13) |
116 | #define S3C2410_GPA13_OUT (0<<13) | 124 | #define S3C2410_GPA13_OUT (0<<13) |
117 | #define S3C2410_GPA13_nGCS2 (1<<13) | 125 | #define S3C2410_GPA13_nGCS2 (1<<13) |
126 | #define S3C2400_GPA13_nGCS1 (1<<13) | ||
118 | 127 | ||
119 | #define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14) | 128 | #define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14) |
120 | #define S3C2410_GPA14_OUT (0<<14) | 129 | #define S3C2410_GPA14_OUT (0<<14) |
121 | #define S3C2410_GPA14_nGCS3 (1<<14) | 130 | #define S3C2410_GPA14_nGCS3 (1<<14) |
131 | #define S3C2400_GPA14_nGCS2 (1<<14) | ||
122 | 132 | ||
123 | #define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15) | 133 | #define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15) |
124 | #define S3C2410_GPA15_OUT (0<<15) | 134 | #define S3C2410_GPA15_OUT (0<<15) |
125 | #define S3C2410_GPA15_nGCS4 (1<<15) | 135 | #define S3C2410_GPA15_nGCS4 (1<<15) |
136 | #define S3C2400_GPA15_nGCS3 (1<<15) | ||
126 | 137 | ||
127 | #define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16) | 138 | #define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16) |
128 | #define S3C2410_GPA16_OUT (0<<16) | 139 | #define S3C2410_GPA16_OUT (0<<16) |
129 | #define S3C2410_GPA16_nGCS5 (1<<16) | 140 | #define S3C2410_GPA16_nGCS5 (1<<16) |
141 | #define S3C2400_GPA16_nGCS4 (1<<16) | ||
130 | 142 | ||
131 | #define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17) | 143 | #define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17) |
132 | #define S3C2410_GPA17_OUT (0<<17) | 144 | #define S3C2410_GPA17_OUT (0<<17) |
133 | #define S3C2410_GPA17_CLE (1<<17) | 145 | #define S3C2410_GPA17_CLE (1<<17) |
146 | #define S3C2400_GPA17_nGCS5 (1<<17) | ||
134 | 147 | ||
135 | #define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18) | 148 | #define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18) |
136 | #define S3C2410_GPA18_OUT (0<<18) | 149 | #define S3C2410_GPA18_OUT (0<<18) |
@@ -152,10 +165,16 @@ | |||
152 | #define S3C2410_GPA22_OUT (0<<22) | 165 | #define S3C2410_GPA22_OUT (0<<22) |
153 | #define S3C2410_GPA22_nFCE (1<<22) | 166 | #define S3C2410_GPA22_nFCE (1<<22) |
154 | 167 | ||
155 | /* 0x08 and 0x0c are reserved */ | 168 | /* 0x08 and 0x0c are reserved on S3C2410 */ |
156 | 169 | ||
157 | /* GPB is 10 IO pins, each configured by 2 bits each in GPBCON. | 170 | /* S3C2410: |
171 | * GPB is 10 IO pins, each configured by 2 bits each in GPBCON. | ||
158 | * 00 = input, 01 = output, 10=special function, 11=reserved | 172 | * 00 = input, 01 = output, 10=special function, 11=reserved |
173 | |||
174 | * S3C2400: | ||
175 | * GPB is 16 IO pins, each configured by 2 bits each in GPBCON. | ||
176 | * 00 = input, 01 = output, 10=data, 11=special function | ||
177 | |||
159 | * bit 0,1 = pin 0, 2,3= pin 1... | 178 | * bit 0,1 = pin 0, 2,3= pin 1... |
160 | * | 179 | * |
161 | * CPBUP = pull up resistor control, 1=disabled, 0=enabled | 180 | * CPBUP = pull up resistor control, 1=disabled, 0=enabled |
@@ -165,63 +184,113 @@ | |||
165 | #define S3C2410_GPBDAT S3C2410_GPIOREG(0x14) | 184 | #define S3C2410_GPBDAT S3C2410_GPIOREG(0x14) |
166 | #define S3C2410_GPBUP S3C2410_GPIOREG(0x18) | 185 | #define S3C2410_GPBUP S3C2410_GPIOREG(0x18) |
167 | 186 | ||
187 | #define S3C2400_GPBCON S3C2410_GPIOREG(0x08) | ||
188 | #define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C) | ||
189 | #define S3C2400_GPBUP S3C2410_GPIOREG(0x10) | ||
190 | |||
168 | /* no i/o pin in port b can have value 3! */ | 191 | /* no i/o pin in port b can have value 3! */ |
169 | 192 | ||
170 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) | 193 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) |
171 | #define S3C2410_GPB0_INP (0x00 << 0) | 194 | #define S3C2410_GPB0_INP (0x00 << 0) |
172 | #define S3C2410_GPB0_OUTP (0x01 << 0) | 195 | #define S3C2410_GPB0_OUTP (0x01 << 0) |
173 | #define S3C2410_GPB0_TOUT0 (0x02 << 0) | 196 | #define S3C2410_GPB0_TOUT0 (0x02 << 0) |
197 | #define S3C2400_GPB0_DATA16 (0x02 << 0) | ||
174 | 198 | ||
175 | #define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1) | 199 | #define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1) |
176 | #define S3C2410_GPB1_INP (0x00 << 2) | 200 | #define S3C2410_GPB1_INP (0x00 << 2) |
177 | #define S3C2410_GPB1_OUTP (0x01 << 2) | 201 | #define S3C2410_GPB1_OUTP (0x01 << 2) |
178 | #define S3C2410_GPB1_TOUT1 (0x02 << 2) | 202 | #define S3C2410_GPB1_TOUT1 (0x02 << 2) |
203 | #define S3C2400_GPB1_DATA17 (0x02 << 2) | ||
179 | 204 | ||
180 | #define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2) | 205 | #define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2) |
181 | #define S3C2410_GPB2_INP (0x00 << 4) | 206 | #define S3C2410_GPB2_INP (0x00 << 4) |
182 | #define S3C2410_GPB2_OUTP (0x01 << 4) | 207 | #define S3C2410_GPB2_OUTP (0x01 << 4) |
183 | #define S3C2410_GPB2_TOUT2 (0x02 << 4) | 208 | #define S3C2410_GPB2_TOUT2 (0x02 << 4) |
209 | #define S3C2400_GPB2_DATA18 (0x02 << 4) | ||
210 | #define S3C2400_GPB2_TCLK1 (0x03 << 4) | ||
184 | 211 | ||
185 | #define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3) | 212 | #define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3) |
186 | #define S3C2410_GPB3_INP (0x00 << 6) | 213 | #define S3C2410_GPB3_INP (0x00 << 6) |
187 | #define S3C2410_GPB3_OUTP (0x01 << 6) | 214 | #define S3C2410_GPB3_OUTP (0x01 << 6) |
188 | #define S3C2410_GPB3_TOUT3 (0x02 << 6) | 215 | #define S3C2410_GPB3_TOUT3 (0x02 << 6) |
216 | #define S3C2400_GPB3_DATA19 (0x02 << 6) | ||
217 | #define S3C2400_GPB3_TXD1 (0x03 << 6) | ||
189 | 218 | ||
190 | #define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4) | 219 | #define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4) |
191 | #define S3C2410_GPB4_INP (0x00 << 8) | 220 | #define S3C2410_GPB4_INP (0x00 << 8) |
192 | #define S3C2410_GPB4_OUTP (0x01 << 8) | 221 | #define S3C2410_GPB4_OUTP (0x01 << 8) |
193 | #define S3C2410_GPB4_TCLK0 (0x02 << 8) | 222 | #define S3C2410_GPB4_TCLK0 (0x02 << 8) |
223 | #define S3C2400_GPB4_DATA20 (0x02 << 8) | ||
194 | #define S3C2410_GPB4_MASK (0x03 << 8) | 224 | #define S3C2410_GPB4_MASK (0x03 << 8) |
225 | #define S3C2400_GPB4_RXD1 (0x03 << 8) | ||
226 | #define S3C2400_GPB4_MASK (0x03 << 8) | ||
195 | 227 | ||
196 | #define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5) | 228 | #define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5) |
197 | #define S3C2410_GPB5_INP (0x00 << 10) | 229 | #define S3C2410_GPB5_INP (0x00 << 10) |
198 | #define S3C2410_GPB5_OUTP (0x01 << 10) | 230 | #define S3C2410_GPB5_OUTP (0x01 << 10) |
199 | #define S3C2410_GPB5_nXBACK (0x02 << 10) | 231 | #define S3C2410_GPB5_nXBACK (0x02 << 10) |
232 | #define S3C2400_GPB5_DATA21 (0x02 << 10) | ||
233 | #define S3C2400_GPB5_nCTS1 (0x03 << 10) | ||
200 | 234 | ||
201 | #define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6) | 235 | #define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6) |
202 | #define S3C2410_GPB6_INP (0x00 << 12) | 236 | #define S3C2410_GPB6_INP (0x00 << 12) |
203 | #define S3C2410_GPB6_OUTP (0x01 << 12) | 237 | #define S3C2410_GPB6_OUTP (0x01 << 12) |
204 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) | 238 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) |
239 | #define S3C2400_GPB6_DATA22 (0x02 << 12) | ||
240 | #define S3C2400_GPB6_nRTS1 (0x03 << 12) | ||
205 | 241 | ||
206 | #define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7) | 242 | #define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7) |
207 | #define S3C2410_GPB7_INP (0x00 << 14) | 243 | #define S3C2410_GPB7_INP (0x00 << 14) |
208 | #define S3C2410_GPB7_OUTP (0x01 << 14) | 244 | #define S3C2410_GPB7_OUTP (0x01 << 14) |
209 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) | 245 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) |
246 | #define S3C2400_GPB7_DATA23 (0x02 << 14) | ||
210 | 247 | ||
211 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) | 248 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) |
212 | #define S3C2410_GPB8_INP (0x00 << 16) | 249 | #define S3C2410_GPB8_INP (0x00 << 16) |
213 | #define S3C2410_GPB8_OUTP (0x01 << 16) | 250 | #define S3C2410_GPB8_OUTP (0x01 << 16) |
214 | #define S3C2410_GPB8_nXDREQ1 (0x02 << 16) | 251 | #define S3C2410_GPB8_nXDREQ1 (0x02 << 16) |
252 | #define S3C2400_GPB8_DATA24 (0x02 << 16) | ||
215 | 253 | ||
216 | #define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9) | 254 | #define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9) |
217 | #define S3C2410_GPB9_INP (0x00 << 18) | 255 | #define S3C2410_GPB9_INP (0x00 << 18) |
218 | #define S3C2410_GPB9_OUTP (0x01 << 18) | 256 | #define S3C2410_GPB9_OUTP (0x01 << 18) |
219 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) | 257 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) |
258 | #define S3C2400_GPB9_DATA25 (0x02 << 18) | ||
259 | #define S3C2400_GPB9_I2SSDI (0x03 << 18) | ||
220 | 260 | ||
221 | #define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10) | 261 | #define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10) |
222 | #define S3C2410_GPB10_INP (0x00 << 20) | 262 | #define S3C2410_GPB10_INP (0x00 << 20) |
223 | #define S3C2410_GPB10_OUTP (0x01 << 20) | 263 | #define S3C2410_GPB10_OUTP (0x01 << 20) |
224 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) | 264 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) |
265 | #define S3C2400_GPB10_DATA26 (0x02 << 20) | ||
266 | #define S3C2400_GPB10_nSS (0x03 << 20) | ||
267 | |||
268 | #define S3C2400_GPB11 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 11) | ||
269 | #define S3C2400_GPB11_INP (0x00 << 22) | ||
270 | #define S3C2400_GPB11_OUTP (0x01 << 22) | ||
271 | #define S3C2400_GPB11_DATA27 (0x02 << 22) | ||
272 | |||
273 | #define S3C2400_GPB12 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 12) | ||
274 | #define S3C2400_GPB12_INP (0x00 << 24) | ||
275 | #define S3C2400_GPB12_OUTP (0x01 << 24) | ||
276 | #define S3C2400_GPB12_DATA28 (0x02 << 24) | ||
277 | |||
278 | #define S3C2400_GPB13 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 13) | ||
279 | #define S3C2400_GPB13_INP (0x00 << 26) | ||
280 | #define S3C2400_GPB13_OUTP (0x01 << 26) | ||
281 | #define S3C2400_GPB13_DATA29 (0x02 << 26) | ||
282 | |||
283 | #define S3C2400_GPB14 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 14) | ||
284 | #define S3C2400_GPB14_INP (0x00 << 28) | ||
285 | #define S3C2400_GPB14_OUTP (0x01 << 28) | ||
286 | #define S3C2400_GPB14_DATA30 (0x02 << 28) | ||
287 | |||
288 | #define S3C2400_GPB15 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 15) | ||
289 | #define S3C2400_GPB15_INP (0x00 << 30) | ||
290 | #define S3C2400_GPB15_OUTP (0x01 << 30) | ||
291 | #define S3C2400_GPB15_DATA31 (0x02 << 30) | ||
292 | |||
293 | #define S3C2410_GPB_PUPDIS(x) (1<<(x)) | ||
225 | 294 | ||
226 | /* Port C consits of 16 GPIO/Special function | 295 | /* Port C consits of 16 GPIO/Special function |
227 | * | 296 | * |
@@ -233,150 +302,193 @@ | |||
233 | #define S3C2410_GPCDAT S3C2410_GPIOREG(0x24) | 302 | #define S3C2410_GPCDAT S3C2410_GPIOREG(0x24) |
234 | #define S3C2410_GPCUP S3C2410_GPIOREG(0x28) | 303 | #define S3C2410_GPCUP S3C2410_GPIOREG(0x28) |
235 | 304 | ||
305 | #define S3C2400_GPCCON S3C2410_GPIOREG(0x14) | ||
306 | #define S3C2400_GPCDAT S3C2410_GPIOREG(0x18) | ||
307 | #define S3C2400_GPCUP S3C2410_GPIOREG(0x1C) | ||
308 | |||
236 | #define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0) | 309 | #define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0) |
237 | #define S3C2410_GPC0_INP (0x00 << 0) | 310 | #define S3C2410_GPC0_INP (0x00 << 0) |
238 | #define S3C2410_GPC0_OUTP (0x01 << 0) | 311 | #define S3C2410_GPC0_OUTP (0x01 << 0) |
239 | #define S3C2410_GPC0_LEND (0x02 << 0) | 312 | #define S3C2410_GPC0_LEND (0x02 << 0) |
313 | #define S3C2400_GPC0_VD0 (0x02 << 0) | ||
240 | 314 | ||
241 | #define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1) | 315 | #define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1) |
242 | #define S3C2410_GPC1_INP (0x00 << 2) | 316 | #define S3C2410_GPC1_INP (0x00 << 2) |
243 | #define S3C2410_GPC1_OUTP (0x01 << 2) | 317 | #define S3C2410_GPC1_OUTP (0x01 << 2) |
244 | #define S3C2410_GPC1_VCLK (0x02 << 2) | 318 | #define S3C2410_GPC1_VCLK (0x02 << 2) |
319 | #define S3C2400_GPC1_VD1 (0x02 << 2) | ||
245 | 320 | ||
246 | #define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2) | 321 | #define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2) |
247 | #define S3C2410_GPC2_INP (0x00 << 4) | 322 | #define S3C2410_GPC2_INP (0x00 << 4) |
248 | #define S3C2410_GPC2_OUTP (0x01 << 4) | 323 | #define S3C2410_GPC2_OUTP (0x01 << 4) |
249 | #define S3C2410_GPC2_VLINE (0x02 << 4) | 324 | #define S3C2410_GPC2_VLINE (0x02 << 4) |
325 | #define S3C2400_GPC2_VD2 (0x02 << 4) | ||
250 | 326 | ||
251 | #define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3) | 327 | #define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3) |
252 | #define S3C2410_GPC3_INP (0x00 << 6) | 328 | #define S3C2410_GPC3_INP (0x00 << 6) |
253 | #define S3C2410_GPC3_OUTP (0x01 << 6) | 329 | #define S3C2410_GPC3_OUTP (0x01 << 6) |
254 | #define S3C2410_GPC3_VFRAME (0x02 << 6) | 330 | #define S3C2410_GPC3_VFRAME (0x02 << 6) |
331 | #define S3C2400_GPC3_VD3 (0x02 << 6) | ||
255 | 332 | ||
256 | #define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4) | 333 | #define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4) |
257 | #define S3C2410_GPC4_INP (0x00 << 8) | 334 | #define S3C2410_GPC4_INP (0x00 << 8) |
258 | #define S3C2410_GPC4_OUTP (0x01 << 8) | 335 | #define S3C2410_GPC4_OUTP (0x01 << 8) |
259 | #define S3C2410_GPC4_VM (0x02 << 8) | 336 | #define S3C2410_GPC4_VM (0x02 << 8) |
337 | #define S3C2400_GPC4_VD4 (0x02 << 8) | ||
260 | 338 | ||
261 | #define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5) | 339 | #define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5) |
262 | #define S3C2410_GPC5_INP (0x00 << 10) | 340 | #define S3C2410_GPC5_INP (0x00 << 10) |
263 | #define S3C2410_GPC5_OUTP (0x01 << 10) | 341 | #define S3C2410_GPC5_OUTP (0x01 << 10) |
264 | #define S3C2410_GPC5_LCDVF0 (0x02 << 10) | 342 | #define S3C2410_GPC5_LCDVF0 (0x02 << 10) |
343 | #define S3C2400_GPC5_VD5 (0x02 << 10) | ||
265 | 344 | ||
266 | #define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6) | 345 | #define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6) |
267 | #define S3C2410_GPC6_INP (0x00 << 12) | 346 | #define S3C2410_GPC6_INP (0x00 << 12) |
268 | #define S3C2410_GPC6_OUTP (0x01 << 12) | 347 | #define S3C2410_GPC6_OUTP (0x01 << 12) |
269 | #define S3C2410_GPC6_LCDVF1 (0x02 << 12) | 348 | #define S3C2410_GPC6_LCDVF1 (0x02 << 12) |
349 | #define S3C2400_GPC6_VD6 (0x02 << 12) | ||
270 | 350 | ||
271 | #define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7) | 351 | #define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7) |
272 | #define S3C2410_GPC7_INP (0x00 << 14) | 352 | #define S3C2410_GPC7_INP (0x00 << 14) |
273 | #define S3C2410_GPC7_OUTP (0x01 << 14) | 353 | #define S3C2410_GPC7_OUTP (0x01 << 14) |
274 | #define S3C2410_GPC7_LCDVF2 (0x02 << 14) | 354 | #define S3C2410_GPC7_LCDVF2 (0x02 << 14) |
355 | #define S3C2400_GPC7_VD7 (0x02 << 14) | ||
275 | 356 | ||
276 | #define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8) | 357 | #define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8) |
277 | #define S3C2410_GPC8_INP (0x00 << 16) | 358 | #define S3C2410_GPC8_INP (0x00 << 16) |
278 | #define S3C2410_GPC8_OUTP (0x01 << 16) | 359 | #define S3C2410_GPC8_OUTP (0x01 << 16) |
279 | #define S3C2410_GPC8_VD0 (0x02 << 16) | 360 | #define S3C2410_GPC8_VD0 (0x02 << 16) |
361 | #define S3C2400_GPC8_VD8 (0x02 << 16) | ||
280 | 362 | ||
281 | #define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9) | 363 | #define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9) |
282 | #define S3C2410_GPC9_INP (0x00 << 18) | 364 | #define S3C2410_GPC9_INP (0x00 << 18) |
283 | #define S3C2410_GPC9_OUTP (0x01 << 18) | 365 | #define S3C2410_GPC9_OUTP (0x01 << 18) |
284 | #define S3C2410_GPC9_VD1 (0x02 << 18) | 366 | #define S3C2410_GPC9_VD1 (0x02 << 18) |
367 | #define S3C2400_GPC9_VD9 (0x02 << 18) | ||
285 | 368 | ||
286 | #define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10) | 369 | #define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10) |
287 | #define S3C2410_GPC10_INP (0x00 << 20) | 370 | #define S3C2410_GPC10_INP (0x00 << 20) |
288 | #define S3C2410_GPC10_OUTP (0x01 << 20) | 371 | #define S3C2410_GPC10_OUTP (0x01 << 20) |
289 | #define S3C2410_GPC10_VD2 (0x02 << 20) | 372 | #define S3C2410_GPC10_VD2 (0x02 << 20) |
373 | #define S3C2400_GPC10_VD10 (0x02 << 20) | ||
290 | 374 | ||
291 | #define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11) | 375 | #define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11) |
292 | #define S3C2410_GPC11_INP (0x00 << 22) | 376 | #define S3C2410_GPC11_INP (0x00 << 22) |
293 | #define S3C2410_GPC11_OUTP (0x01 << 22) | 377 | #define S3C2410_GPC11_OUTP (0x01 << 22) |
294 | #define S3C2410_GPC11_VD3 (0x02 << 22) | 378 | #define S3C2410_GPC11_VD3 (0x02 << 22) |
379 | #define S3C2400_GPC11_VD11 (0x02 << 22) | ||
295 | 380 | ||
296 | #define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12) | 381 | #define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12) |
297 | #define S3C2410_GPC12_INP (0x00 << 24) | 382 | #define S3C2410_GPC12_INP (0x00 << 24) |
298 | #define S3C2410_GPC12_OUTP (0x01 << 24) | 383 | #define S3C2410_GPC12_OUTP (0x01 << 24) |
299 | #define S3C2410_GPC12_VD4 (0x02 << 24) | 384 | #define S3C2410_GPC12_VD4 (0x02 << 24) |
385 | #define S3C2400_GPC12_VD12 (0x02 << 24) | ||
300 | 386 | ||
301 | #define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13) | 387 | #define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13) |
302 | #define S3C2410_GPC13_INP (0x00 << 26) | 388 | #define S3C2410_GPC13_INP (0x00 << 26) |
303 | #define S3C2410_GPC13_OUTP (0x01 << 26) | 389 | #define S3C2410_GPC13_OUTP (0x01 << 26) |
304 | #define S3C2410_GPC13_VD5 (0x02 << 26) | 390 | #define S3C2410_GPC13_VD5 (0x02 << 26) |
391 | #define S3C2400_GPC13_VD13 (0x02 << 26) | ||
305 | 392 | ||
306 | #define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14) | 393 | #define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14) |
307 | #define S3C2410_GPC14_INP (0x00 << 28) | 394 | #define S3C2410_GPC14_INP (0x00 << 28) |
308 | #define S3C2410_GPC14_OUTP (0x01 << 28) | 395 | #define S3C2410_GPC14_OUTP (0x01 << 28) |
309 | #define S3C2410_GPC14_VD6 (0x02 << 28) | 396 | #define S3C2410_GPC14_VD6 (0x02 << 28) |
397 | #define S3C2400_GPC14_VD14 (0x02 << 28) | ||
310 | 398 | ||
311 | #define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15) | 399 | #define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15) |
312 | #define S3C2410_GPC15_INP (0x00 << 30) | 400 | #define S3C2410_GPC15_INP (0x00 << 30) |
313 | #define S3C2410_GPC15_OUTP (0x01 << 30) | 401 | #define S3C2410_GPC15_OUTP (0x01 << 30) |
314 | #define S3C2410_GPC15_VD7 (0x02 << 30) | 402 | #define S3C2410_GPC15_VD7 (0x02 << 30) |
403 | #define S3C2400_GPC15_VD15 (0x02 << 30) | ||
404 | |||
405 | #define S3C2410_GPC_PUPDIS(x) (1<<(x)) | ||
315 | 406 | ||
316 | /* Port D consists of 16 GPIO/Special function | 407 | /* |
408 | * S3C2410: Port D consists of 16 GPIO/Special function | ||
317 | * | 409 | * |
318 | * almost identical setup to port b, but the special functions are mostly | 410 | * almost identical setup to port b, but the special functions are mostly |
319 | * to do with the video system's data. | 411 | * to do with the video system's data. |
412 | * | ||
413 | * S3C2400: Port D consists of 11 GPIO/Special function | ||
414 | * | ||
415 | * almost identical setup to port c | ||
320 | */ | 416 | */ |
321 | 417 | ||
322 | #define S3C2410_GPDCON S3C2410_GPIOREG(0x30) | 418 | #define S3C2410_GPDCON S3C2410_GPIOREG(0x30) |
323 | #define S3C2410_GPDDAT S3C2410_GPIOREG(0x34) | 419 | #define S3C2410_GPDDAT S3C2410_GPIOREG(0x34) |
324 | #define S3C2410_GPDUP S3C2410_GPIOREG(0x38) | 420 | #define S3C2410_GPDUP S3C2410_GPIOREG(0x38) |
325 | 421 | ||
422 | #define S3C2400_GPDCON S3C2410_GPIOREG(0x20) | ||
423 | #define S3C2400_GPDDAT S3C2410_GPIOREG(0x24) | ||
424 | #define S3C2400_GPDUP S3C2410_GPIOREG(0x28) | ||
425 | |||
326 | #define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0) | 426 | #define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0) |
327 | #define S3C2410_GPD0_INP (0x00 << 0) | 427 | #define S3C2410_GPD0_INP (0x00 << 0) |
328 | #define S3C2410_GPD0_OUTP (0x01 << 0) | 428 | #define S3C2410_GPD0_OUTP (0x01 << 0) |
329 | #define S3C2410_GPD0_VD8 (0x02 << 0) | 429 | #define S3C2410_GPD0_VD8 (0x02 << 0) |
430 | #define S3C2400_GPD0_VFRAME (0x02 << 0) | ||
330 | 431 | ||
331 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) | 432 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) |
332 | #define S3C2410_GPD1_INP (0x00 << 2) | 433 | #define S3C2410_GPD1_INP (0x00 << 2) |
333 | #define S3C2410_GPD1_OUTP (0x01 << 2) | 434 | #define S3C2410_GPD1_OUTP (0x01 << 2) |
334 | #define S3C2410_GPD1_VD9 (0x02 << 2) | 435 | #define S3C2410_GPD1_VD9 (0x02 << 2) |
436 | #define S3C2400_GPD1_VM (0x02 << 2) | ||
335 | 437 | ||
336 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) | 438 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) |
337 | #define S3C2410_GPD2_INP (0x00 << 4) | 439 | #define S3C2410_GPD2_INP (0x00 << 4) |
338 | #define S3C2410_GPD2_OUTP (0x01 << 4) | 440 | #define S3C2410_GPD2_OUTP (0x01 << 4) |
339 | #define S3C2410_GPD2_VD10 (0x02 << 4) | 441 | #define S3C2410_GPD2_VD10 (0x02 << 4) |
442 | #define S3C2400_GPD2_VLINE (0x02 << 4) | ||
340 | 443 | ||
341 | #define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3) | 444 | #define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3) |
342 | #define S3C2410_GPD3_INP (0x00 << 6) | 445 | #define S3C2410_GPD3_INP (0x00 << 6) |
343 | #define S3C2410_GPD3_OUTP (0x01 << 6) | 446 | #define S3C2410_GPD3_OUTP (0x01 << 6) |
344 | #define S3C2410_GPD3_VD11 (0x02 << 6) | 447 | #define S3C2410_GPD3_VD11 (0x02 << 6) |
448 | #define S3C2400_GPD3_VCLK (0x02 << 6) | ||
345 | 449 | ||
346 | #define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4) | 450 | #define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4) |
347 | #define S3C2410_GPD4_INP (0x00 << 8) | 451 | #define S3C2410_GPD4_INP (0x00 << 8) |
348 | #define S3C2410_GPD4_OUTP (0x01 << 8) | 452 | #define S3C2410_GPD4_OUTP (0x01 << 8) |
349 | #define S3C2410_GPD4_VD12 (0x02 << 8) | 453 | #define S3C2410_GPD4_VD12 (0x02 << 8) |
454 | #define S3C2400_GPD4_LEND (0x02 << 8) | ||
350 | 455 | ||
351 | #define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5) | 456 | #define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5) |
352 | #define S3C2410_GPD5_INP (0x00 << 10) | 457 | #define S3C2410_GPD5_INP (0x00 << 10) |
353 | #define S3C2410_GPD5_OUTP (0x01 << 10) | 458 | #define S3C2410_GPD5_OUTP (0x01 << 10) |
354 | #define S3C2410_GPD5_VD13 (0x02 << 10) | 459 | #define S3C2410_GPD5_VD13 (0x02 << 10) |
460 | #define S3C2400_GPD5_TOUT0 (0x02 << 10) | ||
355 | 461 | ||
356 | #define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6) | 462 | #define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6) |
357 | #define S3C2410_GPD6_INP (0x00 << 12) | 463 | #define S3C2410_GPD6_INP (0x00 << 12) |
358 | #define S3C2410_GPD6_OUTP (0x01 << 12) | 464 | #define S3C2410_GPD6_OUTP (0x01 << 12) |
359 | #define S3C2410_GPD6_VD14 (0x02 << 12) | 465 | #define S3C2410_GPD6_VD14 (0x02 << 12) |
466 | #define S3C2400_GPD6_TOUT1 (0x02 << 12) | ||
360 | 467 | ||
361 | #define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7) | 468 | #define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7) |
362 | #define S3C2410_GPD7_INP (0x00 << 14) | 469 | #define S3C2410_GPD7_INP (0x00 << 14) |
363 | #define S3C2410_GPD7_OUTP (0x01 << 14) | 470 | #define S3C2410_GPD7_OUTP (0x01 << 14) |
364 | #define S3C2410_GPD7_VD15 (0x02 << 14) | 471 | #define S3C2410_GPD7_VD15 (0x02 << 14) |
472 | #define S3C2400_GPD7_TOUT2 (0x02 << 14) | ||
365 | 473 | ||
366 | #define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8) | 474 | #define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8) |
367 | #define S3C2410_GPD8_INP (0x00 << 16) | 475 | #define S3C2410_GPD8_INP (0x00 << 16) |
368 | #define S3C2410_GPD8_OUTP (0x01 << 16) | 476 | #define S3C2410_GPD8_OUTP (0x01 << 16) |
369 | #define S3C2410_GPD8_VD16 (0x02 << 16) | 477 | #define S3C2410_GPD8_VD16 (0x02 << 16) |
478 | #define S3C2400_GPD8_TOUT3 (0x02 << 16) | ||
370 | 479 | ||
371 | #define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9) | 480 | #define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9) |
372 | #define S3C2410_GPD9_INP (0x00 << 18) | 481 | #define S3C2410_GPD9_INP (0x00 << 18) |
373 | #define S3C2410_GPD9_OUTP (0x01 << 18) | 482 | #define S3C2410_GPD9_OUTP (0x01 << 18) |
374 | #define S3C2410_GPD9_VD17 (0x02 << 18) | 483 | #define S3C2410_GPD9_VD17 (0x02 << 18) |
484 | #define S3C2400_GPD9_TCLK0 (0x02 << 18) | ||
485 | #define S3C2410_GPD9_MASK (0x03 << 18) | ||
375 | 486 | ||
376 | #define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10) | 487 | #define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10) |
377 | #define S3C2410_GPD10_INP (0x00 << 20) | 488 | #define S3C2410_GPD10_INP (0x00 << 20) |
378 | #define S3C2410_GPD10_OUTP (0x01 << 20) | 489 | #define S3C2410_GPD10_OUTP (0x01 << 20) |
379 | #define S3C2410_GPD10_VD18 (0x02 << 20) | 490 | #define S3C2410_GPD10_VD18 (0x02 << 20) |
491 | #define S3C2400_GPD10_nWAIT (0x02 << 20) | ||
380 | 492 | ||
381 | #define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11) | 493 | #define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11) |
382 | #define S3C2410_GPD11_INP (0x00 << 22) | 494 | #define S3C2410_GPD11_INP (0x00 << 22) |
@@ -403,37 +515,56 @@ | |||
403 | #define S3C2410_GPD15_OUTP (0x01 << 30) | 515 | #define S3C2410_GPD15_OUTP (0x01 << 30) |
404 | #define S3C2410_GPD15_VD23 (0x02 << 30) | 516 | #define S3C2410_GPD15_VD23 (0x02 << 30) |
405 | 517 | ||
406 | /* Port E consists of 16 GPIO/Special function | 518 | #define S3C2410_GPD_PUPDIS(x) (1<<(x)) |
519 | |||
520 | /* S3C2410: | ||
521 | * Port E consists of 16 GPIO/Special function | ||
407 | * | 522 | * |
408 | * again, the same as port B, but dealing with I2S, SDI, and | 523 | * again, the same as port B, but dealing with I2S, SDI, and |
409 | * more miscellaneous functions | 524 | * more miscellaneous functions |
525 | * | ||
526 | * S3C2400: | ||
527 | * Port E consists of 12 GPIO/Special function | ||
528 | * | ||
529 | * GPIO / interrupt inputs | ||
410 | */ | 530 | */ |
411 | 531 | ||
412 | #define S3C2410_GPECON S3C2410_GPIOREG(0x40) | 532 | #define S3C2410_GPECON S3C2410_GPIOREG(0x40) |
413 | #define S3C2410_GPEDAT S3C2410_GPIOREG(0x44) | 533 | #define S3C2410_GPEDAT S3C2410_GPIOREG(0x44) |
414 | #define S3C2410_GPEUP S3C2410_GPIOREG(0x48) | 534 | #define S3C2410_GPEUP S3C2410_GPIOREG(0x48) |
415 | 535 | ||
536 | #define S3C2400_GPECON S3C2410_GPIOREG(0x2C) | ||
537 | #define S3C2400_GPEDAT S3C2410_GPIOREG(0x30) | ||
538 | #define S3C2400_GPEUP S3C2410_GPIOREG(0x34) | ||
539 | |||
416 | #define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0) | 540 | #define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0) |
417 | #define S3C2410_GPE0_INP (0x00 << 0) | 541 | #define S3C2410_GPE0_INP (0x00 << 0) |
418 | #define S3C2410_GPE0_OUTP (0x01 << 0) | 542 | #define S3C2410_GPE0_OUTP (0x01 << 0) |
419 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) | 543 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) |
544 | #define S3C2400_GPE0_EINT0 (0x02 << 0) | ||
420 | #define S3C2410_GPE0_MASK (0x03 << 0) | 545 | #define S3C2410_GPE0_MASK (0x03 << 0) |
421 | 546 | ||
422 | #define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1) | 547 | #define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1) |
423 | #define S3C2410_GPE1_INP (0x00 << 2) | 548 | #define S3C2410_GPE1_INP (0x00 << 2) |
424 | #define S3C2410_GPE1_OUTP (0x01 << 2) | 549 | #define S3C2410_GPE1_OUTP (0x01 << 2) |
425 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) | 550 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) |
551 | #define S3C2400_GPE1_EINT1 (0x02 << 2) | ||
552 | #define S3C2400_GPE1_nSS (0x03 << 2) | ||
426 | #define S3C2410_GPE1_MASK (0x03 << 2) | 553 | #define S3C2410_GPE1_MASK (0x03 << 2) |
427 | 554 | ||
428 | #define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2) | 555 | #define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2) |
429 | #define S3C2410_GPE2_INP (0x00 << 4) | 556 | #define S3C2410_GPE2_INP (0x00 << 4) |
430 | #define S3C2410_GPE2_OUTP (0x01 << 4) | 557 | #define S3C2410_GPE2_OUTP (0x01 << 4) |
431 | #define S3C2410_GPE2_CDCLK (0x02 << 4) | 558 | #define S3C2410_GPE2_CDCLK (0x02 << 4) |
559 | #define S3C2400_GPE2_EINT2 (0x02 << 4) | ||
560 | #define S3C2400_GPE2_I2SSDI (0x03 << 4) | ||
432 | 561 | ||
433 | #define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3) | 562 | #define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3) |
434 | #define S3C2410_GPE3_INP (0x00 << 6) | 563 | #define S3C2410_GPE3_INP (0x00 << 6) |
435 | #define S3C2410_GPE3_OUTP (0x01 << 6) | 564 | #define S3C2410_GPE3_OUTP (0x01 << 6) |
436 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) | 565 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) |
566 | #define S3C2400_GPE3_EINT3 (0x02 << 6) | ||
567 | #define S3C2400_GPE3_nCTS1 (0x03 << 6) | ||
437 | #define S3C2410_GPE3_nSS0 (0x03 << 6) | 568 | #define S3C2410_GPE3_nSS0 (0x03 << 6) |
438 | #define S3C2410_GPE3_MASK (0x03 << 6) | 569 | #define S3C2410_GPE3_MASK (0x03 << 6) |
439 | 570 | ||
@@ -441,6 +572,8 @@ | |||
441 | #define S3C2410_GPE4_INP (0x00 << 8) | 572 | #define S3C2410_GPE4_INP (0x00 << 8) |
442 | #define S3C2410_GPE4_OUTP (0x01 << 8) | 573 | #define S3C2410_GPE4_OUTP (0x01 << 8) |
443 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) | 574 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) |
575 | #define S3C2400_GPE4_EINT4 (0x02 << 8) | ||
576 | #define S3C2400_GPE4_nRTS1 (0x03 << 8) | ||
444 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) | 577 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) |
445 | #define S3C2410_GPE4_MASK (0x03 << 8) | 578 | #define S3C2410_GPE4_MASK (0x03 << 8) |
446 | 579 | ||
@@ -448,36 +581,46 @@ | |||
448 | #define S3C2410_GPE5_INP (0x00 << 10) | 581 | #define S3C2410_GPE5_INP (0x00 << 10) |
449 | #define S3C2410_GPE5_OUTP (0x01 << 10) | 582 | #define S3C2410_GPE5_OUTP (0x01 << 10) |
450 | #define S3C2410_GPE5_SDCLK (0x02 << 10) | 583 | #define S3C2410_GPE5_SDCLK (0x02 << 10) |
584 | #define S3C2400_GPE5_EINT5 (0x02 << 10) | ||
585 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) | ||
451 | 586 | ||
452 | #define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6) | 587 | #define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6) |
453 | #define S3C2410_GPE6_INP (0x00 << 12) | 588 | #define S3C2410_GPE6_INP (0x00 << 12) |
454 | #define S3C2410_GPE6_OUTP (0x01 << 12) | 589 | #define S3C2410_GPE6_OUTP (0x01 << 12) |
455 | #define S3C2410_GPE6_SDCMD (0x02 << 12) | 590 | #define S3C2410_GPE6_SDCMD (0x02 << 12) |
591 | #define S3C2400_GPE6_EINT6 (0x02 << 12) | ||
456 | 592 | ||
457 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) | 593 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) |
458 | #define S3C2410_GPE7_INP (0x00 << 14) | 594 | #define S3C2410_GPE7_INP (0x00 << 14) |
459 | #define S3C2410_GPE7_OUTP (0x01 << 14) | 595 | #define S3C2410_GPE7_OUTP (0x01 << 14) |
460 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) | 596 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) |
597 | #define S3C2400_GPE7_EINT7 (0x02 << 14) | ||
461 | 598 | ||
462 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) | 599 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) |
463 | #define S3C2410_GPE8_INP (0x00 << 16) | 600 | #define S3C2410_GPE8_INP (0x00 << 16) |
464 | #define S3C2410_GPE8_OUTP (0x01 << 16) | 601 | #define S3C2410_GPE8_OUTP (0x01 << 16) |
465 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) | 602 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) |
603 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) | ||
466 | 604 | ||
467 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) | 605 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) |
468 | #define S3C2410_GPE9_INP (0x00 << 18) | 606 | #define S3C2410_GPE9_INP (0x00 << 18) |
469 | #define S3C2410_GPE9_OUTP (0x01 << 18) | 607 | #define S3C2410_GPE9_OUTP (0x01 << 18) |
470 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) | 608 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) |
609 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) | ||
610 | #define S3C2400_GPE9_nXBACK (0x03 << 18) | ||
471 | 611 | ||
472 | #define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10) | 612 | #define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10) |
473 | #define S3C2410_GPE10_INP (0x00 << 20) | 613 | #define S3C2410_GPE10_INP (0x00 << 20) |
474 | #define S3C2410_GPE10_OUTP (0x01 << 20) | 614 | #define S3C2410_GPE10_OUTP (0x01 << 20) |
475 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) | 615 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) |
616 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) | ||
476 | 617 | ||
477 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) | 618 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) |
478 | #define S3C2410_GPE11_INP (0x00 << 22) | 619 | #define S3C2410_GPE11_INP (0x00 << 22) |
479 | #define S3C2410_GPE11_OUTP (0x01 << 22) | 620 | #define S3C2410_GPE11_OUTP (0x01 << 22) |
480 | #define S3C2410_GPE11_SPIMISO0 (0x02 << 22) | 621 | #define S3C2410_GPE11_SPIMISO0 (0x02 << 22) |
622 | #define S3C2400_GPE11_nXDREQ1 (0x02 << 22) | ||
623 | #define S3C2400_GPE11_nXBREQ (0x03 << 22) | ||
481 | 624 | ||
482 | #define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12) | 625 | #define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12) |
483 | #define S3C2410_GPE12_INP (0x00 << 24) | 626 | #define S3C2410_GPE12_INP (0x00 << 24) |
@@ -509,7 +652,8 @@ | |||
509 | 652 | ||
510 | #define S3C2410_GPE_PUPDIS(x) (1<<(x)) | 653 | #define S3C2410_GPE_PUPDIS(x) (1<<(x)) |
511 | 654 | ||
512 | /* Port F consists of 8 GPIO/Special function | 655 | /* S3C2410: |
656 | * Port F consists of 8 GPIO/Special function | ||
513 | * | 657 | * |
514 | * GPIO / interrupt inputs | 658 | * GPIO / interrupt inputs |
515 | * | 659 | * |
@@ -517,100 +661,141 @@ | |||
517 | * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined | 661 | * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined |
518 | * | 662 | * |
519 | * pull up works like all other ports. | 663 | * pull up works like all other ports. |
664 | * | ||
665 | * S3C2400: | ||
666 | * Port F consists of 7 GPIO/Special function | ||
667 | * | ||
668 | * GPIO/serial/misc pins | ||
520 | */ | 669 | */ |
521 | 670 | ||
522 | #define S3C2410_GPFCON S3C2410_GPIOREG(0x50) | 671 | #define S3C2410_GPFCON S3C2410_GPIOREG(0x50) |
523 | #define S3C2410_GPFDAT S3C2410_GPIOREG(0x54) | 672 | #define S3C2410_GPFDAT S3C2410_GPIOREG(0x54) |
524 | #define S3C2410_GPFUP S3C2410_GPIOREG(0x58) | 673 | #define S3C2410_GPFUP S3C2410_GPIOREG(0x58) |
525 | 674 | ||
675 | #define S3C2400_GPFCON S3C2410_GPIOREG(0x38) | ||
676 | #define S3C2400_GPFDAT S3C2410_GPIOREG(0x3C) | ||
677 | #define S3C2400_GPFUP S3C2410_GPIOREG(0x40) | ||
678 | |||
526 | #define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0) | 679 | #define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0) |
527 | #define S3C2410_GPF0_INP (0x00 << 0) | 680 | #define S3C2410_GPF0_INP (0x00 << 0) |
528 | #define S3C2410_GPF0_OUTP (0x01 << 0) | 681 | #define S3C2410_GPF0_OUTP (0x01 << 0) |
529 | #define S3C2410_GPF0_EINT0 (0x02 << 0) | 682 | #define S3C2410_GPF0_EINT0 (0x02 << 0) |
683 | #define S3C2400_GPF0_RXD0 (0x02 << 0) | ||
530 | 684 | ||
531 | #define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1) | 685 | #define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1) |
532 | #define S3C2410_GPF1_INP (0x00 << 2) | 686 | #define S3C2410_GPF1_INP (0x00 << 2) |
533 | #define S3C2410_GPF1_OUTP (0x01 << 2) | 687 | #define S3C2410_GPF1_OUTP (0x01 << 2) |
534 | #define S3C2410_GPF1_EINT1 (0x02 << 2) | 688 | #define S3C2410_GPF1_EINT1 (0x02 << 2) |
689 | #define S3C2400_GPF1_RXD1 (0x02 << 2) | ||
690 | #define S3C2400_GPF1_IICSDA (0x03 << 2) | ||
535 | 691 | ||
536 | #define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2) | 692 | #define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2) |
537 | #define S3C2410_GPF2_INP (0x00 << 4) | 693 | #define S3C2410_GPF2_INP (0x00 << 4) |
538 | #define S3C2410_GPF2_OUTP (0x01 << 4) | 694 | #define S3C2410_GPF2_OUTP (0x01 << 4) |
539 | #define S3C2410_GPF2_EINT2 (0x02 << 4) | 695 | #define S3C2410_GPF2_EINT2 (0x02 << 4) |
696 | #define S3C2400_GPF2_TXD0 (0x02 << 4) | ||
540 | 697 | ||
541 | #define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3) | 698 | #define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3) |
542 | #define S3C2410_GPF3_INP (0x00 << 6) | 699 | #define S3C2410_GPF3_INP (0x00 << 6) |
543 | #define S3C2410_GPF3_OUTP (0x01 << 6) | 700 | #define S3C2410_GPF3_OUTP (0x01 << 6) |
544 | #define S3C2410_GPF3_EINT3 (0x02 << 6) | 701 | #define S3C2410_GPF3_EINT3 (0x02 << 6) |
702 | #define S3C2400_GPF3_TXD1 (0x02 << 6) | ||
703 | #define S3C2400_GPF3_IICSCL (0x03 << 6) | ||
545 | 704 | ||
546 | #define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4) | 705 | #define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4) |
547 | #define S3C2410_GPF4_INP (0x00 << 8) | 706 | #define S3C2410_GPF4_INP (0x00 << 8) |
548 | #define S3C2410_GPF4_OUTP (0x01 << 8) | 707 | #define S3C2410_GPF4_OUTP (0x01 << 8) |
549 | #define S3C2410_GPF4_EINT4 (0x02 << 8) | 708 | #define S3C2410_GPF4_EINT4 (0x02 << 8) |
709 | #define S3C2400_GPF4_nRTS0 (0x02 << 8) | ||
710 | #define S3C2400_GPF4_nXBACK (0x03 << 8) | ||
550 | 711 | ||
551 | #define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5) | 712 | #define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5) |
552 | #define S3C2410_GPF5_INP (0x00 << 10) | 713 | #define S3C2410_GPF5_INP (0x00 << 10) |
553 | #define S3C2410_GPF5_OUTP (0x01 << 10) | 714 | #define S3C2410_GPF5_OUTP (0x01 << 10) |
554 | #define S3C2410_GPF5_EINT5 (0x02 << 10) | 715 | #define S3C2410_GPF5_EINT5 (0x02 << 10) |
716 | #define S3C2400_GPF5_nCTS0 (0x02 << 10) | ||
717 | #define S3C2400_GPF5_nXBREQ (0x03 << 10) | ||
555 | 718 | ||
556 | #define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6) | 719 | #define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6) |
557 | #define S3C2410_GPF6_INP (0x00 << 12) | 720 | #define S3C2410_GPF6_INP (0x00 << 12) |
558 | #define S3C2410_GPF6_OUTP (0x01 << 12) | 721 | #define S3C2410_GPF6_OUTP (0x01 << 12) |
559 | #define S3C2410_GPF6_EINT6 (0x02 << 12) | 722 | #define S3C2410_GPF6_EINT6 (0x02 << 12) |
723 | #define S3C2400_GPF6_CLKOUT (0x02 << 12) | ||
560 | 724 | ||
561 | #define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7) | 725 | #define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7) |
562 | #define S3C2410_GPF7_INP (0x00 << 14) | 726 | #define S3C2410_GPF7_INP (0x00 << 14) |
563 | #define S3C2410_GPF7_OUTP (0x01 << 14) | 727 | #define S3C2410_GPF7_OUTP (0x01 << 14) |
564 | #define S3C2410_GPF7_EINT7 (0x02 << 14) | 728 | #define S3C2410_GPF7_EINT7 (0x02 << 14) |
565 | 729 | ||
566 | /* Port G consists of 8 GPIO/IRQ/Special function | 730 | #define S3C2410_GPF_PUPDIS(x) (1<<(x)) |
731 | |||
732 | /* S3C2410: | ||
733 | * Port G consists of 8 GPIO/IRQ/Special function | ||
567 | * | 734 | * |
568 | * GPGCON has 2 bits for each of the input pins on port F | 735 | * GPGCON has 2 bits for each of the input pins on port F |
569 | * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func | 736 | * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func |
570 | * | 737 | * |
571 | * pull up works like all other ports. | 738 | * pull up works like all other ports. |
739 | * | ||
740 | * S3C2400: | ||
741 | * Port G consists of 10 GPIO/Special function | ||
572 | */ | 742 | */ |
573 | 743 | ||
574 | #define S3C2410_GPGCON S3C2410_GPIOREG(0x60) | 744 | #define S3C2410_GPGCON S3C2410_GPIOREG(0x60) |
575 | #define S3C2410_GPGDAT S3C2410_GPIOREG(0x64) | 745 | #define S3C2410_GPGDAT S3C2410_GPIOREG(0x64) |
576 | #define S3C2410_GPGUP S3C2410_GPIOREG(0x68) | 746 | #define S3C2410_GPGUP S3C2410_GPIOREG(0x68) |
577 | 747 | ||
748 | #define S3C2400_GPGCON S3C2410_GPIOREG(0x44) | ||
749 | #define S3C2400_GPGDAT S3C2410_GPIOREG(0x48) | ||
750 | #define S3C2400_GPGUP S3C2410_GPIOREG(0x4C) | ||
751 | |||
578 | #define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0) | 752 | #define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0) |
579 | #define S3C2410_GPG0_INP (0x00 << 0) | 753 | #define S3C2410_GPG0_INP (0x00 << 0) |
580 | #define S3C2410_GPG0_OUTP (0x01 << 0) | 754 | #define S3C2410_GPG0_OUTP (0x01 << 0) |
581 | #define S3C2410_GPG0_EINT8 (0x02 << 0) | 755 | #define S3C2410_GPG0_EINT8 (0x02 << 0) |
756 | #define S3C2400_GPG0_I2SLRCK (0x02 << 0) | ||
582 | 757 | ||
583 | #define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1) | 758 | #define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1) |
584 | #define S3C2410_GPG1_INP (0x00 << 2) | 759 | #define S3C2410_GPG1_INP (0x00 << 2) |
585 | #define S3C2410_GPG1_OUTP (0x01 << 2) | 760 | #define S3C2410_GPG1_OUTP (0x01 << 2) |
586 | #define S3C2410_GPG1_EINT9 (0x02 << 2) | 761 | #define S3C2410_GPG1_EINT9 (0x02 << 2) |
762 | #define S3C2400_GPG1_I2SSCLK (0x02 << 2) | ||
587 | 763 | ||
588 | #define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2) | 764 | #define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2) |
589 | #define S3C2410_GPG2_INP (0x00 << 4) | 765 | #define S3C2410_GPG2_INP (0x00 << 4) |
590 | #define S3C2410_GPG2_OUTP (0x01 << 4) | 766 | #define S3C2410_GPG2_OUTP (0x01 << 4) |
591 | #define S3C2410_GPG2_EINT10 (0x02 << 4) | 767 | #define S3C2410_GPG2_EINT10 (0x02 << 4) |
768 | #define S3C2400_GPG2_CDCLK (0x02 << 4) | ||
592 | 769 | ||
593 | #define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3) | 770 | #define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3) |
594 | #define S3C2410_GPG3_INP (0x00 << 6) | 771 | #define S3C2410_GPG3_INP (0x00 << 6) |
595 | #define S3C2410_GPG3_OUTP (0x01 << 6) | 772 | #define S3C2410_GPG3_OUTP (0x01 << 6) |
596 | #define S3C2410_GPG3_EINT11 (0x02 << 6) | 773 | #define S3C2410_GPG3_EINT11 (0x02 << 6) |
774 | #define S3C2400_GPG3_I2SSDO (0x02 << 6) | ||
775 | #define S3C2400_GPG3_I2SSDI (0x03 << 6) | ||
597 | 776 | ||
598 | #define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4) | 777 | #define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4) |
599 | #define S3C2410_GPG4_INP (0x00 << 8) | 778 | #define S3C2410_GPG4_INP (0x00 << 8) |
600 | #define S3C2410_GPG4_OUTP (0x01 << 8) | 779 | #define S3C2410_GPG4_OUTP (0x01 << 8) |
601 | #define S3C2410_GPG4_EINT12 (0x02 << 8) | 780 | #define S3C2410_GPG4_EINT12 (0x02 << 8) |
781 | #define S3C2400_GPG4_MMCCLK (0x02 << 8) | ||
782 | #define S3C2400_GPG4_I2SSDI (0x03 << 8) | ||
602 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) | 783 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) |
603 | 784 | ||
604 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) | 785 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) |
605 | #define S3C2410_GPG5_INP (0x00 << 10) | 786 | #define S3C2410_GPG5_INP (0x00 << 10) |
606 | #define S3C2410_GPG5_OUTP (0x01 << 10) | 787 | #define S3C2410_GPG5_OUTP (0x01 << 10) |
607 | #define S3C2410_GPG5_EINT13 (0x02 << 10) | 788 | #define S3C2410_GPG5_EINT13 (0x02 << 10) |
789 | #define S3C2400_GPG5_MMCCMD (0x02 << 10) | ||
790 | #define S3C2400_GPG5_IICSDA (0x03 << 10) | ||
608 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) | 791 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) |
609 | 792 | ||
610 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) | 793 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) |
611 | #define S3C2410_GPG6_INP (0x00 << 12) | 794 | #define S3C2410_GPG6_INP (0x00 << 12) |
612 | #define S3C2410_GPG6_OUTP (0x01 << 12) | 795 | #define S3C2410_GPG6_OUTP (0x01 << 12) |
613 | #define S3C2410_GPG6_EINT14 (0x02 << 12) | 796 | #define S3C2410_GPG6_EINT14 (0x02 << 12) |
797 | #define S3C2400_GPG6_MMCDAT (0x02 << 12) | ||
798 | #define S3C2400_GPG6_IICSCL (0x03 << 12) | ||
614 | #define S3C2410_GPG6_SPIMOSI1 (0x03 << 12) | 799 | #define S3C2410_GPG6_SPIMOSI1 (0x03 << 12) |
615 | 800 | ||
616 | #define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7) | 801 | #define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7) |
@@ -618,16 +803,22 @@ | |||
618 | #define S3C2410_GPG7_OUTP (0x01 << 14) | 803 | #define S3C2410_GPG7_OUTP (0x01 << 14) |
619 | #define S3C2410_GPG7_EINT15 (0x02 << 14) | 804 | #define S3C2410_GPG7_EINT15 (0x02 << 14) |
620 | #define S3C2410_GPG7_SPICLK1 (0x03 << 14) | 805 | #define S3C2410_GPG7_SPICLK1 (0x03 << 14) |
806 | #define S3C2400_GPG7_SPIMISO (0x02 << 14) | ||
807 | #define S3C2400_GPG7_IICSDA (0x03 << 14) | ||
621 | 808 | ||
622 | #define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8) | 809 | #define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8) |
623 | #define S3C2410_GPG8_INP (0x00 << 16) | 810 | #define S3C2410_GPG8_INP (0x00 << 16) |
624 | #define S3C2410_GPG8_OUTP (0x01 << 16) | 811 | #define S3C2410_GPG8_OUTP (0x01 << 16) |
625 | #define S3C2410_GPG8_EINT16 (0x02 << 16) | 812 | #define S3C2410_GPG8_EINT16 (0x02 << 16) |
813 | #define S3C2400_GPG8_SPIMOSI (0x02 << 16) | ||
814 | #define S3C2400_GPG8_IICSCL (0x03 << 16) | ||
626 | 815 | ||
627 | #define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9) | 816 | #define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9) |
628 | #define S3C2410_GPG9_INP (0x00 << 18) | 817 | #define S3C2410_GPG9_INP (0x00 << 18) |
629 | #define S3C2410_GPG9_OUTP (0x01 << 18) | 818 | #define S3C2410_GPG9_OUTP (0x01 << 18) |
630 | #define S3C2410_GPG9_EINT17 (0x02 << 18) | 819 | #define S3C2410_GPG9_EINT17 (0x02 << 18) |
820 | #define S3C2400_GPG9_SPICLK (0x02 << 18) | ||
821 | #define S3C2400_GPG9_MMCCLK (0x03 << 18) | ||
631 | 822 | ||
632 | #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) | 823 | #define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) |
633 | #define S3C2410_GPG10_INP (0x00 << 20) | 824 | #define S3C2410_GPG10_INP (0x00 << 20) |
@@ -737,19 +928,27 @@ | |||
737 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) | 928 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) |
738 | 929 | ||
739 | /* miscellaneous control */ | 930 | /* miscellaneous control */ |
740 | 931 | #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) | |
741 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) | 932 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) |
742 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) | 933 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) |
743 | 934 | ||
744 | /* see clock.h for dclk definitions */ | 935 | /* see clock.h for dclk definitions */ |
745 | 936 | ||
746 | /* pullup control on databus */ | 937 | /* pullup control on databus */ |
747 | #define S3C2410_MISCCR_SPUCR_HEN (0) | 938 | #define S3C2410_MISCCR_SPUCR_HEN (0<<0) |
748 | #define S3C2410_MISCCR_SPUCR_HDIS (1<<0) | 939 | #define S3C2410_MISCCR_SPUCR_HDIS (1<<0) |
749 | #define S3C2410_MISCCR_SPUCR_LEN (0) | 940 | #define S3C2410_MISCCR_SPUCR_LEN (0<<1) |
750 | #define S3C2410_MISCCR_SPUCR_LDIS (1<<1) | 941 | #define S3C2410_MISCCR_SPUCR_LDIS (1<<1) |
751 | 942 | ||
752 | #define S3C2410_MISCCR_USBDEV (0) | 943 | #define S3C2400_MISCCR_SPUCR_LEN (0<<0) |
944 | #define S3C2400_MISCCR_SPUCR_LDIS (1<<0) | ||
945 | #define S3C2400_MISCCR_SPUCR_HEN (0<<1) | ||
946 | #define S3C2400_MISCCR_SPUCR_HDIS (1<<1) | ||
947 | |||
948 | #define S3C2400_MISCCR_HZ_STOPEN (0<<2) | ||
949 | #define S3C2400_MISCCR_HZ_STOPPREV (1<<2) | ||
950 | |||
951 | #define S3C2410_MISCCR_USBDEV (0<<3) | ||
753 | #define S3C2410_MISCCR_USBHOST (1<<3) | 952 | #define S3C2410_MISCCR_USBHOST (1<<3) |
754 | 953 | ||
755 | #define S3C2410_MISCCR_CLK0_MPLL (0<<4) | 954 | #define S3C2410_MISCCR_CLK0_MPLL (0<<4) |
@@ -785,7 +984,7 @@ | |||
785 | * | 984 | * |
786 | * Samsung datasheet p9-25 | 985 | * Samsung datasheet p9-25 |
787 | */ | 986 | */ |
788 | 987 | #define S3C2400_EXTINT0 S3C2410_GPIOREG(0x58) | |
789 | #define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88) | 988 | #define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88) |
790 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) | 989 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) |
791 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) | 990 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) |
@@ -833,5 +1032,21 @@ | |||
833 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) | 1032 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) |
834 | #define S3C2410_GSTATUS2_PONRESET (1<<0) | 1033 | #define S3C2410_GSTATUS2_PONRESET (1<<0) |
835 | 1034 | ||
1035 | /* open drain control register */ | ||
1036 | #define S3C2400_OPENCR S3C2410_GPIOREG(0x50) | ||
1037 | |||
1038 | #define S3C2400_OPENCR_OPC_RXD1DIS (0<<0) | ||
1039 | #define S3C2400_OPENCR_OPC_RXD1EN (1<<0) | ||
1040 | #define S3C2400_OPENCR_OPC_TXD1DIS (0<<1) | ||
1041 | #define S3C2400_OPENCR_OPC_TXD1EN (1<<1) | ||
1042 | #define S3C2400_OPENCR_OPC_CMDDIS (0<<2) | ||
1043 | #define S3C2400_OPENCR_OPC_CMDEN (1<<2) | ||
1044 | #define S3C2400_OPENCR_OPC_DATDIS (0<<3) | ||
1045 | #define S3C2400_OPENCR_OPC_DATEN (1<<3) | ||
1046 | #define S3C2400_OPENCR_OPC_MISODIS (0<<4) | ||
1047 | #define S3C2400_OPENCR_OPC_MISOEN (1<<4) | ||
1048 | #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) | ||
1049 | #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) | ||
1050 | |||
836 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 1051 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
837 | 1052 | ||
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h index 9d4fe6cf205b..040ccde7a11e 100644 --- a/include/asm-arm/arch-sa1100/io.h +++ b/include/asm-arm/arch-sa1100/io.h | |||
@@ -10,8 +10,6 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #include <asm/hardware.h> | ||
14 | |||
15 | #define IO_SPACE_LIMIT 0xffffffff | 13 | #define IO_SPACE_LIMIT 0xffffffff |
16 | 14 | ||
17 | /* | 15 | /* |
diff --git a/include/asm-arm/numnodes.h b/include/asm-arm/numnodes.h index 5d2a1034a02e..8df36818ebc9 100644 --- a/include/asm-arm/numnodes.h +++ b/include/asm-arm/numnodes.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef __ASM_ARM_NUMNODES_H | 17 | #ifndef __ASM_ARM_NUMNODES_H |
18 | #define __ASM_ARM_NUMNODES_H | 18 | #define __ASM_ARM_NUMNODES_H |
19 | 19 | ||
20 | #include <asm/memory.h> | ||
21 | |||
20 | #ifndef NODES_SHIFT | 22 | #ifndef NODES_SHIFT |
21 | # define NODES_SHIFT 2 /* Normally, Max 4 Nodes */ | 23 | # define NODES_SHIFT 2 /* Normally, Max 4 Nodes */ |
22 | #endif | 24 | #endif |
diff --git a/include/asm-frv/hardirq.h b/include/asm-frv/hardirq.h index 5248ca054909..685123981e8b 100644 --- a/include/asm-frv/hardirq.h +++ b/include/asm-frv/hardirq.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
17 | #include <linux/irq.h> | ||
17 | 18 | ||
18 | typedef struct { | 19 | typedef struct { |
19 | unsigned int __softirq_pending; | 20 | unsigned int __softirq_pending; |
diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h index f9caecf7e3c0..ae031eaa3dd2 100644 --- a/include/asm-frv/ide.h +++ b/include/asm-frv/ide.h | |||
@@ -33,10 +33,10 @@ | |||
33 | /* | 33 | /* |
34 | * some bits needed for parts of the IDE subsystem to compile | 34 | * some bits needed for parts of the IDE subsystem to compile |
35 | */ | 35 | */ |
36 | #define __ide_mm_insw(port, addr, n) insw(port, addr, n) | 36 | #define __ide_mm_insw(port, addr, n) insw((unsigned long) (port), addr, n) |
37 | #define __ide_mm_insl(port, addr, n) insl(port, addr, n) | 37 | #define __ide_mm_insl(port, addr, n) insl((unsigned long) (port), addr, n) |
38 | #define __ide_mm_outsw(port, addr, n) outsw(port, addr, n) | 38 | #define __ide_mm_outsw(port, addr, n) outsw((unsigned long) (port), addr, n) |
39 | #define __ide_mm_outsl(port, addr, n) outsl(port, addr, n) | 39 | #define __ide_mm_outsl(port, addr, n) outsl((unsigned long) (port), addr, n) |
40 | 40 | ||
41 | 41 | ||
42 | #endif /* __KERNEL__ */ | 42 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index 4feba567e7fd..b8221b611b5c 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h | |||
@@ -47,8 +47,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
47 | 47 | ||
48 | #define devmem_is_allowed(pfn) 1 | 48 | #define devmem_is_allowed(pfn) 1 |
49 | 49 | ||
50 | #define __pa(vaddr) virt_to_phys((void *) vaddr) | 50 | #define __pa(vaddr) virt_to_phys((void *) (unsigned long) (vaddr)) |
51 | #define __va(paddr) phys_to_virt((unsigned long) paddr) | 51 | #define __va(paddr) phys_to_virt((unsigned long) (paddr)) |
52 | 52 | ||
53 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 53 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
54 | 54 | ||
diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index b18396288df1..907c5c3643cc 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/rwsem.h> | 21 | #include <linux/rwsem.h> |
22 | 22 | ||
23 | #define SEMAPHORE_DEBUG WAITQUEUE_DEBUG | 23 | #define SEMAPHORE_DEBUG 0 |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * the semaphore definition | 26 | * the semaphore definition |
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h index c8cba7836f0d..60f6b2aee76d 100644 --- a/include/asm-frv/thread_info.h +++ b/include/asm-frv/thread_info.h | |||
@@ -58,7 +58,7 @@ struct thread_info { | |||
58 | 58 | ||
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #define PREEMPT_ACTIVE 0x4000000 | 61 | #define PREEMPT_ACTIVE 0x10000000 |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * macros/functions for gaining access to the thread information structure | 64 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 3f7564dc0aa9..2a8b0d92a5d6 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -56,6 +56,7 @@ | |||
56 | #define SN_SAL_BUS_CONFIG 0x02000037 | 56 | #define SN_SAL_BUS_CONFIG 0x02000037 |
57 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 | 57 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 |
58 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 | 58 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 |
59 | #define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a | ||
59 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b | 60 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b |
60 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c | 61 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c |
61 | #define SN_SAL_COHERENCE 0x0200003d | 62 | #define SN_SAL_COHERENCE 0x0200003d |
@@ -581,6 +582,21 @@ sn_partition_serial_number_val(void) { | |||
581 | } | 582 | } |
582 | 583 | ||
583 | /* | 584 | /* |
585 | * Returns the partition id of the nasid passed in as an argument, | ||
586 | * or INVALID_PARTID if the partition id cannot be retrieved. | ||
587 | */ | ||
588 | static inline partid_t | ||
589 | ia64_sn_sysctl_partition_get(nasid_t nasid) | ||
590 | { | ||
591 | struct ia64_sal_retval ret_stuff; | ||
592 | SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | ||
593 | 0, 0, 0, 0, 0, 0); | ||
594 | if (ret_stuff.status != 0) | ||
595 | return -1; | ||
596 | return ((partid_t)ret_stuff.v0); | ||
597 | } | ||
598 | |||
599 | /* | ||
584 | * Returns the physical address of the partition's reserved page through | 600 | * Returns the physical address of the partition's reserved page through |
585 | * an iterative number of calls. | 601 | * an iterative number of calls. |
586 | * | 602 | * |
@@ -1018,6 +1034,24 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift, | |||
1018 | ret_stuff.v2 = 0; | 1034 | ret_stuff.v2 = 0; |
1019 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); | 1035 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); |
1020 | 1036 | ||
1037 | /***** BEGIN HACK - temp til old proms no longer supported ********/ | ||
1038 | if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) { | ||
1039 | int nasid = get_sapicid() & 0xfff;; | ||
1040 | #define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL | ||
1041 | #define SH_SHUB_ID_NODES_PER_BIT_SHFT 48 | ||
1042 | if (shubtype) *shubtype = 0; | ||
1043 | if (nasid_bitmask) *nasid_bitmask = 0x7ff; | ||
1044 | if (nasid_shift) *nasid_shift = 38; | ||
1045 | if (systemsize) *systemsize = 10; | ||
1046 | if (sharing_domain_size) *sharing_domain_size = 8; | ||
1047 | if (partid) *partid = ia64_sn_sysctl_partition_get(nasid); | ||
1048 | if (coher) *coher = nasid >> 9; | ||
1049 | if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >> | ||
1050 | SH_SHUB_ID_NODES_PER_BIT_SHFT; | ||
1051 | return 0; | ||
1052 | } | ||
1053 | /***** END HACK *******/ | ||
1054 | |||
1021 | if (ret_stuff.status < 0) | 1055 | if (ret_stuff.status < 0) |
1022 | return ret_stuff.status; | 1056 | return ret_stuff.status; |
1023 | 1057 | ||
diff --git a/include/asm-ia64/sn/tioce.h b/include/asm-ia64/sn/tioce.h index 22879853e46c..ecaddf960086 100644 --- a/include/asm-ia64/sn/tioce.h +++ b/include/asm-ia64/sn/tioce.h | |||
@@ -1,22 +1,10 @@ | |||
1 | /************************************************************************** | 1 | /* |
2 | * * | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * Unpublished copyright (c) 2005, Silicon Graphics, Inc. * | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * THIS IS UNPUBLISHED CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF SGI. * | 4 | * for more details. |
5 | * * | 5 | * |
6 | * The copyright notice above does not evidence any actual or intended * | 6 | * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved. |
7 | * publication or disclosure of this source code, which includes * | 7 | */ |
8 | * information that is confidential and/or proprietary, and is a trade * | ||
9 | * secret, of Silicon Graphics, Inc. ANY REPRODUCTION, MODIFICATION, * | ||
10 | * DISTRIBUTION, PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH * | ||
11 | * USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF * | ||
12 | * SILICON GRAPHICS, INC. IS STRICTLY PROHIBITED, AND IN VIOLATION OF * | ||
13 | * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR * | ||
14 | * POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION DOES NOT * | ||
15 | * CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS * | ||
16 | * CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY * | ||
17 | * DESCRIBE, IN WHOLE OR IN PART. * | ||
18 | * * | ||
19 | **************************************************************************/ | ||
20 | 8 | ||
21 | #ifndef __ASM_IA64_SN_TIOCE_H__ | 9 | #ifndef __ASM_IA64_SN_TIOCE_H__ |
22 | #define __ASM_IA64_SN_TIOCE_H__ | 10 | #define __ASM_IA64_SN_TIOCE_H__ |
diff --git a/include/asm-ia64/sn/tioce_provider.h b/include/asm-ia64/sn/tioce_provider.h index 7f63dec0a79a..cb414908671d 100644 --- a/include/asm-ia64/sn/tioce_provider.h +++ b/include/asm-ia64/sn/tioce_provider.h | |||
@@ -1,13 +1,10 @@ | |||
1 | /************************************************************************** | 1 | /* |
2 | * Copyright (C) 2005, Silicon Graphics, Inc. * | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * * | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * These coded instructions, statements, and computer programs contain * | 4 | * for more details. |
5 | * unpublished proprietary information of Silicon Graphics, Inc., and * | 5 | * |
6 | * are protected by Federal copyright law. They may not be disclosed * | 6 | * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved. |
7 | * to third parties or copied or duplicated in any form, in whole or * | 7 | */ |
8 | * in part, without the prior written consent of Silicon Graphics, Inc. * | ||
9 | * * | ||
10 | **************************************************************************/ | ||
11 | 8 | ||
12 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H | 9 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H |
13 | #define _ASM_IA64_SN_CE_PROVIDER_H | 10 | #define _ASM_IA64_SN_CE_PROVIDER_H |
diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h index bfff69a49936..ef1fb8ea4726 100644 --- a/include/asm-m32r/atomic.h +++ b/include/asm-m32r/atomic.h | |||
@@ -242,6 +242,27 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
242 | */ | 242 | */ |
243 | #define atomic_add_negative(i,v) (atomic_add_return((i), (v)) < 0) | 243 | #define atomic_add_negative(i,v) (atomic_add_return((i), (v)) < 0) |
244 | 244 | ||
245 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
246 | |||
247 | /** | ||
248 | * atomic_add_unless - add unless the number is a given value | ||
249 | * @v: pointer of type atomic_t | ||
250 | * @a: the amount to add to v... | ||
251 | * @u: ...unless v is equal to u. | ||
252 | * | ||
253 | * Atomically adds @a to @v, so long as it was not @u. | ||
254 | * Returns non-zero if @v was not @u, and zero otherwise. | ||
255 | */ | ||
256 | #define atomic_add_unless(v, a, u) \ | ||
257 | ({ \ | ||
258 | int c, old; \ | ||
259 | c = atomic_read(v); \ | ||
260 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ | ||
261 | c = old; \ | ||
262 | c != (u); \ | ||
263 | }) | ||
264 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
265 | |||
245 | static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr) | 266 | static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr) |
246 | { | 267 | { |
247 | unsigned long flags; | 268 | unsigned long flags; |
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 194393bd8beb..f7aa96970d18 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -25,18 +25,21 @@ | |||
25 | # endif | 25 | # endif |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #if defined(CONFIG_PLAT_M32700UT) | 28 | #include <asm/m32r.h> |
29 | #include <asm/irq.h> | 29 | |
30 | #include <asm/m32700ut/m32700ut_pld.h> | ||
31 | #endif | ||
32 | 30 | ||
33 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 31 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
34 | 32 | ||
35 | static __inline__ int ide_default_irq(unsigned long base) | 33 | static __inline__ int ide_default_irq(unsigned long base) |
36 | { | 34 | { |
37 | switch (base) { | 35 | switch (base) { |
38 | #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) || defined(CONFIG_PLAT_MAPPI3) | 36 | #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) |
37 | case 0x1f0: return PLD_IRQ_CFIREQ; | ||
38 | default: | ||
39 | return 0; | ||
40 | #elif defined(CONFIG_PLAT_MAPPI3) | ||
39 | case 0x1f0: return PLD_IRQ_CFIREQ; | 41 | case 0x1f0: return PLD_IRQ_CFIREQ; |
42 | case 0x170: return PLD_IRQ_IDEIREQ; | ||
40 | default: | 43 | default: |
41 | return 0; | 44 | return 0; |
42 | #else | 45 | #else |
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h index 3f1551f7f01f..1d3c25d61bcb 100644 --- a/include/asm-m32r/mappi3/mappi3_pld.h +++ b/include/asm-m32r/mappi3/mappi3_pld.h | |||
@@ -59,7 +59,7 @@ | |||
59 | #define M32R_IRQ_I2C (28) /* I2C-BUS */ | 59 | #define M32R_IRQ_I2C (28) /* I2C-BUS */ |
60 | #define PLD_IRQ_CFIREQ (6) /* INT5 CFC Card Interrupt */ | 60 | #define PLD_IRQ_CFIREQ (6) /* INT5 CFC Card Interrupt */ |
61 | #define PLD_IRQ_CFC_INSERT (7) /* INT6 CFC Card Insert */ | 61 | #define PLD_IRQ_CFC_INSERT (7) /* INT6 CFC Card Insert */ |
62 | #define PLD_IRQ_CFC_EJECT (8) /* INT7 CFC Card Eject */ | 62 | #define PLD_IRQ_IDEIREQ (8) /* INT7 IDE Interrupt */ |
63 | #define PLD_IRQ_MMCCARD (43) /* MMC Card Insert */ | 63 | #define PLD_IRQ_MMCCARD (43) /* MMC Card Insert */ |
64 | #define PLD_IRQ_MMCIRQ (44) /* MMC Transfer Done */ | 64 | #define PLD_IRQ_MMCIRQ (44) /* MMC Transfer Done */ |
65 | 65 | ||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 73348c3f858b..5eee832b73a0 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | #include <asm/assembler.h> | ||
14 | 15 | ||
15 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
16 | 17 | ||
@@ -132,8 +133,6 @@ static inline void local_irq_disable(void) | |||
132 | !(flags & 0x40); \ | 133 | !(flags & 0x40); \ |
133 | }) | 134 | }) |
134 | 135 | ||
135 | #endif /* __KERNEL__ */ | ||
136 | |||
137 | #define nop() __asm__ __volatile__ ("nop" : : ) | 136 | #define nop() __asm__ __volatile__ ("nop" : : ) |
138 | 137 | ||
139 | #define xchg(ptr,x) \ | 138 | #define xchg(ptr,x) \ |
@@ -213,6 +212,67 @@ static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, | |||
213 | return (tmp); | 212 | return (tmp); |
214 | } | 213 | } |
215 | 214 | ||
215 | #define __HAVE_ARCH_CMPXCHG 1 | ||
216 | |||
217 | static __inline__ unsigned long | ||
218 | __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) | ||
219 | { | ||
220 | unsigned long flags; | ||
221 | unsigned int retval; | ||
222 | |||
223 | local_irq_save(flags); | ||
224 | __asm__ __volatile__ ( | ||
225 | DCACHE_CLEAR("%0", "r4", "%1") | ||
226 | M32R_LOCK" %0, @%1; \n" | ||
227 | " bne %0, %2, 1f; \n" | ||
228 | M32R_UNLOCK" %3, @%1; \n" | ||
229 | " bra 2f; \n" | ||
230 | " .fillinsn \n" | ||
231 | "1:" | ||
232 | M32R_UNLOCK" %2, @%1; \n" | ||
233 | " .fillinsn \n" | ||
234 | "2:" | ||
235 | : "=&r" (retval) | ||
236 | : "r" (p), "r" (old), "r" (new) | ||
237 | : "cbit", "memory" | ||
238 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
239 | , "r4" | ||
240 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
241 | ); | ||
242 | local_irq_restore(flags); | ||
243 | |||
244 | return retval; | ||
245 | } | ||
246 | |||
247 | /* This function doesn't exist, so you'll get a linker error | ||
248 | if something tries to do an invalid cmpxchg(). */ | ||
249 | extern void __cmpxchg_called_with_bad_pointer(void); | ||
250 | |||
251 | static __inline__ unsigned long | ||
252 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | ||
253 | { | ||
254 | switch (size) { | ||
255 | case 4: | ||
256 | return __cmpxchg_u32(ptr, old, new); | ||
257 | #if 0 /* we don't have __cmpxchg_u64 */ | ||
258 | case 8: | ||
259 | return __cmpxchg_u64(ptr, old, new); | ||
260 | #endif /* 0 */ | ||
261 | } | ||
262 | __cmpxchg_called_with_bad_pointer(); | ||
263 | return old; | ||
264 | } | ||
265 | |||
266 | #define cmpxchg(ptr,o,n) \ | ||
267 | ({ \ | ||
268 | __typeof__(*(ptr)) _o_ = (o); \ | ||
269 | __typeof__(*(ptr)) _n_ = (n); \ | ||
270 | (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ | ||
271 | (unsigned long)_n_, sizeof(*(ptr))); \ | ||
272 | }) | ||
273 | |||
274 | #endif /* __KERNEL__ */ | ||
275 | |||
216 | /* | 276 | /* |
217 | * Memory barrier. | 277 | * Memory barrier. |
218 | * | 278 | * |
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 6a35e6570ccd..f89f06050893 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
3 | * Rewrite, cleanup: | 3 | * Rewrite, cleanup: |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 1e6e7846824f..6642c0125001 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -103,8 +103,9 @@ extern unsigned int HPAGE_SHIFT; | |||
103 | #define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) | 103 | #define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) |
104 | #define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) | 104 | #define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) |
105 | 105 | ||
106 | #define LOW_ESID_MASK(addr, len) (((1U << (GET_ESID(addr+len-1)+1)) \ | 106 | #define LOW_ESID_MASK(addr, len) \ |
107 | - (1U << GET_ESID(addr))) & 0xffff) | 107 | (((1U << (GET_ESID(min((addr)+(len)-1, 0x100000000UL))+1)) \ |
108 | - (1U << GET_ESID(min((addr), 0x100000000UL)))) & 0xffff) | ||
108 | #define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ | 109 | #define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ |
109 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) | 110 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) |
110 | 111 | ||
@@ -113,17 +114,21 @@ extern unsigned int HPAGE_SHIFT; | |||
113 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | 114 | #define ARCH_HAS_SETCLEAR_HUGE_PTE |
114 | 115 | ||
115 | #define touches_hugepage_low_range(mm, addr, len) \ | 116 | #define touches_hugepage_low_range(mm, addr, len) \ |
116 | (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas) | 117 | (((addr) < 0x100000000UL) \ |
118 | && (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas)) | ||
117 | #define touches_hugepage_high_range(mm, addr, len) \ | 119 | #define touches_hugepage_high_range(mm, addr, len) \ |
118 | (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas) | 120 | ((((addr) + (len)) > 0x100000000UL) \ |
121 | && (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas)) | ||
119 | 122 | ||
120 | #define __within_hugepage_low_range(addr, len, segmask) \ | 123 | #define __within_hugepage_low_range(addr, len, segmask) \ |
121 | ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)) | 124 | ( (((addr)+(len)) <= 0x100000000UL) \ |
125 | && ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask))) | ||
122 | #define within_hugepage_low_range(addr, len) \ | 126 | #define within_hugepage_low_range(addr, len) \ |
123 | __within_hugepage_low_range((addr), (len), \ | 127 | __within_hugepage_low_range((addr), (len), \ |
124 | current->mm->context.low_htlb_areas) | 128 | current->mm->context.low_htlb_areas) |
125 | #define __within_hugepage_high_range(addr, len, zonemask) \ | 129 | #define __within_hugepage_high_range(addr, len, zonemask) \ |
126 | ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)) | 130 | ( ((addr) >= 0x100000000UL) \ |
131 | && ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask))) | ||
127 | #define within_hugepage_high_range(addr, len) \ | 132 | #define within_hugepage_high_range(addr, len) \ |
128 | __within_hugepage_high_range((addr), (len), \ | 133 | __within_hugepage_high_range((addr), (len), \ |
129 | current->mm->context.high_htlb_areas) | 134 | current->mm->context.high_htlb_areas) |
@@ -135,9 +140,9 @@ extern unsigned int HPAGE_SHIFT; | |||
135 | 140 | ||
136 | #define in_hugepage_area(context, addr) \ | 141 | #define in_hugepage_area(context, addr) \ |
137 | (cpu_has_feature(CPU_FTR_16M_PAGE) && \ | 142 | (cpu_has_feature(CPU_FTR_16M_PAGE) && \ |
138 | ( ((1 << GET_HTLB_AREA(addr)) & (context).high_htlb_areas) || \ | 143 | ( ( (addr) >= 0x100000000UL) \ |
139 | ( ((addr) < 0x100000000L) && \ | 144 | ? ((1 << GET_HTLB_AREA(addr)) & (context).high_htlb_areas) \ |
140 | ((1 << GET_ESID(addr)) & (context).low_htlb_areas) ) ) ) | 145 | : ((1 << GET_ESID(addr)) & (context).low_htlb_areas) ) ) |
141 | 146 | ||
142 | #else /* !CONFIG_HUGETLB_PAGE */ | 147 | #else /* !CONFIG_HUGETLB_PAGE */ |
143 | 148 | ||
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h index d099d5200f9b..980a094fd5a7 100644 --- a/include/asm-powerpc/tce.h +++ b/include/asm-powerpc/tce.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
3 | * Rewrite, cleanup: | 3 | * Rewrite, cleanup: |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index 8198c3d0d007..3789fe315992 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h | |||
@@ -54,6 +54,7 @@ extern int atomic64_sub_ret(int, atomic64_t *); | |||
54 | * other cases. | 54 | * other cases. |
55 | */ | 55 | */ |
56 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | 56 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
57 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | ||
57 | 58 | ||
58 | #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) | 59 | #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) |
59 | #define atomic64_sub_and_test(i, v) (atomic64_sub_ret(i, v) == 0) | 60 | #define atomic64_sub_and_test(i, v) (atomic64_sub_ret(i, v) == 0) |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 9a02879b235d..f0a9b44d3eb5 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -348,16 +348,6 @@ extern unsigned long find_ecache_flush_span(unsigned long size); | |||
348 | struct vm_area_struct; | 348 | struct vm_area_struct; |
349 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 349 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); |
350 | 350 | ||
351 | /* Make a non-present pseudo-TTE. */ | ||
352 | static inline pte_t mk_pte_io(unsigned long page, pgprot_t prot, int space) | ||
353 | { | ||
354 | pte_t pte; | ||
355 | pte_val(pte) = (((page) | pgprot_val(prot) | _PAGE_E) & | ||
356 | ~(unsigned long)_PAGE_CACHE); | ||
357 | pte_val(pte) |= (((unsigned long)space) << 32); | ||
358 | return pte; | ||
359 | } | ||
360 | |||
361 | /* Encode and de-code a swap entry */ | 351 | /* Encode and de-code a swap entry */ |
362 | #define __swp_type(entry) (((entry).val >> PAGE_SHIFT) & 0xffUL) | 352 | #define __swp_type(entry) (((entry).val >> PAGE_SHIFT) & 0xffUL) |
363 | #define __swp_offset(entry) ((entry).val >> (PAGE_SHIFT + 8UL)) | 353 | #define __swp_offset(entry) ((entry).val >> (PAGE_SHIFT + 8UL)) |
diff --git a/include/asm-um/ldt-i386.h b/include/asm-um/ldt-i386.h index b42662929b6c..175722a91164 100644 --- a/include/asm-um/ldt-i386.h +++ b/include/asm-um/ldt-i386.h | |||
@@ -35,7 +35,7 @@ typedef struct uml_ldt { | |||
35 | union { | 35 | union { |
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | 36 | struct ldt_entry * pages[LDT_PAGES_MAX]; |
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | 37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; |
38 | }; | 38 | } u; |
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt-x86_64.h index 4466ff6de0fd..175722a91164 100644 --- a/include/asm-um/ldt.h +++ b/include/asm-um/ldt-x86_64.h | |||
@@ -35,7 +35,7 @@ typedef struct uml_ldt { | |||
35 | union { | 35 | union { |
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | 36 | struct ldt_entry * pages[LDT_PAGES_MAX]; |
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | 37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; |
38 | }; | 38 | } u; |
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
@@ -67,8 +67,3 @@ typedef struct uml_ldt { | |||
67 | (info)->useable == 0 ) | 67 | (info)->useable == 0 ) |
68 | 68 | ||
69 | #endif | 69 | #endif |
70 | #ifndef __UM_LDT_H | ||
71 | #define __UM_LDT_H | ||
72 | |||
73 | #include "asm/arch/ldt.h" | ||
74 | #endif | ||
diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index 0866ef67f198..50db9f39274f 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h | |||
@@ -160,8 +160,8 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) | |||
160 | 160 | ||
161 | /** | 161 | /** |
162 | * atomic_add_negative - add and test if negative | 162 | * atomic_add_negative - add and test if negative |
163 | * @v: pointer of type atomic_t | ||
164 | * @i: integer value to add | 163 | * @i: integer value to add |
164 | * @v: pointer of type atomic_t | ||
165 | * | 165 | * |
166 | * Atomically adds @i to @v and returns true | 166 | * Atomically adds @i to @v and returns true |
167 | * if the result is negative, or false when | 167 | * if the result is negative, or false when |
@@ -178,6 +178,31 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) | |||
178 | return c; | 178 | return c; |
179 | } | 179 | } |
180 | 180 | ||
181 | /** | ||
182 | * atomic_add_return - add and return | ||
183 | * @i: integer value to add | ||
184 | * @v: pointer of type atomic_t | ||
185 | * | ||
186 | * Atomically adds @i to @v and returns @i + @v | ||
187 | */ | ||
188 | static __inline__ int atomic_add_return(int i, atomic_t *v) | ||
189 | { | ||
190 | int __i = i; | ||
191 | __asm__ __volatile__( | ||
192 | LOCK "xaddl %0, %1;" | ||
193 | :"=r"(i) | ||
194 | :"m"(v->counter), "0"(i)); | ||
195 | return i + __i; | ||
196 | } | ||
197 | |||
198 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | ||
199 | { | ||
200 | return atomic_add_return(-i,v); | ||
201 | } | ||
202 | |||
203 | #define atomic_inc_return(v) (atomic_add_return(1,v)) | ||
204 | #define atomic_dec_return(v) (atomic_sub_return(1,v)) | ||
205 | |||
181 | /* An 64bit atomic type */ | 206 | /* An 64bit atomic type */ |
182 | 207 | ||
183 | typedef struct { volatile long counter; } atomic64_t; | 208 | typedef struct { volatile long counter; } atomic64_t; |
@@ -320,14 +345,14 @@ static __inline__ int atomic64_inc_and_test(atomic64_t *v) | |||
320 | 345 | ||
321 | /** | 346 | /** |
322 | * atomic64_add_negative - add and test if negative | 347 | * atomic64_add_negative - add and test if negative |
323 | * @v: pointer to atomic64_t | ||
324 | * @i: integer value to add | 348 | * @i: integer value to add |
349 | * @v: pointer to type atomic64_t | ||
325 | * | 350 | * |
326 | * Atomically adds @i to @v and returns true | 351 | * Atomically adds @i to @v and returns true |
327 | * if the result is negative, or false when | 352 | * if the result is negative, or false when |
328 | * result is greater than or equal to zero. | 353 | * result is greater than or equal to zero. |
329 | */ | 354 | */ |
330 | static __inline__ long atomic64_add_negative(long i, atomic64_t *v) | 355 | static __inline__ int atomic64_add_negative(long i, atomic64_t *v) |
331 | { | 356 | { |
332 | unsigned char c; | 357 | unsigned char c; |
333 | 358 | ||
@@ -339,27 +364,30 @@ static __inline__ long atomic64_add_negative(long i, atomic64_t *v) | |||
339 | } | 364 | } |
340 | 365 | ||
341 | /** | 366 | /** |
342 | * atomic_add_return - add and return | 367 | * atomic64_add_return - add and return |
343 | * @v: pointer of type atomic_t | ||
344 | * @i: integer value to add | 368 | * @i: integer value to add |
369 | * @v: pointer to type atomic64_t | ||
345 | * | 370 | * |
346 | * Atomically adds @i to @v and returns @i + @v | 371 | * Atomically adds @i to @v and returns @i + @v |
347 | */ | 372 | */ |
348 | static __inline__ int atomic_add_return(int i, atomic_t *v) | 373 | static __inline__ long atomic64_add_return(long i, atomic64_t *v) |
349 | { | 374 | { |
350 | int __i = i; | 375 | long __i = i; |
351 | __asm__ __volatile__( | 376 | __asm__ __volatile__( |
352 | LOCK "xaddl %0, %1;" | 377 | LOCK "xaddq %0, %1;" |
353 | :"=r"(i) | 378 | :"=r"(i) |
354 | :"m"(v->counter), "0"(i)); | 379 | :"m"(v->counter), "0"(i)); |
355 | return i + __i; | 380 | return i + __i; |
356 | } | 381 | } |
357 | 382 | ||
358 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | 383 | static __inline__ long atomic64_sub_return(long i, atomic64_t *v) |
359 | { | 384 | { |
360 | return atomic_add_return(-i,v); | 385 | return atomic64_add_return(-i,v); |
361 | } | 386 | } |
362 | 387 | ||
388 | #define atomic64_inc_return(v) (atomic64_add_return(1,v)) | ||
389 | #define atomic64_dec_return(v) (atomic64_sub_return(1,v)) | ||
390 | |||
363 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) | 391 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) |
364 | 392 | ||
365 | /** | 393 | /** |
@@ -381,9 +409,6 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
381 | }) | 409 | }) |
382 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 410 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
383 | 411 | ||
384 | #define atomic_inc_return(v) (atomic_add_return(1,v)) | ||
385 | #define atomic_dec_return(v) (atomic_sub_return(1,v)) | ||
386 | |||
387 | /* These are x86-specific, used by some header files */ | 412 | /* These are x86-specific, used by some header files */ |
388 | #define atomic_clear_mask(mask, addr) \ | 413 | #define atomic_clear_mask(mask, addr) \ |
389 | __asm__ __volatile__(LOCK "andl %0,%1" \ | 414 | __asm__ __volatile__(LOCK "andl %0,%1" \ |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 24dc39651bc4..10f8b51cec8b 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -56,7 +56,7 @@ | |||
56 | ".section __ex_table,\"a\"\n" \ | 56 | ".section __ex_table,\"a\"\n" \ |
57 | " .align 8\n" \ | 57 | " .align 8\n" \ |
58 | " .quad 1b,3b\n" \ | 58 | " .quad 1b,3b\n" \ |
59 | ".previous":"=&bDS" (ret__), "=a"(a), "=d"(b)\ | 59 | ".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b))\ |
60 | :"c"(msr), "i"(-EIO), "0"(0)); \ | 60 | :"c"(msr), "i"(-EIO), "0"(0)); \ |
61 | ret__; }) | 61 | ret__; }) |
62 | 62 | ||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 43c44530ef9d..0ed1d4853c69 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -65,10 +65,9 @@ extern struct sysdev_class cpu_sysdev_class; | |||
65 | 65 | ||
66 | #ifdef CONFIG_HOTPLUG_CPU | 66 | #ifdef CONFIG_HOTPLUG_CPU |
67 | /* Stop CPUs going up and down. */ | 67 | /* Stop CPUs going up and down. */ |
68 | extern struct semaphore cpucontrol; | 68 | extern void lock_cpu_hotplug(void); |
69 | #define lock_cpu_hotplug() down(&cpucontrol) | 69 | extern void unlock_cpu_hotplug(void); |
70 | #define unlock_cpu_hotplug() up(&cpucontrol) | 70 | extern int lock_cpu_hotplug_interruptible(void); |
71 | #define lock_cpu_hotplug_interruptible() down_interruptible(&cpucontrol) | ||
72 | #define hotcpu_notifier(fn, pri) { \ | 71 | #define hotcpu_notifier(fn, pri) { \ |
73 | static struct notifier_block fn##_nb = \ | 72 | static struct notifier_block fn##_nb = \ |
74 | { .notifier_call = fn, .priority = pri }; \ | 73 | { .notifier_call = fn, .priority = pri }; \ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 313dfe9b443a..8b2eab90abb6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -11,7 +11,7 @@ struct vm_area_struct; | |||
11 | /* | 11 | /* |
12 | * GFP bitmasks.. | 12 | * GFP bitmasks.. |
13 | */ | 13 | */ |
14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ | 14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low three bits) */ |
15 | #define __GFP_DMA ((__force gfp_t)0x01u) | 15 | #define __GFP_DMA ((__force gfp_t)0x01u) |
16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) | 16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) |
17 | #ifdef CONFIG_DMA_IS_DMA32 | 17 | #ifdef CONFIG_DMA_IS_DMA32 |
@@ -74,7 +74,12 @@ struct vm_area_struct; | |||
74 | #define GFP_DMA32 __GFP_DMA32 | 74 | #define GFP_DMA32 __GFP_DMA32 |
75 | 75 | ||
76 | 76 | ||
77 | #define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK)) | 77 | static inline int gfp_zone(gfp_t gfp) |
78 | { | ||
79 | int zone = GFP_ZONEMASK & (__force int) gfp; | ||
80 | BUG_ON(zone >= GFP_ZONETYPES); | ||
81 | return zone; | ||
82 | } | ||
78 | 83 | ||
79 | /* | 84 | /* |
80 | * There is only one page-allocator function, and two main namespaces to | 85 | * There is only one page-allocator function, and two main namespaces to |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index aa56172c6fed..dcde7adfdce5 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -16,8 +16,6 @@ | |||
16 | #ifndef _LINUX_JBD_H | 16 | #ifndef _LINUX_JBD_H |
17 | #define _LINUX_JBD_H | 17 | #define _LINUX_JBD_H |
18 | 18 | ||
19 | #if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || !defined(__KERNEL__) | ||
20 | |||
21 | /* Allow this file to be included directly into e2fsprogs */ | 19 | /* Allow this file to be included directly into e2fsprogs */ |
22 | #ifndef __KERNEL__ | 20 | #ifndef __KERNEL__ |
23 | #include "jfs_compat.h" | 21 | #include "jfs_compat.h" |
@@ -1083,19 +1081,4 @@ extern int jbd_blocks_per_page(struct inode *inode); | |||
1083 | 1081 | ||
1084 | #endif /* __KERNEL__ */ | 1082 | #endif /* __KERNEL__ */ |
1085 | 1083 | ||
1086 | #endif /* CONFIG_JBD || CONFIG_JBD_MODULE || !__KERNEL__ */ | ||
1087 | |||
1088 | /* | ||
1089 | * Compatibility no-ops which allow the kernel to compile without CONFIG_JBD | ||
1090 | * go here. | ||
1091 | */ | ||
1092 | |||
1093 | #if defined(__KERNEL__) && !(defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE)) | ||
1094 | |||
1095 | #define J_ASSERT(expr) do {} while (0) | ||
1096 | #define J_ASSERT_BH(bh, expr) do {} while (0) | ||
1097 | #define buffer_jbd(bh) 0 | ||
1098 | #define journal_buffer_journal_lru(bh) 0 | ||
1099 | |||
1100 | #endif /* defined(__KERNEL__) && !defined(CONFIG_JBD) */ | ||
1101 | #endif /* _LINUX_JBD_H */ | 1084 | #endif /* _LINUX_JBD_H */ |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 9a424383e6c6..dc4081b6f161 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -85,7 +85,6 @@ struct notifier_block; | |||
85 | extern int register_memory_notifier(struct notifier_block *nb); | 85 | extern int register_memory_notifier(struct notifier_block *nb); |
86 | extern void unregister_memory_notifier(struct notifier_block *nb); | 86 | extern void unregister_memory_notifier(struct notifier_block *nb); |
87 | 87 | ||
88 | extern struct sysdev_class memory_sysdev_class; | ||
89 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 88 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
90 | 89 | ||
91 | #define hotplug_memory_notifier(fn, pri) { \ | 90 | #define hotplug_memory_notifier(fn, pri) { \ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0986d19be0b7..6a75a7a78bf1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -144,7 +144,8 @@ extern unsigned int kobjsize(const void *objp); | |||
144 | 144 | ||
145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
146 | #define VM_GROWSUP 0x00000200 | 146 | #define VM_GROWSUP 0x00000200 |
147 | #define VM_SHM 0x00000400 /* shared memory area, don't swap out */ | 147 | #define VM_SHM 0x00000000 /* Means nothing: delete it later */ |
148 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | ||
148 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 149 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
149 | 150 | ||
150 | #define VM_EXECUTABLE 0x00001000 | 151 | #define VM_EXECUTABLE 0x00001000 |
@@ -157,7 +158,7 @@ extern unsigned int kobjsize(const void *objp); | |||
157 | 158 | ||
158 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ | 159 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ |
159 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ | 160 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ |
160 | #define VM_RESERVED 0x00080000 /* Pages managed in a special way */ | 161 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ |
161 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ | 162 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ |
162 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 163 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
163 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 164 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
@@ -311,8 +312,6 @@ struct page { | |||
311 | 312 | ||
312 | extern void FASTCALL(__page_cache_release(struct page *)); | 313 | extern void FASTCALL(__page_cache_release(struct page *)); |
313 | 314 | ||
314 | #ifdef CONFIG_HUGETLB_PAGE | ||
315 | |||
316 | static inline int page_count(struct page *page) | 315 | static inline int page_count(struct page *page) |
317 | { | 316 | { |
318 | if (PageCompound(page)) | 317 | if (PageCompound(page)) |
@@ -329,23 +328,6 @@ static inline void get_page(struct page *page) | |||
329 | 328 | ||
330 | void put_page(struct page *page); | 329 | void put_page(struct page *page); |
331 | 330 | ||
332 | #else /* CONFIG_HUGETLB_PAGE */ | ||
333 | |||
334 | #define page_count(p) (atomic_read(&(p)->_count) + 1) | ||
335 | |||
336 | static inline void get_page(struct page *page) | ||
337 | { | ||
338 | atomic_inc(&page->_count); | ||
339 | } | ||
340 | |||
341 | static inline void put_page(struct page *page) | ||
342 | { | ||
343 | if (put_page_testzero(page)) | ||
344 | __page_cache_release(page); | ||
345 | } | ||
346 | |||
347 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
348 | |||
349 | /* | 331 | /* |
350 | * Multiple processes may "see" the same page. E.g. for untouched | 332 | * Multiple processes may "see" the same page. E.g. for untouched |
351 | * mappings of /dev/null, all processes see the same page full of | 333 | * mappings of /dev/null, all processes see the same page full of |
@@ -682,6 +664,7 @@ struct zap_details { | |||
682 | unsigned long truncate_count; /* Compare vm_truncate_count */ | 664 | unsigned long truncate_count; /* Compare vm_truncate_count */ |
683 | }; | 665 | }; |
684 | 666 | ||
667 | struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t); | ||
685 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, | 668 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, |
686 | unsigned long size, struct zap_details *); | 669 | unsigned long size, struct zap_details *); |
687 | unsigned long unmap_vmas(struct mmu_gather **tlb, | 670 | unsigned long unmap_vmas(struct mmu_gather **tlb, |
@@ -971,7 +954,7 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
971 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 954 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
972 | unsigned long pfn, unsigned long size, pgprot_t); | 955 | unsigned long pfn, unsigned long size, pgprot_t); |
973 | 956 | ||
974 | struct page *follow_page(struct mm_struct *, unsigned long address, | 957 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
975 | unsigned int foll_flags); | 958 | unsigned int foll_flags); |
976 | #define FOLL_WRITE 0x01 /* check pte is writable */ | 959 | #define FOLL_WRITE 0x01 /* check pte is writable */ |
977 | #define FOLL_TOUCH 0x02 /* mark page accessed */ | 960 | #define FOLL_TOUCH 0x02 /* mark page accessed */ |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index f819cae92266..a14dc306545b 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -63,7 +63,7 @@ | |||
63 | /* class 5 */ | 63 | /* class 5 */ |
64 | #define MMC_ERASE_GROUP_START 35 /* ac [31:0] data addr R1 */ | 64 | #define MMC_ERASE_GROUP_START 35 /* ac [31:0] data addr R1 */ |
65 | #define MMC_ERASE_GROUP_END 36 /* ac [31:0] data addr R1 */ | 65 | #define MMC_ERASE_GROUP_END 36 /* ac [31:0] data addr R1 */ |
66 | #define MMC_ERASE 37 /* ac R1b */ | 66 | #define MMC_ERASE 38 /* ac R1b */ |
67 | 67 | ||
68 | /* class 9 */ | 68 | /* class 9 */ |
69 | #define MMC_FAST_IO 39 /* ac <Complex> R4 */ | 69 | #define MMC_FAST_IO 39 /* ac <Complex> R4 */ |
@@ -74,7 +74,7 @@ | |||
74 | 74 | ||
75 | /* class 8 */ | 75 | /* class 8 */ |
76 | #define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */ | 76 | #define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */ |
77 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1b */ | 77 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ |
78 | 78 | ||
79 | /* SD commands type argument response */ | 79 | /* SD commands type argument response */ |
80 | /* class 8 */ | 80 | /* class 8 */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2c8edad5dccf..9f22090df7dd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -91,21 +91,11 @@ struct per_cpu_pageset { | |||
91 | * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will | 91 | * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will |
92 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible | 92 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible |
93 | * combinations of zone modifiers in "zone modifier space". | 93 | * combinations of zone modifiers in "zone modifier space". |
94 | * | ||
95 | * NOTE! Make sure this matches the zones in <linux/gfp.h> | ||
94 | */ | 96 | */ |
95 | #define GFP_ZONEMASK 0x03 | 97 | #define GFP_ZONEMASK 0x07 |
96 | /* | 98 | #define GFP_ZONETYPES 5 |
97 | * As an optimisation any zone modifier bits which are only valid when | ||
98 | * no other zone modifier bits are set (loners) should be placed in | ||
99 | * the highest order bits of this field. This allows us to reduce the | ||
100 | * extent of the zonelists thus saving space. For example in the case | ||
101 | * of three zone modifier bits, we could require up to eight zonelists. | ||
102 | * If the left most zone modifier is a "loner" then the highest valid | ||
103 | * zonelist would be four allowing us to allocate only five zonelists. | ||
104 | * Use the first form when the left most bit is not a "loner", otherwise | ||
105 | * use the second. | ||
106 | */ | ||
107 | /* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */ | ||
108 | #define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ | ||
109 | 99 | ||
110 | /* | 100 | /* |
111 | * On machines where it is needed (eg PCs) we divide physical memory | 101 | * On machines where it is needed (eg PCs) we divide physical memory |
diff --git a/include/linux/netfilter_ipv4/ipt_sctp.h b/include/linux/netfilter_ipv4/ipt_sctp.h index e93a9ec99fc2..80b3dbacd193 100644 --- a/include/linux/netfilter_ipv4/ipt_sctp.h +++ b/include/linux/netfilter_ipv4/ipt_sctp.h | |||
@@ -7,8 +7,6 @@ | |||
7 | 7 | ||
8 | #define IPT_SCTP_VALID_FLAGS 0x07 | 8 | #define IPT_SCTP_VALID_FLAGS 0x07 |
9 | 9 | ||
10 | #define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0])) | ||
11 | |||
12 | 10 | ||
13 | struct ipt_sctp_flag_info { | 11 | struct ipt_sctp_flag_info { |
14 | u_int8_t chunktype; | 12 | u_int8_t chunktype; |
@@ -59,21 +57,21 @@ struct ipt_sctp_info { | |||
59 | #define SCTP_CHUNKMAP_RESET(chunkmap) \ | 57 | #define SCTP_CHUNKMAP_RESET(chunkmap) \ |
60 | do { \ | 58 | do { \ |
61 | int i; \ | 59 | int i; \ |
62 | for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | 60 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ |
63 | chunkmap[i] = 0; \ | 61 | chunkmap[i] = 0; \ |
64 | } while (0) | 62 | } while (0) |
65 | 63 | ||
66 | #define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ | 64 | #define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ |
67 | do { \ | 65 | do { \ |
68 | int i; \ | 66 | int i; \ |
69 | for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | 67 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ |
70 | chunkmap[i] = ~0; \ | 68 | chunkmap[i] = ~0; \ |
71 | } while (0) | 69 | } while (0) |
72 | 70 | ||
73 | #define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ | 71 | #define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ |
74 | do { \ | 72 | do { \ |
75 | int i; \ | 73 | int i; \ |
76 | for (i = 0; i < ELEMCOUNT(chunkmap); i++) \ | 74 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ |
77 | destmap[i] = srcmap[i]; \ | 75 | destmap[i] = srcmap[i]; \ |
78 | } while (0) | 76 | } while (0) |
79 | 77 | ||
@@ -81,7 +79,7 @@ struct ipt_sctp_info { | |||
81 | ({ \ | 79 | ({ \ |
82 | int i; \ | 80 | int i; \ |
83 | int flag = 1; \ | 81 | int flag = 1; \ |
84 | for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \ | 82 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \ |
85 | if (chunkmap[i]) { \ | 83 | if (chunkmap[i]) { \ |
86 | flag = 0; \ | 84 | flag = 0; \ |
87 | break; \ | 85 | break; \ |
@@ -94,7 +92,7 @@ struct ipt_sctp_info { | |||
94 | ({ \ | 92 | ({ \ |
95 | int i; \ | 93 | int i; \ |
96 | int flag = 1; \ | 94 | int flag = 1; \ |
97 | for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \ | 95 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \ |
98 | if (chunkmap[i] != ~0) { \ | 96 | if (chunkmap[i] != ~0) { \ |
99 | flag = 0; \ | 97 | flag = 0; \ |
100 | break; \ | 98 | break; \ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f34767c5fc79..343083fec258 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -287,11 +287,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
287 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) | 287 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) |
288 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) | 288 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) |
289 | 289 | ||
290 | #ifdef CONFIG_HUGETLB_PAGE | ||
291 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) | 290 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) |
292 | #else | ||
293 | #define PageCompound(page) 0 | ||
294 | #endif | ||
295 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) | 291 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) |
296 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) | 292 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) |
297 | 293 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index efb60d06caab..1e737e269db9 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1199,6 +1199,7 @@ | |||
1199 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 | 1199 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 |
1200 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 | 1200 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 |
1201 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 | 1201 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 |
1202 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 | ||
1202 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1203 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1203 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1204 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1204 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1205 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 35b30e6c8cf8..33261f1d2239 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -89,7 +89,7 @@ static inline void page_dup_rmap(struct page *page) | |||
89 | /* | 89 | /* |
90 | * Called from mm/vmscan.c to handle paging out | 90 | * Called from mm/vmscan.c to handle paging out |
91 | */ | 91 | */ |
92 | int page_referenced(struct page *, int is_locked, int ignore_token); | 92 | int page_referenced(struct page *, int is_locked); |
93 | int try_to_unmap(struct page *); | 93 | int try_to_unmap(struct page *); |
94 | 94 | ||
95 | /* | 95 | /* |
@@ -109,7 +109,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); | |||
109 | #define anon_vma_prepare(vma) (0) | 109 | #define anon_vma_prepare(vma) (0) |
110 | #define anon_vma_link(vma) do {} while (0) | 110 | #define anon_vma_link(vma) do {} while (0) |
111 | 111 | ||
112 | #define page_referenced(page,l,i) TestClearPageReferenced(page) | 112 | #define page_referenced(page,l) TestClearPageReferenced(page) |
113 | #define try_to_unmap(page) SWAP_FAIL | 113 | #define try_to_unmap(page) SWAP_FAIL |
114 | 114 | ||
115 | #endif /* CONFIG_MMU */ | 115 | #endif /* CONFIG_MMU */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2038bd27b041..b0ad6f30679e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -908,7 +908,6 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) | |||
908 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ | 908 | #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ |
909 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ | 909 | #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ |
910 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ | 910 | #define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ |
911 | #define PF_HOTPLUG_CPU 0x01000000 /* Currently performing CPU hotplug */ | ||
912 | 911 | ||
913 | /* | 912 | /* |
914 | * Only the _current_ task can read/write to tsk->flags, but other | 913 | * Only the _current_ task can read/write to tsk->flags, but other |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index a3ac92b19aca..e3710d7e260a 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -121,6 +121,9 @@ | |||
121 | 121 | ||
122 | #define PORT_IP3106 70 | 122 | #define PORT_IP3106 70 |
123 | 123 | ||
124 | /* Hilscher netx */ | ||
125 | #define PORT_NETX 71 | ||
126 | |||
124 | #ifdef __KERNEL__ | 127 | #ifdef __KERNEL__ |
125 | 128 | ||
126 | #include <linux/config.h> | 129 | #include <linux/config.h> |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0a8ea8b35816..8c5d6001a923 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -206,6 +206,7 @@ enum { | |||
206 | * @nfct: Associated connection, if any | 206 | * @nfct: Associated connection, if any |
207 | * @ipvs_property: skbuff is owned by ipvs | 207 | * @ipvs_property: skbuff is owned by ipvs |
208 | * @nfctinfo: Relationship of this skb to the connection | 208 | * @nfctinfo: Relationship of this skb to the connection |
209 | * @nfct_reasm: netfilter conntrack re-assembly pointer | ||
209 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 210 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
210 | * @tc_index: Traffic control index | 211 | * @tc_index: Traffic control index |
211 | * @tc_verd: traffic control verdict | 212 | * @tc_verd: traffic control verdict |
@@ -264,16 +265,14 @@ struct sk_buff { | |||
264 | nohdr:1, | 265 | nohdr:1, |
265 | nfctinfo:3; | 266 | nfctinfo:3; |
266 | __u8 pkt_type:3, | 267 | __u8 pkt_type:3, |
267 | fclone:2; | 268 | fclone:2, |
269 | ipvs_property:1; | ||
268 | __be16 protocol; | 270 | __be16 protocol; |
269 | 271 | ||
270 | void (*destructor)(struct sk_buff *skb); | 272 | void (*destructor)(struct sk_buff *skb); |
271 | #ifdef CONFIG_NETFILTER | 273 | #ifdef CONFIG_NETFILTER |
272 | __u32 nfmark; | 274 | __u32 nfmark; |
273 | struct nf_conntrack *nfct; | 275 | struct nf_conntrack *nfct; |
274 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) | ||
275 | __u8 ipvs_property:1; | ||
276 | #endif | ||
277 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 276 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
278 | struct sk_buff *nfct_reasm; | 277 | struct sk_buff *nfct_reasm; |
279 | #endif | 278 | #endif |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 20c975642cab..508668f840b6 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -239,6 +239,11 @@ static inline void put_swap_token(struct mm_struct *mm) | |||
239 | __put_swap_token(mm); | 239 | __put_swap_token(mm); |
240 | } | 240 | } |
241 | 241 | ||
242 | static inline void disable_swap_token(void) | ||
243 | { | ||
244 | put_swap_token(swap_token_mm); | ||
245 | } | ||
246 | |||
242 | #else /* CONFIG_SWAP */ | 247 | #else /* CONFIG_SWAP */ |
243 | 248 | ||
244 | #define total_swap_pages 0 | 249 | #define total_swap_pages 0 |
@@ -283,6 +288,7 @@ static inline swp_entry_t get_swap_page(void) | |||
283 | #define put_swap_token(x) do { } while(0) | 288 | #define put_swap_token(x) do { } while(0) |
284 | #define grab_swap_token() do { } while(0) | 289 | #define grab_swap_token() do { } while(0) |
285 | #define has_swap_token(x) 0 | 290 | #define has_swap_token(x) 0 |
291 | #define disable_swap_token() do { } while(0) | ||
286 | 292 | ||
287 | #endif /* CONFIG_SWAP */ | 293 | #endif /* CONFIG_SWAP */ |
288 | #endif /* __KERNEL__*/ | 294 | #endif /* __KERNEL__*/ |
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 84876077027f..0ff7ca68e5c5 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -34,8 +34,7 @@ | |||
34 | #define UINPUT_BUFFER_SIZE 16 | 34 | #define UINPUT_BUFFER_SIZE 16 |
35 | #define UINPUT_NUM_REQUESTS 16 | 35 | #define UINPUT_NUM_REQUESTS 16 |
36 | 36 | ||
37 | /* state flags => bit index for {set|clear|test}_bit ops */ | 37 | enum uinput_state { UIST_NEW_DEVICE, UIST_SETUP_COMPLETE, UIST_CREATED }; |
38 | #define UIST_CREATED 0 | ||
39 | 38 | ||
40 | struct uinput_request { | 39 | struct uinput_request { |
41 | int id; | 40 | int id; |
@@ -52,11 +51,12 @@ struct uinput_request { | |||
52 | 51 | ||
53 | struct uinput_device { | 52 | struct uinput_device { |
54 | struct input_dev *dev; | 53 | struct input_dev *dev; |
55 | unsigned long state; | 54 | struct semaphore sem; |
55 | enum uinput_state state; | ||
56 | wait_queue_head_t waitq; | 56 | wait_queue_head_t waitq; |
57 | unsigned char ready, | 57 | unsigned char ready; |
58 | head, | 58 | unsigned char head; |
59 | tail; | 59 | unsigned char tail; |
60 | struct input_event buff[UINPUT_BUFFER_SIZE]; | 60 | struct input_event buff[UINPUT_BUFFER_SIZE]; |
61 | 61 | ||
62 | struct uinput_request *requests[UINPUT_NUM_REQUESTS]; | 62 | struct uinput_request *requests[UINPUT_NUM_REQUESTS]; |
@@ -91,6 +91,7 @@ struct uinput_ff_erase { | |||
91 | #define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int) | 91 | #define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int) |
92 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) | 92 | #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) |
93 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) | 93 | #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*) |
94 | #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) | ||
94 | 95 | ||
95 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) | 96 | #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) |
96 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) | 97 | #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 856d232c7562..d81b050e5955 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -47,6 +47,7 @@ struct usb_driver; | |||
47 | * @urb_list: urbs queued to this endpoint; maintained by usbcore | 47 | * @urb_list: urbs queued to this endpoint; maintained by usbcore |
48 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) | 48 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) |
49 | * with one or more transfer descriptors (TDs) per urb | 49 | * with one or more transfer descriptors (TDs) per urb |
50 | * @kobj: kobject for sysfs info | ||
50 | * @extra: descriptors following this endpoint in the configuration | 51 | * @extra: descriptors following this endpoint in the configuration |
51 | * @extralen: how many bytes of "extra" are valid | 52 | * @extralen: how many bytes of "extra" are valid |
52 | * | 53 | * |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6addb4d464d6..0a2ad51cff82 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -237,6 +237,8 @@ extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_t | |||
237 | int newtype, | 237 | int newtype, |
238 | struct ipv6_opt_hdr __user *newopt, | 238 | struct ipv6_opt_hdr __user *newopt, |
239 | int newoptlen); | 239 | int newoptlen); |
240 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | ||
241 | struct ipv6_txoptions *opt); | ||
240 | 242 | ||
241 | extern int ip6_frag_nqueues; | 243 | extern int ip6_frag_nqueues; |
242 | extern atomic_t ip6_frag_mem; | 244 | extern atomic_t ip6_frag_mem; |
diff --git a/include/net/route.h b/include/net/route.h index dbe79ca67d31..e3e5436f8017 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -126,6 +126,9 @@ extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); | |||
126 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); | 126 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); |
127 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | 127 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); |
128 | 128 | ||
129 | struct in_ifaddr; | ||
130 | extern void fib_add_ifaddr(struct in_ifaddr *); | ||
131 | |||
129 | static inline void ip_rt_put(struct rtable * rt) | 132 | static inline void ip_rt_put(struct rtable * rt) |
130 | { | 133 | { |
131 | if (rt) | 134 | if (rt) |