diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-avr32/arch-at32ap/board.h | 14 | ||||
| -rw-r--r-- | include/asm-avr32/arch-at32ap/sm.h | 27 | ||||
| -rw-r--r-- | include/asm-avr32/atomic.h | 4 | ||||
| -rw-r--r-- | include/asm-avr32/unaligned.h | 15 |
4 files changed, 19 insertions, 41 deletions
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index 974480438849..0215965dc586 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
| @@ -36,4 +36,18 @@ struct platform_device * | |||
| 36 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, | 36 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, |
| 37 | unsigned long fbmem_start, unsigned long fbmem_len); | 37 | unsigned long fbmem_start, unsigned long fbmem_len); |
| 38 | 38 | ||
| 39 | /* depending on what's hooked up, not all SSC pins will be used */ | ||
| 40 | #define ATMEL_SSC_TK 0x01 | ||
| 41 | #define ATMEL_SSC_TF 0x02 | ||
| 42 | #define ATMEL_SSC_TD 0x04 | ||
| 43 | #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD) | ||
| 44 | |||
| 45 | #define ATMEL_SSC_RK 0x10 | ||
| 46 | #define ATMEL_SSC_RF 0x20 | ||
| 47 | #define ATMEL_SSC_RD 0x40 | ||
| 48 | #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD) | ||
| 49 | |||
| 50 | struct platform_device * | ||
| 51 | at32_add_device_ssc(unsigned int id, unsigned int flags); | ||
| 52 | |||
| 39 | #endif /* __ASM_ARCH_BOARD_H */ | 53 | #endif /* __ASM_ARCH_BOARD_H */ |
diff --git a/include/asm-avr32/arch-at32ap/sm.h b/include/asm-avr32/arch-at32ap/sm.h deleted file mode 100644 index 265a9ead20bf..000000000000 --- a/include/asm-avr32/arch-at32ap/sm.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * AT32 System Manager interface. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Atmel Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef __ASM_AVR32_AT32_SM_H__ | ||
| 11 | #define __ASM_AVR32_AT32_SM_H__ | ||
| 12 | |||
| 13 | struct irq_chip; | ||
| 14 | struct platform_device; | ||
| 15 | |||
| 16 | struct at32_sm { | ||
| 17 | spinlock_t lock; | ||
| 18 | void __iomem *regs; | ||
| 19 | struct irq_chip *eim_chip; | ||
| 20 | unsigned int eim_first_irq; | ||
| 21 | struct platform_device *pdev; | ||
| 22 | }; | ||
| 23 | |||
| 24 | extern struct platform_device at32_sm_device; | ||
| 25 | extern struct at32_sm system_manager; | ||
| 26 | |||
| 27 | #endif /* __ASM_AVR32_AT32_SM_H__ */ | ||
diff --git a/include/asm-avr32/atomic.h b/include/asm-avr32/atomic.h index b9c2548a52f3..7ef3862a73d0 100644 --- a/include/asm-avr32/atomic.h +++ b/include/asm-avr32/atomic.h | |||
| @@ -101,7 +101,7 @@ static inline int atomic_sub_unless(atomic_t *v, int a, int u) | |||
| 101 | " mov %1, 1\n" | 101 | " mov %1, 1\n" |
| 102 | "1:" | 102 | "1:" |
| 103 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) | 103 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) |
| 104 | : "m"(v->counter), "rKs21"(a), "rKs21"(u) | 104 | : "m"(v->counter), "rKs21"(a), "rKs21"(u), "1"(result) |
| 105 | : "cc", "memory"); | 105 | : "cc", "memory"); |
| 106 | 106 | ||
| 107 | return result; | 107 | return result; |
| @@ -137,7 +137,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
| 137 | " mov %1, 1\n" | 137 | " mov %1, 1\n" |
| 138 | "1:" | 138 | "1:" |
| 139 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) | 139 | : "=&r"(tmp), "=&r"(result), "=o"(v->counter) |
| 140 | : "m"(v->counter), "r"(a), "ir"(u) | 140 | : "m"(v->counter), "r"(a), "ir"(u), "1"(result) |
| 141 | : "cc", "memory"); | 141 | : "cc", "memory"); |
| 142 | } | 142 | } |
| 143 | 143 | ||
diff --git a/include/asm-avr32/unaligned.h b/include/asm-avr32/unaligned.h index 3042723fcbfd..36f5fd430543 100644 --- a/include/asm-avr32/unaligned.h +++ b/include/asm-avr32/unaligned.h | |||
| @@ -7,19 +7,10 @@ | |||
| 7 | * words, but halfwords must be halfword-aligned, and doublewords must | 7 | * words, but halfwords must be halfword-aligned, and doublewords must |
| 8 | * be word-aligned. | 8 | * be word-aligned. |
| 9 | * | 9 | * |
| 10 | * TODO: Make all this CPU-specific and optimize. | 10 | * However, swapped word loads must be word-aligned so we can't |
| 11 | * optimize word loads in general. | ||
| 11 | */ | 12 | */ |
| 12 | 13 | ||
| 13 | #include <linux/string.h> | 14 | #include <asm-generic/unaligned.h> |
| 14 | |||
| 15 | /* Use memmove here, so gcc does not insert a __builtin_memcpy. */ | ||
| 16 | |||
| 17 | #define get_unaligned(ptr) \ | ||
| 18 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) | ||
| 19 | |||
| 20 | #define put_unaligned(val, ptr) \ | ||
| 21 | ({ __typeof__(*(ptr)) __tmp = (val); \ | ||
| 22 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ | ||
| 23 | (void)0; }) | ||
| 24 | 15 | ||
| 25 | #endif /* __ASM_AVR32_UNALIGNED_H */ | 16 | #endif /* __ASM_AVR32_UNALIGNED_H */ |
