diff options
Diffstat (limited to 'include/asm-frv')
-rw-r--r-- | include/asm-frv/atomic.h | 96 | ||||
-rw-r--r-- | include/asm-frv/bug.h | 1 | ||||
-rw-r--r-- | include/asm-frv/dma-mapping.h | 2 | ||||
-rw-r--r-- | include/asm-frv/io.h | 123 | ||||
-rw-r--r-- | include/asm-frv/mb-regs.h | 4 | ||||
-rw-r--r-- | include/asm-frv/mc146818rtc.h | 16 | ||||
-rw-r--r-- | include/asm-frv/module.h | 16 | ||||
-rw-r--r-- | include/asm-frv/pci.h | 8 | ||||
-rw-r--r-- | include/asm-frv/pgtable.h | 5 | ||||
-rw-r--r-- | include/asm-frv/types.h | 1 | ||||
-rw-r--r-- | include/asm-frv/uaccess.h | 8 | ||||
-rw-r--r-- | include/asm-frv/unistd.h | 2 | ||||
-rw-r--r-- | include/asm-frv/vga.h | 17 | ||||
-rw-r--r-- | include/asm-frv/xor.h | 1 |
14 files changed, 198 insertions, 102 deletions
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 3f54fea2b051..9c9e9499cfd8 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h | |||
@@ -218,51 +218,12 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
218 | __typeof__(*(ptr)) __xg_orig; \ | 218 | __typeof__(*(ptr)) __xg_orig; \ |
219 | \ | 219 | \ |
220 | switch (sizeof(__xg_orig)) { \ | 220 | switch (sizeof(__xg_orig)) { \ |
221 | case 1: \ | ||
222 | asm volatile( \ | ||
223 | "0: \n" \ | ||
224 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
225 | " ckeq icc3,cc7 \n" \ | ||
226 | " ldub.p %M0,%1 \n" \ | ||
227 | " orcr cc7,cc7,cc3 \n" \ | ||
228 | " cstb.p %2,%M0 ,cc3,#1 \n" \ | ||
229 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
230 | " beq icc3,#0,0b \n" \ | ||
231 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
232 | : "r"(x) \ | ||
233 | : "memory", "cc7", "cc3", "icc3" \ | ||
234 | ); \ | ||
235 | break; \ | ||
236 | \ | ||
237 | case 2: \ | ||
238 | asm volatile( \ | ||
239 | "0: \n" \ | ||
240 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
241 | " ckeq icc3,cc7 \n" \ | ||
242 | " lduh.p %M0,%1 \n" \ | ||
243 | " orcr cc7,cc7,cc3 \n" \ | ||
244 | " csth.p %2,%M0 ,cc3,#1 \n" \ | ||
245 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
246 | " beq icc3,#0,0b \n" \ | ||
247 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
248 | : "r"(x) \ | ||
249 | : "memory", "cc7", "cc3", "icc3" \ | ||
250 | ); \ | ||
251 | break; \ | ||
252 | \ | ||
253 | case 4: \ | 221 | case 4: \ |
254 | asm volatile( \ | 222 | asm volatile( \ |
255 | "0: \n" \ | 223 | "swap%I0 %2,%M0" \ |
256 | " orcc gr0,gr0,gr0,icc3 \n" \ | 224 | : "+m"(*__xg_ptr), "=&r"(__xg_orig) \ |
257 | " ckeq icc3,cc7 \n" \ | ||
258 | " ld.p %M0,%1 \n" \ | ||
259 | " orcr cc7,cc7,cc3 \n" \ | ||
260 | " cst.p %2,%M0 ,cc3,#1 \n" \ | ||
261 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
262 | " beq icc3,#0,0b \n" \ | ||
263 | : "+U"(*__xg_ptr), "=&r"(__xg_orig) \ | ||
264 | : "r"(x) \ | 225 | : "r"(x) \ |
265 | : "memory", "cc7", "cc3", "icc3" \ | 226 | : "memory" \ |
266 | ); \ | 227 | ); \ |
267 | break; \ | 228 | break; \ |
268 | \ | 229 | \ |
@@ -277,8 +238,6 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
277 | 238 | ||
278 | #else | 239 | #else |
279 | 240 | ||
280 | extern uint8_t __xchg_8 (uint8_t i, volatile void *v); | ||
281 | extern uint16_t __xchg_16(uint16_t i, volatile void *v); | ||
282 | extern uint32_t __xchg_32(uint32_t i, volatile void *v); | 241 | extern uint32_t __xchg_32(uint32_t i, volatile void *v); |
283 | 242 | ||
284 | #define xchg(ptr, x) \ | 243 | #define xchg(ptr, x) \ |
@@ -287,8 +246,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
287 | __typeof__(*(ptr)) __xg_orig; \ | 246 | __typeof__(*(ptr)) __xg_orig; \ |
288 | \ | 247 | \ |
289 | switch (sizeof(__xg_orig)) { \ | 248 | switch (sizeof(__xg_orig)) { \ |
290 | case 1: __xg_orig = (__typeof__(*(ptr))) __xchg_8 ((uint8_t) x, __xg_ptr); break; \ | ||
291 | case 2: __xg_orig = (__typeof__(*(ptr))) __xchg_16((uint16_t) x, __xg_ptr); break; \ | ||
292 | case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ | 249 | case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ |
293 | default: \ | 250 | default: \ |
294 | __xg_orig = 0; \ | 251 | __xg_orig = 0; \ |
@@ -318,46 +275,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
318 | __typeof__(*(ptr)) __xg_new = (new); \ | 275 | __typeof__(*(ptr)) __xg_new = (new); \ |
319 | \ | 276 | \ |
320 | switch (sizeof(__xg_orig)) { \ | 277 | switch (sizeof(__xg_orig)) { \ |
321 | case 1: \ | ||
322 | asm volatile( \ | ||
323 | "0: \n" \ | ||
324 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
325 | " ckeq icc3,cc7 \n" \ | ||
326 | " ldub.p %M0,%1 \n" \ | ||
327 | " orcr cc7,cc7,cc3 \n" \ | ||
328 | " sub%I4 %1,%4,%2 \n" \ | ||
329 | " sllcc %2,#24,gr0,icc0 \n" \ | ||
330 | " bne icc0,#0,1f \n" \ | ||
331 | " cstb.p %3,%M0 ,cc3,#1 \n" \ | ||
332 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
333 | " beq icc3,#0,0b \n" \ | ||
334 | "1: \n" \ | ||
335 | : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp) \ | ||
336 | : "r"(__xg_new), "NPr"(__xg_test) \ | ||
337 | : "memory", "cc7", "cc3", "icc3", "icc0" \ | ||
338 | ); \ | ||
339 | break; \ | ||
340 | \ | ||
341 | case 2: \ | ||
342 | asm volatile( \ | ||
343 | "0: \n" \ | ||
344 | " orcc gr0,gr0,gr0,icc3 \n" \ | ||
345 | " ckeq icc3,cc7 \n" \ | ||
346 | " lduh.p %M0,%1 \n" \ | ||
347 | " orcr cc7,cc7,cc3 \n" \ | ||
348 | " sub%I4 %1,%4,%2 \n" \ | ||
349 | " sllcc %2,#16,gr0,icc0 \n" \ | ||
350 | " bne icc0,#0,1f \n" \ | ||
351 | " csth.p %3,%M0 ,cc3,#1 \n" \ | ||
352 | " corcc gr29,gr29,gr0 ,cc3,#1 \n" \ | ||
353 | " beq icc3,#0,0b \n" \ | ||
354 | "1: \n" \ | ||
355 | : "+U"(*__xg_ptr), "=&r"(__xg_orig), "=&r"(__xg_tmp) \ | ||
356 | : "r"(__xg_new), "NPr"(__xg_test) \ | ||
357 | : "memory", "cc7", "cc3", "icc3", "icc0" \ | ||
358 | ); \ | ||
359 | break; \ | ||
360 | \ | ||
361 | case 4: \ | 278 | case 4: \ |
362 | asm volatile( \ | 279 | asm volatile( \ |
363 | "0: \n" \ | 280 | "0: \n" \ |
@@ -388,8 +305,6 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); | |||
388 | 305 | ||
389 | #else | 306 | #else |
390 | 307 | ||
391 | extern uint8_t __cmpxchg_8 (uint8_t *v, uint8_t test, uint8_t new); | ||
392 | extern uint16_t __cmpxchg_16(uint16_t *v, uint16_t test, uint16_t new); | ||
393 | extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | 308 | extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); |
394 | 309 | ||
395 | #define cmpxchg(ptr, test, new) \ | 310 | #define cmpxchg(ptr, test, new) \ |
@@ -400,8 +315,6 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
400 | __typeof__(*(ptr)) __xg_new = (new); \ | 315 | __typeof__(*(ptr)) __xg_new = (new); \ |
401 | \ | 316 | \ |
402 | switch (sizeof(__xg_orig)) { \ | 317 | switch (sizeof(__xg_orig)) { \ |
403 | case 1: __xg_orig = __cmpxchg_8 (__xg_ptr, __xg_test, __xg_new); break; \ | ||
404 | case 2: __xg_orig = __cmpxchg_16(__xg_ptr, __xg_test, __xg_new); break; \ | ||
405 | case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ | 318 | case 4: __xg_orig = __cmpxchg_32(__xg_ptr, __xg_test, __xg_new); break; \ |
406 | default: \ | 319 | default: \ |
407 | __xg_orig = 0; \ | 320 | __xg_orig = 0; \ |
@@ -414,7 +327,7 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
414 | 327 | ||
415 | #endif | 328 | #endif |
416 | 329 | ||
417 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) | 330 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) |
418 | 331 | ||
419 | #define atomic_add_unless(v, a, u) \ | 332 | #define atomic_add_unless(v, a, u) \ |
420 | ({ \ | 333 | ({ \ |
@@ -424,6 +337,7 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); | |||
424 | c = old; \ | 337 | c = old; \ |
425 | c != (u); \ | 338 | c != (u); \ |
426 | }) | 339 | }) |
340 | |||
427 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 341 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
428 | 342 | ||
429 | #include <asm-generic/atomic.h> | 343 | #include <asm-generic/atomic.h> |
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h index 074c0d5770eb..451712cc3060 100644 --- a/include/asm-frv/bug.h +++ b/include/asm-frv/bug.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _ASM_BUG_H | 12 | #define _ASM_BUG_H |
13 | 13 | ||
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/linkage.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_BUG | 17 | #ifdef CONFIG_BUG |
17 | /* | 18 | /* |
diff --git a/include/asm-frv/dma-mapping.h b/include/asm-frv/dma-mapping.h index 5003e017fd1e..e9fc1d47797e 100644 --- a/include/asm-frv/dma-mapping.h +++ b/include/asm-frv/dma-mapping.h | |||
@@ -23,7 +23,7 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t | |||
23 | * returns, or alternatively stop on the first sg_dma_len(sg) which | 23 | * returns, or alternatively stop on the first sg_dma_len(sg) which |
24 | * is 0. | 24 | * is 0. |
25 | */ | 25 | */ |
26 | #define sg_dma_address(sg) ((unsigned long) (page_to_phys((sg)->page) + (sg)->offset)) | 26 | #define sg_dma_address(sg) ((sg)->dma_address) |
27 | #define sg_dma_len(sg) ((sg)->length) | 27 | #define sg_dma_len(sg) ((sg)->length) |
28 | 28 | ||
29 | /* | 29 | /* |
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h index 48829f727242..075369b1a34b 100644 --- a/include/asm-frv/io.h +++ b/include/asm-frv/io.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/types.h> | ||
21 | #include <asm/virtconvert.h> | 22 | #include <asm/virtconvert.h> |
22 | #include <asm/string.h> | 23 | #include <asm/string.h> |
23 | #include <asm/mb-regs.h> | 24 | #include <asm/mb-regs.h> |
@@ -104,6 +105,8 @@ static inline void __insl(unsigned long addr, void *buf, int len, int swap) | |||
104 | __insl_sw(addr, buf, len); | 105 | __insl_sw(addr, buf, len); |
105 | } | 106 | } |
106 | 107 | ||
108 | #define mmiowb() mb() | ||
109 | |||
107 | /* | 110 | /* |
108 | * make the short names macros so specific devices | 111 | * make the short names macros so specific devices |
109 | * can override them as required | 112 | * can override them as required |
@@ -209,6 +212,10 @@ static inline uint32_t readl(const volatile void __iomem *addr) | |||
209 | return ret; | 212 | return ret; |
210 | } | 213 | } |
211 | 214 | ||
215 | #define readb_relaxed readb | ||
216 | #define readw_relaxed readw | ||
217 | #define readl_relaxed readl | ||
218 | |||
212 | static inline void writeb(uint8_t datum, volatile void __iomem *addr) | 219 | static inline void writeb(uint8_t datum, volatile void __iomem *addr) |
213 | { | 220 | { |
214 | __builtin_write8((volatile uint8_t __force *) addr, datum); | 221 | __builtin_write8((volatile uint8_t __force *) addr, datum); |
@@ -268,11 +275,106 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l | |||
268 | 275 | ||
269 | extern void iounmap(void __iomem *addr); | 276 | extern void iounmap(void __iomem *addr); |
270 | 277 | ||
278 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | ||
279 | { | ||
280 | return (void __iomem *) port; | ||
281 | } | ||
282 | |||
283 | static inline void ioport_unmap(void __iomem *p) | ||
284 | { | ||
285 | } | ||
286 | |||
271 | static inline void flush_write_buffers(void) | 287 | static inline void flush_write_buffers(void) |
272 | { | 288 | { |
273 | __asm__ __volatile__ ("membar" : : :"memory"); | 289 | __asm__ __volatile__ ("membar" : : :"memory"); |
274 | } | 290 | } |
275 | 291 | ||
292 | /* | ||
293 | * do appropriate I/O accesses for token type | ||
294 | */ | ||
295 | static inline unsigned int ioread8(void __iomem *p) | ||
296 | { | ||
297 | return __builtin_read8(p); | ||
298 | } | ||
299 | |||
300 | static inline unsigned int ioread16(void __iomem *p) | ||
301 | { | ||
302 | uint16_t ret = __builtin_read16(p); | ||
303 | if (__is_PCI_addr(p)) | ||
304 | ret = _swapw(ret); | ||
305 | return ret; | ||
306 | } | ||
307 | |||
308 | static inline unsigned int ioread32(void __iomem *p) | ||
309 | { | ||
310 | uint32_t ret = __builtin_read32(p); | ||
311 | if (__is_PCI_addr(p)) | ||
312 | ret = _swapl(ret); | ||
313 | return ret; | ||
314 | } | ||
315 | |||
316 | static inline void iowrite8(u8 val, void __iomem *p) | ||
317 | { | ||
318 | __builtin_write8(p, val); | ||
319 | if (__is_PCI_MEM(p)) | ||
320 | __flush_PCI_writes(); | ||
321 | } | ||
322 | |||
323 | static inline void iowrite16(u16 val, void __iomem *p) | ||
324 | { | ||
325 | if (__is_PCI_addr(p)) | ||
326 | val = _swapw(val); | ||
327 | __builtin_write16(p, val); | ||
328 | if (__is_PCI_MEM(p)) | ||
329 | __flush_PCI_writes(); | ||
330 | } | ||
331 | |||
332 | static inline void iowrite32(u32 val, void __iomem *p) | ||
333 | { | ||
334 | if (__is_PCI_addr(p)) | ||
335 | val = _swapl(val); | ||
336 | __builtin_write32(p, val); | ||
337 | if (__is_PCI_MEM(p)) | ||
338 | __flush_PCI_writes(); | ||
339 | } | ||
340 | |||
341 | static inline void ioread8_rep(void __iomem *p, void *dst, unsigned long count) | ||
342 | { | ||
343 | io_insb((unsigned long) p, dst, count); | ||
344 | } | ||
345 | |||
346 | static inline void ioread16_rep(void __iomem *p, void *dst, unsigned long count) | ||
347 | { | ||
348 | io_insw((unsigned long) p, dst, count); | ||
349 | } | ||
350 | |||
351 | static inline void ioread32_rep(void __iomem *p, void *dst, unsigned long count) | ||
352 | { | ||
353 | __insl_ns((unsigned long) p, dst, count); | ||
354 | } | ||
355 | |||
356 | static inline void iowrite8_rep(void __iomem *p, const void *src, unsigned long count) | ||
357 | { | ||
358 | io_outsb((unsigned long) p, src, count); | ||
359 | } | ||
360 | |||
361 | static inline void iowrite16_rep(void __iomem *p, const void *src, unsigned long count) | ||
362 | { | ||
363 | io_outsw((unsigned long) p, src, count); | ||
364 | } | ||
365 | |||
366 | static inline void iowrite32_rep(void __iomem *p, const void *src, unsigned long count) | ||
367 | { | ||
368 | __outsl_ns((unsigned long) p, src, count); | ||
369 | } | ||
370 | |||
371 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
372 | struct pci_dev; | ||
373 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
374 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) | ||
375 | { | ||
376 | } | ||
377 | |||
276 | 378 | ||
277 | /* | 379 | /* |
278 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 380 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
@@ -285,6 +387,27 @@ static inline void flush_write_buffers(void) | |||
285 | */ | 387 | */ |
286 | #define xlate_dev_kmem_ptr(p) p | 388 | #define xlate_dev_kmem_ptr(p) p |
287 | 389 | ||
390 | /* | ||
391 | * Check BIOS signature | ||
392 | */ | ||
393 | static inline int check_signature(volatile void __iomem *io_addr, | ||
394 | const unsigned char *signature, int length) | ||
395 | { | ||
396 | int retval = 0; | ||
397 | |||
398 | do { | ||
399 | if (readb(io_addr) != *signature) | ||
400 | goto out; | ||
401 | io_addr++; | ||
402 | signature++; | ||
403 | length--; | ||
404 | } while (length); | ||
405 | |||
406 | retval = 1; | ||
407 | out: | ||
408 | return retval; | ||
409 | } | ||
410 | |||
288 | #endif /* __KERNEL__ */ | 411 | #endif /* __KERNEL__ */ |
289 | 412 | ||
290 | #endif /* _ASM_IO_H */ | 413 | #endif /* _ASM_IO_H */ |
diff --git a/include/asm-frv/mb-regs.h b/include/asm-frv/mb-regs.h index c8f575fc42fa..93fa732fb0cd 100644 --- a/include/asm-frv/mb-regs.h +++ b/include/asm-frv/mb-regs.h | |||
@@ -68,6 +68,9 @@ do { \ | |||
68 | #define __is_PCI_MEM(addr) \ | 68 | #define __is_PCI_MEM(addr) \ |
69 | ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL) | 69 | ((unsigned long)(addr) - __region_PCI_MEM < 0x08000000UL) |
70 | 70 | ||
71 | #define __is_PCI_addr(addr) \ | ||
72 | ((unsigned long)(addr) - __region_PCI_IO < 0x0c000000UL) | ||
73 | |||
71 | #define __get_CLKSW() ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; }) | 74 | #define __get_CLKSW() ({ *(volatile unsigned long *)(__region_CS2 + 0x0130000cUL) & 0xffUL; }) |
72 | #define __get_CLKIN() (__get_CLKSW() * 125U * 100000U / 24U) | 75 | #define __get_CLKIN() (__get_CLKSW() * 125U * 100000U / 24U) |
73 | 76 | ||
@@ -149,6 +152,7 @@ do { \ | |||
149 | 152 | ||
150 | #define __is_PCI_IO(addr) 0 /* no PCI */ | 153 | #define __is_PCI_IO(addr) 0 /* no PCI */ |
151 | #define __is_PCI_MEM(addr) 0 | 154 | #define __is_PCI_MEM(addr) 0 |
155 | #define __is_PCI_addr(addr) 0 | ||
152 | #define __region_PCI_IO 0 | 156 | #define __region_PCI_IO 0 |
153 | #define __region_PCI_MEM 0 | 157 | #define __region_PCI_MEM 0 |
154 | #define __flush_PCI_writes() do { } while(0) | 158 | #define __flush_PCI_writes() do { } while(0) |
diff --git a/include/asm-frv/mc146818rtc.h b/include/asm-frv/mc146818rtc.h new file mode 100644 index 000000000000..90dfb7a633d1 --- /dev/null +++ b/include/asm-frv/mc146818rtc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* mc146818rtc.h: RTC defs | ||
2 | * | ||
3 | * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_MC146818RTC_H | ||
13 | #define _ASM_MC146818RTC_H | ||
14 | |||
15 | |||
16 | #endif /* _ASM_MC146818RTC_H */ | ||
diff --git a/include/asm-frv/module.h b/include/asm-frv/module.h index 3223cfaef743..3d5c6360289a 100644 --- a/include/asm-frv/module.h +++ b/include/asm-frv/module.h | |||
@@ -11,10 +11,18 @@ | |||
11 | #ifndef _ASM_MODULE_H | 11 | #ifndef _ASM_MODULE_H |
12 | #define _ASM_MODULE_H | 12 | #define _ASM_MODULE_H |
13 | 13 | ||
14 | #define module_map(x) vmalloc(x) | 14 | struct mod_arch_specific |
15 | #define module_unmap(x) vfree(x) | 15 | { |
16 | #define module_arch_init(x) (0) | 16 | }; |
17 | #define arch_init_modules(x) do { } while (0) | 17 | |
18 | #define Elf_Shdr Elf32_Shdr | ||
19 | #define Elf_Sym Elf32_Sym | ||
20 | #define Elf_Ehdr Elf32_Ehdr | ||
21 | |||
22 | /* | ||
23 | * Include the architecture version. | ||
24 | */ | ||
25 | #define MODULE_ARCH_VERMAGIC __stringify(PROCESSOR_MODEL_NAME) " " | ||
18 | 26 | ||
19 | #endif /* _ASM_MODULE_H */ | 27 | #endif /* _ASM_MODULE_H */ |
20 | 28 | ||
diff --git a/include/asm-frv/pci.h b/include/asm-frv/pci.h index 1168451c275f..598b0c6b695d 100644 --- a/include/asm-frv/pci.h +++ b/include/asm-frv/pci.h | |||
@@ -57,6 +57,14 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, | |||
57 | */ | 57 | */ |
58 | #define PCI_DMA_BUS_IS_PHYS (1) | 58 | #define PCI_DMA_BUS_IS_PHYS (1) |
59 | 59 | ||
60 | /* pci_unmap_{page,single} is a nop so... */ | ||
61 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
62 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
63 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
64 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
65 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
66 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
67 | |||
60 | #ifdef CONFIG_PCI | 68 | #ifdef CONFIG_PCI |
61 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 69 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
62 | enum pci_dma_burst_strategy *strat, | 70 | enum pci_dma_burst_strategy *strat, |
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 844666377dcb..d1c3b182c691 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -421,6 +421,11 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
421 | } | 421 | } |
422 | 422 | ||
423 | /* | 423 | /* |
424 | * Macro to mark a page protection value as "uncacheable" | ||
425 | */ | ||
426 | #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NOCACHE)) | ||
427 | |||
428 | /* | ||
424 | * Conversion functions: convert a page and protection to a page entry, | 429 | * Conversion functions: convert a page and protection to a page entry, |
425 | * and a page entry and page directory to the page they refer to. | 430 | * and a page entry and page directory to the page they refer to. |
426 | */ | 431 | */ |
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 50605df6d8ac..2560f596a75d 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h | |||
@@ -59,7 +59,6 @@ typedef unsigned int u32; | |||
59 | 59 | ||
60 | typedef signed long long s64; | 60 | typedef signed long long s64; |
61 | typedef unsigned long long u64; | 61 | typedef unsigned long long u64; |
62 | typedef u64 u_quad_t; | ||
63 | 62 | ||
64 | /* Dma addresses are 32-bits wide. */ | 63 | /* Dma addresses are 32-bits wide. */ |
65 | 64 | ||
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index 991b50fbba24..b6bcbe01f6ee 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h | |||
@@ -180,16 +180,16 @@ do { \ | |||
180 | \ | 180 | \ |
181 | switch (sizeof(*(ptr))) { \ | 181 | switch (sizeof(*(ptr))) { \ |
182 | case 1: \ | 182 | case 1: \ |
183 | __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \ | 183 | __get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \ |
184 | break; \ | 184 | break; \ |
185 | case 2: \ | 185 | case 2: \ |
186 | __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \ | 186 | __get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \ |
187 | break; \ | 187 | break; \ |
188 | case 4: \ | 188 | case 4: \ |
189 | __get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \ | 189 | __get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \ |
190 | break; \ | 190 | break; \ |
191 | case 8: \ | 191 | case 8: \ |
192 | __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \ | 192 | __get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \ |
193 | break; \ | 193 | break; \ |
194 | default: \ | 194 | default: \ |
195 | __gu_err = __get_user_bad(); \ | 195 | __gu_err = __get_user_bad(); \ |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index 5cf989b448d5..cde376a7a857 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -313,7 +313,7 @@ do { \ | |||
313 | unsigned long __sr2 = (res); \ | 313 | unsigned long __sr2 = (res); \ |
314 | if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) { \ | 314 | if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) { \ |
315 | errno = (-__sr2); \ | 315 | errno = (-__sr2); \ |
316 | __sr2 = ULONG_MAX; \ | 316 | __sr2 = ~0UL; \ |
317 | } \ | 317 | } \ |
318 | return (type) __sr2; \ | 318 | return (type) __sr2; \ |
319 | } while (0) | 319 | } while (0) |
diff --git a/include/asm-frv/vga.h b/include/asm-frv/vga.h new file mode 100644 index 000000000000..a702c800a229 --- /dev/null +++ b/include/asm-frv/vga.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* vga.h: VGA register stuff | ||
2 | * | ||
3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_VGA_H | ||
13 | #define _ASM_VGA_H | ||
14 | |||
15 | |||
16 | |||
17 | #endif /* _ASM_VGA_H */ | ||
diff --git a/include/asm-frv/xor.h b/include/asm-frv/xor.h new file mode 100644 index 000000000000..c82eb12a5b18 --- /dev/null +++ b/include/asm-frv/xor.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/xor.h> | |||