aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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.h2
-rw-r--r--include/asm-avr32/arch-at32ap/io.h4
-rw-r--r--include/asm-avr32/irq.h5
-rw-r--r--include/asm-avr32/kdebug.h1
-rw-r--r--include/asm-avr32/ocd.h5
-rw-r--r--include/asm-avr32/processor.h14
-rw-r--r--include/asm-avr32/ptrace.h13
-rw-r--r--include/asm-avr32/thread_info.h1
9 files changed, 41 insertions, 10 deletions
diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap700x.h
index 3914d7b94ff4..99684d6f3967 100644
--- a/include/asm-avr32/arch-at32ap/at32ap7000.h
+++ b/include/asm-avr32/arch-at32ap/at32ap700x.h
@@ -7,8 +7,8 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#ifndef __ASM_ARCH_AT32AP7000_H__ 10#ifndef __ASM_ARCH_AT32AP700X_H__
11#define __ASM_ARCH_AT32AP7000_H__ 11#define __ASM_ARCH_AT32AP700X_H__
12 12
13#define GPIO_PERIPH_A 0 13#define GPIO_PERIPH_A 0
14#define GPIO_PERIPH_B 1 14#define GPIO_PERIPH_B 1
@@ -32,4 +32,4 @@
32#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) 32#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N))
33#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) 33#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N))
34 34
35#endif /* __ASM_ARCH_AT32AP7000_H__ */ 35#endif /* __ASM_ARCH_AT32AP700X_H__ */
diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/include/asm-avr32/arch-at32ap/cpu.h
index a762f42cbb71..0dc20261c1ea 100644
--- a/include/asm-avr32/arch-at32ap/cpu.h
+++ b/include/asm-avr32/arch-at32ap/cpu.h
@@ -14,7 +14,7 @@
14 * Only AT32AP7000 is defined for now. We can identify the specific 14 * Only AT32AP7000 is defined for now. We can identify the specific
15 * chip at runtime, but I'm not sure if it's really worth it. 15 * chip at runtime, but I'm not sure if it's really worth it.
16 */ 16 */
17#ifdef CONFIG_CPU_AT32AP7000 17#ifdef CONFIG_CPU_AT32AP700X
18# define cpu_is_at32ap7000() (1) 18# define cpu_is_at32ap7000() (1)
19#else 19#else
20# define cpu_is_at32ap7000() (0) 20# define cpu_is_at32ap7000() (0)
diff --git a/include/asm-avr32/arch-at32ap/io.h b/include/asm-avr32/arch-at32ap/io.h
index ee59e401f041..4ec6abc68ea3 100644
--- a/include/asm-avr32/arch-at32ap/io.h
+++ b/include/asm-avr32/arch-at32ap/io.h
@@ -4,7 +4,7 @@
4/* For "bizarre" halfword swapping */ 4/* For "bizarre" halfword swapping */
5#include <linux/byteorder/swabb.h> 5#include <linux/byteorder/swabb.h>
6 6
7#if defined(CONFIG_AP7000_32_BIT_SMC) 7#if defined(CONFIG_AP700X_32_BIT_SMC)
8# define __swizzle_addr_b(addr) (addr ^ 3UL) 8# define __swizzle_addr_b(addr) (addr ^ 3UL)
9# define __swizzle_addr_w(addr) (addr ^ 2UL) 9# define __swizzle_addr_w(addr) (addr ^ 2UL)
10# define __swizzle_addr_l(addr) (addr) 10# define __swizzle_addr_l(addr) (addr)
@@ -14,7 +14,7 @@
14# define __mem_ioswabb(a, x) (x) 14# define __mem_ioswabb(a, x) (x)
15# define __mem_ioswabw(a, x) swab16(x) 15# define __mem_ioswabw(a, x) swab16(x)
16# define __mem_ioswabl(a, x) swab32(x) 16# define __mem_ioswabl(a, x) swab32(x)
17#elif defined(CONFIG_AP7000_16_BIT_SMC) 17#elif defined(CONFIG_AP700X_16_BIT_SMC)
18# define __swizzle_addr_b(addr) (addr ^ 1UL) 18# define __swizzle_addr_b(addr) (addr ^ 1UL)
19# define __swizzle_addr_w(addr) (addr) 19# define __swizzle_addr_w(addr) (addr)
20# define __swizzle_addr_l(addr) (addr) 20# define __swizzle_addr_l(addr) (addr)
diff --git a/include/asm-avr32/irq.h b/include/asm-avr32/irq.h
index 83e6549d7783..9315724c0596 100644
--- a/include/asm-avr32/irq.h
+++ b/include/asm-avr32/irq.h
@@ -11,4 +11,9 @@
11 11
12#define irq_canonicalize(i) (i) 12#define irq_canonicalize(i) (i)
13 13
14#ifndef __ASSEMBLER__
15int nmi_enable(void);
16void nmi_disable(void);
17#endif
18
14#endif /* __ASM_AVR32_IOCTLS_H */ 19#endif /* __ASM_AVR32_IOCTLS_H */
diff --git a/include/asm-avr32/kdebug.h b/include/asm-avr32/kdebug.h
index fd7e99046b2f..ca4f9542365a 100644
--- a/include/asm-avr32/kdebug.h
+++ b/include/asm-avr32/kdebug.h
@@ -5,6 +5,7 @@
5enum die_val { 5enum die_val {
6 DIE_BREAKPOINT, 6 DIE_BREAKPOINT,
7 DIE_SSTEP, 7 DIE_SSTEP,
8 DIE_NMI,
8}; 9};
9 10
10#endif /* __ASM_AVR32_KDEBUG_H */ 11#endif /* __ASM_AVR32_KDEBUG_H */
diff --git a/include/asm-avr32/ocd.h b/include/asm-avr32/ocd.h
index 996405e0393f..6bef09490235 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)
533#define ocd_read(reg) __ocd_read(OCD_##reg) 533#define ocd_read(reg) __ocd_read(OCD_##reg)
534#define ocd_write(reg, value) __ocd_write(OCD_##reg, value) 534#define ocd_write(reg, value) __ocd_write(OCD_##reg, value)
535 535
536struct task_struct;
537
538void ocd_enable(struct task_struct *child);
539void ocd_disable(struct task_struct *child);
540
536#endif /* !__ASSEMBLER__ */ 541#endif /* !__ASSEMBLER__ */
537 542
538#endif /* __ASM_AVR32_OCD_H */ 543#endif /* __ASM_AVR32_OCD_H */
diff --git a/include/asm-avr32/processor.h b/include/asm-avr32/processor.h
index a52576b25afe..4212551c1cd9 100644
--- a/include/asm-avr32/processor.h
+++ b/include/asm-avr32/processor.h
@@ -57,11 +57,25 @@ struct avr32_cpuinfo {
57 unsigned short cpu_revision; 57 unsigned short cpu_revision;
58 enum tlb_config tlb_config; 58 enum tlb_config tlb_config;
59 unsigned long features; 59 unsigned long features;
60 u32 device_id;
60 61
61 struct cache_info icache; 62 struct cache_info icache;
62 struct cache_info dcache; 63 struct cache_info dcache;
63}; 64};
64 65
66static inline unsigned int avr32_get_manufacturer_id(struct avr32_cpuinfo *cpu)
67{
68 return (cpu->device_id >> 1) & 0x7f;
69}
70static inline unsigned int avr32_get_product_number(struct avr32_cpuinfo *cpu)
71{
72 return (cpu->device_id >> 12) & 0xffff;
73}
74static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu)
75{
76 return (cpu->device_id >> 28) & 0x0f;
77}
78
65extern struct avr32_cpuinfo boot_cpu_data; 79extern struct avr32_cpuinfo boot_cpu_data;
66 80
67#ifdef CONFIG_SMP 81#ifdef CONFIG_SMP
diff --git a/include/asm-avr32/ptrace.h b/include/asm-avr32/ptrace.h
index 8c5dba5e33df..9e2d44f4e0fe 100644
--- a/include/asm-avr32/ptrace.h
+++ b/include/asm-avr32/ptrace.h
@@ -121,7 +121,15 @@ struct pt_regs {
121}; 121};
122 122
123#ifdef __KERNEL__ 123#ifdef __KERNEL__
124# define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) 124
125#include <asm/ocd.h>
126
127#define arch_ptrace_attach(child) ocd_enable(child)
128
129#define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER)
130#define instruction_pointer(regs) ((regs)->pc)
131#define profile_pc(regs) instruction_pointer(regs)
132
125extern void show_regs (struct pt_regs *); 133extern void show_regs (struct pt_regs *);
126 134
127static __inline__ int valid_user_regs(struct pt_regs *regs) 135static __inline__ int valid_user_regs(struct pt_regs *regs)
@@ -141,9 +149,6 @@ static __inline__ int valid_user_regs(struct pt_regs *regs)
141 return 0; 149 return 0;
142} 150}
143 151
144#define instruction_pointer(regs) ((regs)->pc)
145
146#define profile_pc(regs) instruction_pointer(regs)
147 152
148#endif /* __KERNEL__ */ 153#endif /* __KERNEL__ */
149 154
diff --git a/include/asm-avr32/thread_info.h b/include/asm-avr32/thread_info.h
index 184b574289b4..07049f6c0d41 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)
88#define TIF_MEMDIE 6 88#define TIF_MEMDIE 6
89#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */ 89#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */
90#define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */ 90#define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */
91#define TIF_DEBUG 30 /* debugging enabled */
91#define TIF_USERSPACE 31 /* true if FS sets userspace */ 92#define TIF_USERSPACE 31 /* true if FS sets userspace */
92 93
93#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 94#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)