diff options
Diffstat (limited to 'include/asm-avr32')
-rw-r--r-- | include/asm-avr32/arch-at32ap/at32ap700x.h (renamed from include/asm-avr32/arch-at32ap/at32ap7000.h) | 6 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/cpu.h | 3 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/io.h | 4 | ||||
-rw-r--r-- | include/asm-avr32/irq.h | 5 | ||||
-rw-r--r-- | include/asm-avr32/kdebug.h | 1 | ||||
-rw-r--r-- | include/asm-avr32/ocd.h | 5 | ||||
-rw-r--r-- | include/asm-avr32/processor.h | 14 | ||||
-rw-r--r-- | include/asm-avr32/ptrace.h | 13 | ||||
-rw-r--r-- | include/asm-avr32/setup.h | 2 | ||||
-rw-r--r-- | include/asm-avr32/thread_info.h | 1 |
10 files changed, 43 insertions, 11 deletions
diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap700x.h index 3914d7b94ff..99684d6f396 100644 --- a/include/asm-avr32/arch-at32ap/at32ap7000.h +++ b/include/asm-avr32/arch-at32ap/at32ap700x.h @@ -7,8 +7,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef __ASM_ARCH_AT32AP7000_H__ -#define __ASM_ARCH_AT32AP7000_H__ +#ifndef __ASM_ARCH_AT32AP700X_H__ +#define __ASM_ARCH_AT32AP700X_H__ #define GPIO_PERIPH_A 0 #define GPIO_PERIPH_B 1 @@ -32,4 +32,4 @@ #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) -#endif /* __ASM_ARCH_AT32AP7000_H__ */ +#endif /* __ASM_ARCH_AT32AP700X_H__ */ diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/include/asm-avr32/arch-at32ap/cpu.h index a762f42cbb7..44d0bfa1f40 100644 --- a/include/asm-avr32/arch-at32ap/cpu.h +++ b/include/asm-avr32/arch-at32ap/cpu.h @@ -14,7 +14,7 @@ * Only AT32AP7000 is defined for now. We can identify the specific * chip at runtime, but I'm not sure if it's really worth it. */ -#ifdef CONFIG_CPU_AT32AP7000 +#ifdef CONFIG_CPU_AT32AP700X # define cpu_is_at32ap7000() (1) #else # define cpu_is_at32ap7000() (0) @@ -30,5 +30,6 @@ #define cpu_is_at91sam9261() (0) #define cpu_is_at91sam9263() (0) #define cpu_is_at91sam9rl() (0) +#define cpu_is_at91cap9() (0) #endif /* __ASM_ARCH_CPU_H */ diff --git a/include/asm-avr32/arch-at32ap/io.h b/include/asm-avr32/arch-at32ap/io.h index ee59e401f04..4ec6abc68ea 100644 --- a/include/asm-avr32/arch-at32ap/io.h +++ b/include/asm-avr32/arch-at32ap/io.h @@ -4,7 +4,7 @@ /* For "bizarre" halfword swapping */ #include <linux/byteorder/swabb.h> -#if defined(CONFIG_AP7000_32_BIT_SMC) +#if defined(CONFIG_AP700X_32_BIT_SMC) # define __swizzle_addr_b(addr) (addr ^ 3UL) # define __swizzle_addr_w(addr) (addr ^ 2UL) # define __swizzle_addr_l(addr) (addr) @@ -14,7 +14,7 @@ # define __mem_ioswabb(a, x) (x) # define __mem_ioswabw(a, x) swab16(x) # define __mem_ioswabl(a, x) swab32(x) -#elif defined(CONFIG_AP7000_16_BIT_SMC) +#elif defined(CONFIG_AP700X_16_BIT_SMC) # define __swizzle_addr_b(addr) (addr ^ 1UL) # define __swizzle_addr_w(addr) (addr) # define __swizzle_addr_l(addr) (addr) diff --git a/include/asm-avr32/irq.h b/include/asm-avr32/irq.h index 83e6549d778..9315724c059 100644 --- a/include/asm-avr32/irq.h +++ b/include/asm-avr32/irq.h @@ -11,4 +11,9 @@ #define irq_canonicalize(i) (i) +#ifndef __ASSEMBLER__ +int nmi_enable(void); +void nmi_disable(void); +#endif + #endif /* __ASM_AVR32_IOCTLS_H */ diff --git a/include/asm-avr32/kdebug.h b/include/asm-avr32/kdebug.h index fd7e99046b2..ca4f9542365 100644 --- a/include/asm-avr32/kdebug.h +++ b/include/asm-avr32/kdebug.h @@ -5,6 +5,7 @@ enum die_val { DIE_BREAKPOINT, DIE_SSTEP, + DIE_NMI, }; #endif /* __ASM_AVR32_KDEBUG_H */ diff --git a/include/asm-avr32/ocd.h b/include/asm-avr32/ocd.h index 996405e0393..6bef0949023 100644 --- a/include/asm-avr32/ocd.h +++ b/include/asm-avr32/ocd.h @@ -533,6 +533,11 @@ static inline void __ocd_write(unsigned int reg, unsigned long value) #define ocd_read(reg) __ocd_read(OCD_##reg) #define ocd_write(reg, value) __ocd_write(OCD_##reg, value) +struct task_struct; + +void ocd_enable(struct task_struct *child); +void ocd_disable(struct task_struct *child); + #endif /* !__ASSEMBLER__ */ #endif /* __ASM_AVR32_OCD_H */ diff --git a/include/asm-avr32/processor.h b/include/asm-avr32/processor.h index a52576b25af..4212551c1cd 100644 --- a/include/asm-avr32/processor.h +++ b/include/asm-avr32/processor.h @@ -57,11 +57,25 @@ struct avr32_cpuinfo { unsigned short cpu_revision; enum tlb_config tlb_config; unsigned long features; + u32 device_id; struct cache_info icache; struct cache_info dcache; }; +static inline unsigned int avr32_get_manufacturer_id(struct avr32_cpuinfo *cpu) +{ + return (cpu->device_id >> 1) & 0x7f; +} +static inline unsigned int avr32_get_product_number(struct avr32_cpuinfo *cpu) +{ + return (cpu->device_id >> 12) & 0xffff; +} +static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu) +{ + return (cpu->device_id >> 28) & 0x0f; +} + extern struct avr32_cpuinfo boot_cpu_data; #ifdef CONFIG_SMP diff --git a/include/asm-avr32/ptrace.h b/include/asm-avr32/ptrace.h index 8c5dba5e33d..9e2d44f4e0f 100644 --- a/include/asm-avr32/ptrace.h +++ b/include/asm-avr32/ptrace.h @@ -121,7 +121,15 @@ struct pt_regs { }; #ifdef __KERNEL__ -# define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) + +#include <asm/ocd.h> + +#define arch_ptrace_attach(child) ocd_enable(child) + +#define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) +#define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) + extern void show_regs (struct pt_regs *); static __inline__ int valid_user_regs(struct pt_regs *regs) @@ -141,9 +149,6 @@ static __inline__ int valid_user_regs(struct pt_regs *regs) return 0; } -#define instruction_pointer(regs) ((regs)->pc) - -#define profile_pc(regs) instruction_pointer(regs) #endif /* __KERNEL__ */ diff --git a/include/asm-avr32/setup.h b/include/asm-avr32/setup.h index b0828d43e11..ea3070ff13a 100644 --- a/include/asm-avr32/setup.h +++ b/include/asm-avr32/setup.h @@ -110,7 +110,7 @@ struct tagtable { int (*parse)(struct tag *); }; -#define __tag __attribute_used__ __attribute__((__section__(".taglist.init"))) +#define __tag __used __attribute__((__section__(".taglist.init"))) #define __tagtable(tag, fn) \ static struct tagtable __tagtable_##fn __tag = { tag, fn } diff --git a/include/asm-avr32/thread_info.h b/include/asm-avr32/thread_info.h index 184b574289b..07049f6c0d4 100644 --- a/include/asm-avr32/thread_info.h +++ b/include/asm-avr32/thread_info.h @@ -88,6 +88,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_MEMDIE 6 #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */ #define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */ +#define TIF_DEBUG 30 /* debugging enabled */ #define TIF_USERSPACE 31 /* true if FS sets userspace */ #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |