aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:24:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 08:24:16 -0500
commita32737e1ca650504f172292dd344eb64c02311f3 (patch)
tree7dd2004ece26081507af877d9dd40b1bd4eecc1a /arch/arm/include
parent27edacac7d97d37ec77779c7da08345298a5d283 (diff)
parenta3c2b511a844641f6d0b60bd84cd6076143b3f2d (diff)
Merge branches 'fixes' and 'misc' into for-linus
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/edac.h48
-rw-r--r--arch/arm/include/asm/gpio.h4
-rw-r--r--arch/arm/include/asm/hardirq.h17
-rw-r--r--arch/arm/include/asm/opcodes.h20
-rw-r--r--arch/arm/include/asm/pgtable.h1
-rw-r--r--arch/arm/include/asm/processor.h2
-rw-r--r--arch/arm/include/asm/setup.h6
-rw-r--r--arch/arm/include/asm/swab.h5
8 files changed, 79 insertions, 24 deletions
diff --git a/arch/arm/include/asm/edac.h b/arch/arm/include/asm/edac.h
new file mode 100644
index 00000000000..0df7a2c1fc3
--- /dev/null
+++ b/arch/arm/include/asm/edac.h
@@ -0,0 +1,48 @@
1/*
2 * Copyright 2011 Calxeda, Inc.
3 * Based on PPC version Copyright 2007 MontaVista Software, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef ASM_EDAC_H
18#define ASM_EDAC_H
19/*
20 * ECC atomic, DMA, SMP and interrupt safe scrub function.
21 * Implements the per arch atomic_scrub() that EDAC use for software
22 * ECC scrubbing. It reads memory and then writes back the original
23 * value, allowing the hardware to detect and correct memory errors.
24 */
25static inline void atomic_scrub(void *va, u32 size)
26{
27#if __LINUX_ARM_ARCH__ >= 6
28 unsigned int *virt_addr = va;
29 unsigned int temp, temp2;
30 unsigned int i;
31
32 for (i = 0; i < size / sizeof(*virt_addr); i++, virt_addr++) {
33 /* Very carefully read and write to memory atomically
34 * so we are interrupt, DMA and SMP safe.
35 */
36 __asm__ __volatile__("\n"
37 "1: ldrex %0, [%2]\n"
38 " strex %1, %0, [%2]\n"
39 " teq %1, #0\n"
40 " bne 1b\n"
41 : "=&r"(temp), "=&r"(temp2)
42 : "r"(virt_addr)
43 : "cc");
44 }
45#endif
46}
47
48#endif
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 11ad0bfbb0a..7151753b098 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -1,6 +1,10 @@
1#ifndef _ARCH_ARM_GPIO_H 1#ifndef _ARCH_ARM_GPIO_H
2#define _ARCH_ARM_GPIO_H 2#define _ARCH_ARM_GPIO_H
3 3
4#if CONFIG_ARCH_NR_GPIO > 0
5#define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO
6#endif
7
4/* not all ARM platforms necessarily support this API ... */ 8/* not all ARM platforms necessarily support this API ... */
5#include <mach/gpio.h> 9#include <mach/gpio.h>
6 10
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h
index ddf07a92a6c..436e60b2cf7 100644
--- a/arch/arm/include/asm/hardirq.h
+++ b/arch/arm/include/asm/hardirq.h
@@ -27,23 +27,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu);
27 27
28#define arch_irq_stat_cpu smp_irq_stat_cpu 28#define arch_irq_stat_cpu smp_irq_stat_cpu
29 29
30#if NR_IRQS > 512
31#define HARDIRQ_BITS 10
32#elif NR_IRQS > 256
33#define HARDIRQ_BITS 9
34#else
35#define HARDIRQ_BITS 8
36#endif
37
38/*
39 * The hardirq mask has to be large enough to have space
40 * for potentially all IRQ sources in the system nesting
41 * on a single CPU:
42 */
43#if (1 << HARDIRQ_BITS) < NR_IRQS
44# error HARDIRQ_BITS is too low!
45#endif
46
47#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 30#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
48 31
49#endif /* __ASM_HARDIRQ_H */ 32#endif /* __ASM_HARDIRQ_H */
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h
new file mode 100644
index 00000000000..c0efdd60966
--- /dev/null
+++ b/arch/arm/include/asm/opcodes.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/include/asm/opcodes.h
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
9#ifndef __ASM_ARM_OPCODES_H
10#define __ASM_ARM_OPCODES_H
11
12#ifndef __ASSEMBLY__
13extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);
14#endif
15
16#define ARM_OPCODE_CONDTEST_FAIL 0
17#define ARM_OPCODE_CONDTEST_PASS 1
18#define ARM_OPCODE_CONDTEST_UNCOND 2
19
20#endif /* __ASM_ARM_OPCODES_H */
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 9451dce3a55..2f659e23972 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -336,6 +336,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
336 * We provide our own arch_get_unmapped_area to cope with VIPT caches. 336 * We provide our own arch_get_unmapped_area to cope with VIPT caches.
337 */ 337 */
338#define HAVE_ARCH_UNMAPPED_AREA 338#define HAVE_ARCH_UNMAPPED_AREA
339#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
339 340
340/* 341/*
341 * remap a physical page `pfn' of size `size' with page protection `prot' 342 * remap a physical page `pfn' of size `size' with page protection `prot'
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index b2d9df5667a..ce280b8d613 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -123,6 +123,8 @@ static inline void prefetch(const void *ptr)
123 123
124#endif 124#endif
125 125
126#define HAVE_ARCH_PICK_MMAP_LAYOUT
127
126#endif 128#endif
127 129
128#endif /* __ASM_ARM_PROCESSOR_H */ 130#endif /* __ASM_ARM_PROCESSOR_H */
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 915696dd9c7..23ebc0c82a3 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -192,11 +192,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, fn }
192/* 192/*
193 * Memory map description 193 * Memory map description
194 */ 194 */
195#ifdef CONFIG_ARCH_EP93XX 195#define NR_BANKS CONFIG_ARM_NR_BANKS
196# define NR_BANKS 16
197#else
198# define NR_BANKS 8
199#endif
200 196
201struct membank { 197struct membank {
202 phys_addr_t start; 198 phys_addr_t start;
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 9997ad20eff..32ee164a2f6 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -24,12 +24,13 @@
24 24
25#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 25#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6
26 26
27static inline __attribute_const__ __u16 __arch_swab16(__u16 x) 27static inline __attribute_const__ __u32 __arch_swahb32(__u32 x)
28{ 28{
29 __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x)); 29 __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x));
30 return x; 30 return x;
31} 31}
32#define __arch_swab16 __arch_swab16 32#define __arch_swahb32 __arch_swahb32
33#define __arch_swab16(x) ((__u16)__arch_swahb32(x))
33 34
34static inline __attribute_const__ __u32 __arch_swab32(__u32 x) 35static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
35{ 36{