diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/flat.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/sched_clock.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/vfpmacros.h | 12 | ||||
-rw-r--r-- | arch/arm/include/debug/8250_32.S | 27 | ||||
-rw-r--r-- | arch/arm/include/debug/picoxcell.S | 18 | ||||
-rw-r--r-- | arch/arm/include/debug/socfpga.S | 5 | ||||
-rw-r--r-- | arch/arm/include/uapi/asm/hwcap.h | 3 |
9 files changed, 46 insertions, 31 deletions
diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 59426a4595c9..e847d23351ed 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
9 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp) | 11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) ((void)persistent,get_unaligned(rp)) |
12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
13 | #define flat_get_relocate_addr(rel) (rel) | 13 | #define flat_get_relocate_addr(rel) (rel) |
14 | #define flat_set_persistent(relval, p) 0 | 14 | #define flat_set_persistent(relval, p) 0 |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 35c1ed89b936..42f042ee4ada 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -64,7 +64,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | |||
64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) | 64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) |
65 | { | 65 | { |
66 | asm volatile("strh %1, %0" | 66 | asm volatile("strh %1, %0" |
67 | : "+Qo" (*(volatile u16 __force *)addr) | 67 | : "+Q" (*(volatile u16 __force *)addr) |
68 | : "r" (val)); | 68 | : "r" (val)); |
69 | } | 69 | } |
70 | 70 | ||
@@ -72,7 +72,7 @@ static inline u16 __raw_readw(const volatile void __iomem *addr) | |||
72 | { | 72 | { |
73 | u16 val; | 73 | u16 val; |
74 | asm volatile("ldrh %1, %0" | 74 | asm volatile("ldrh %1, %0" |
75 | : "+Qo" (*(volatile u16 __force *)addr), | 75 | : "+Q" (*(volatile u16 __force *)addr), |
76 | "=r" (val)); | 76 | "=r" (val)); |
77 | return val; | 77 | return val; |
78 | } | 78 | } |
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h index 05b8e82ec9f5..e3f757263438 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/arch/arm/include/asm/sched_clock.h | |||
@@ -10,7 +10,5 @@ | |||
10 | 10 | ||
11 | extern void sched_clock_postinit(void); | 11 | extern void sched_clock_postinit(void); |
12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | 12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); |
13 | extern void setup_sched_clock_needs_suspend(u32 (*read)(void), int bits, | ||
14 | unsigned long rate); | ||
15 | 13 | ||
16 | #endif | 14 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 77bd79f2ffdb..7e1f76027f66 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -200,8 +200,8 @@ extern int __put_user_8(void *, unsigned long long); | |||
200 | #define USER_DS KERNEL_DS | 200 | #define USER_DS KERNEL_DS |
201 | 201 | ||
202 | #define segment_eq(a,b) (1) | 202 | #define segment_eq(a,b) (1) |
203 | #define __addr_ok(addr) (1) | 203 | #define __addr_ok(addr) ((void)(addr),1) |
204 | #define __range_ok(addr,size) (0) | 204 | #define __range_ok(addr,size) ((void)(addr),0) |
205 | #define get_fs() (KERNEL_DS) | 205 | #define get_fs() (KERNEL_DS) |
206 | 206 | ||
207 | static inline void set_fs(mm_segment_t fs) | 207 | static inline void set_fs(mm_segment_t fs) |
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index 6a6f1e485f41..301c1db3e99b 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -27,9 +27,9 @@ | |||
27 | #if __LINUX_ARM_ARCH__ <= 6 | 27 | #if __LINUX_ARM_ARCH__ <= 6 |
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
29 | ldr \tmp, [\tmp, #0] | 29 | ldr \tmp, [\tmp, #0] |
30 | tst \tmp, #HWCAP_VFPv3D16 | 30 | tst \tmp, #HWCAP_VFPD32 |
31 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 31 | ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
32 | addne \base, \base, #32*4 @ step over unused register space | 32 | addeq \base, \base, #32*4 @ step over unused register space |
33 | #else | 33 | #else |
34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
35 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 35 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
@@ -51,9 +51,9 @@ | |||
51 | #if __LINUX_ARM_ARCH__ <= 6 | 51 | #if __LINUX_ARM_ARCH__ <= 6 |
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
53 | ldr \tmp, [\tmp, #0] | 53 | ldr \tmp, [\tmp, #0] |
54 | tst \tmp, #HWCAP_VFPv3D16 | 54 | tst \tmp, #HWCAP_VFPD32 |
55 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 55 | stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
56 | addne \base, \base, #32*4 @ step over unused register space | 56 | addeq \base, \base, #32*4 @ step over unused register space |
57 | #else | 57 | #else |
58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
59 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 59 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S new file mode 100644 index 000000000000..8db01eeabbb4 --- /dev/null +++ b/arch/arm/include/debug/8250_32.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial_reg.h> | ||
13 | |||
14 | .macro senduart,rd,rx | ||
15 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
16 | .endm | ||
17 | |||
18 | .macro busyuart,rd,rx | ||
19 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
20 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
21 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
22 | bne 1002b | ||
23 | .endm | ||
24 | |||
25 | /* The UART's don't have any flow control IO's wired up. */ | ||
26 | .macro waituart,rd,rx | ||
27 | .endm | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S index 7419deb1b948..bc1f07c49cd4 100644 --- a/arch/arm/include/debug/picoxcell.S +++ b/arch/arm/include/debug/picoxcell.S | |||
@@ -5,10 +5,7 @@ | |||
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | 8 | */ |
11 | #include <linux/serial_reg.h> | ||
12 | 9 | ||
13 | #define UART_SHIFT 2 | 10 | #define UART_SHIFT 2 |
14 | #define PICOXCELL_UART1_BASE 0x80230000 | 11 | #define PICOXCELL_UART1_BASE 0x80230000 |
@@ -19,17 +16,4 @@ | |||
19 | ldr \rp, =PICOXCELL_UART1_BASE | 16 | ldr \rp, =PICOXCELL_UART1_BASE |
20 | .endm | 17 | .endm |
21 | 18 | ||
22 | .macro senduart,rd,rx | 19 | #include "8250_32.S" |
23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
30 | bne 1002b | ||
31 | .endm | ||
32 | |||
33 | /* The UART's don't have any flow control IO's wired up. */ | ||
34 | .macro waituart,rd,rx | ||
35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S index d6f26d23374f..966b2f994946 100644 --- a/arch/arm/include/debug/socfpga.S +++ b/arch/arm/include/debug/socfpga.S | |||
@@ -7,6 +7,9 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define UART_SHIFT 2 | ||
11 | #define DEBUG_LL_UART_OFFSET 0x00002000 | ||
12 | |||
10 | .macro addruart, rp, rv, tmp | 13 | .macro addruart, rp, rv, tmp |
11 | mov \rp, #DEBUG_LL_UART_OFFSET | 14 | mov \rp, #DEBUG_LL_UART_OFFSET |
12 | orr \rp, \rp, #0x00c00000 | 15 | orr \rp, \rp, #0x00c00000 |
@@ -14,3 +17,5 @@ | |||
14 | orr \rp, \rp, #0xff000000 @ physical base | 17 | orr \rp, \rp, #0xff000000 @ physical base |
15 | .endm | 18 | .endm |
16 | 19 | ||
20 | #include "8250_32.S" | ||
21 | |||
diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h index f254f6503cce..3688fd15a32d 100644 --- a/arch/arm/include/uapi/asm/hwcap.h +++ b/arch/arm/include/uapi/asm/hwcap.h | |||
@@ -18,11 +18,12 @@ | |||
18 | #define HWCAP_THUMBEE (1 << 11) | 18 | #define HWCAP_THUMBEE (1 << 11) |
19 | #define HWCAP_NEON (1 << 12) | 19 | #define HWCAP_NEON (1 << 12) |
20 | #define HWCAP_VFPv3 (1 << 13) | 20 | #define HWCAP_VFPv3 (1 << 13) |
21 | #define HWCAP_VFPv3D16 (1 << 14) | 21 | #define HWCAP_VFPv3D16 (1 << 14) /* also set for VFPv4-D16 */ |
22 | #define HWCAP_TLS (1 << 15) | 22 | #define HWCAP_TLS (1 << 15) |
23 | #define HWCAP_VFPv4 (1 << 16) | 23 | #define HWCAP_VFPv4 (1 << 16) |
24 | #define HWCAP_IDIVA (1 << 17) | 24 | #define HWCAP_IDIVA (1 << 17) |
25 | #define HWCAP_IDIVT (1 << 18) | 25 | #define HWCAP_IDIVT (1 << 18) |
26 | #define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */ | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | 27 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) |
27 | 28 | ||
28 | 29 | ||