aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-at91/gpio.h2
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h17
-rw-r--r--include/asm-arm/arch-ixp4xx/ixp4xx-regs.h6
-rw-r--r--include/asm-arm/arch-lh7a40x/entry-macro.S12
-rw-r--r--include/asm-arm/arch-ns9xxx/clock.h10
-rw-r--r--include/asm-arm/arch-omap/gpio.h3
-rw-r--r--include/asm-arm/arch-pxa/gpio.h4
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h2
-rw-r--r--include/asm-arm/arch-s3c2410/gpio.h4
-rw-r--r--include/asm-arm/arch-sa1100/gpio.h2
-rw-r--r--include/asm-arm/atomic.h4
-rw-r--r--include/asm-arm/system.h34
-rw-r--r--include/asm-arm/unistd.h2
13 files changed, 53 insertions, 49 deletions
diff --git a/include/asm-arm/arch-at91/gpio.h b/include/asm-arm/arch-at91/gpio.h
index 98ad2114f43a..0a241e2fb672 100644
--- a/include/asm-arm/arch-at91/gpio.h
+++ b/include/asm-arm/arch-at91/gpio.h
@@ -223,7 +223,7 @@ static inline void gpio_free(unsigned gpio)
223} 223}
224 224
225extern int gpio_direction_input(unsigned gpio); 225extern int gpio_direction_input(unsigned gpio);
226extern int gpio_direction_output(unsigned gpio); 226extern int gpio_direction_output(unsigned gpio, int value);
227 227
228static inline int gpio_get_value(unsigned gpio) 228static inline int gpio_get_value(unsigned gpio)
229{ 229{
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index b7b5414d9320..a41ba229c564 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -238,23 +238,6 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
238#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) 238#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
239#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) 239#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
240 240
241static inline int
242check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature,
243 int length)
244{
245 int retval = 0;
246 do {
247 if (readb(bus_addr) != *signature)
248 goto out;
249 bus_addr++;
250 signature++;
251 length--;
252 } while (length);
253 retval = 1;
254out:
255 return retval;
256}
257
258#endif 241#endif
259 242
260#ifndef CONFIG_PCI 243#ifndef CONFIG_PCI
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
index 9444958bec1e..ed35e5c94f40 100644
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
@@ -144,9 +144,9 @@
144#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 144#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
145#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 145#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
146#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 146#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
147#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000) 147#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000)
148#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000) 148#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000)
149#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000) 149#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000)
150#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 150#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
151#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 151#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
152#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000) 152#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S
index 502700604e00..ffe397250f0c 100644
--- a/include/asm-arm/arch-lh7a40x/entry-macro.S
+++ b/include/asm-arm/arch-lh7a40x/entry-macro.S
@@ -86,6 +86,12 @@ branch_irq_lh7a400: b 1000f
86 .macro disable_fiq 86 .macro disable_fiq
87 .endm 87 .endm
88 88
89 .macro get_irqnr_preamble, base, tmp
90 .endm
91
92 .macro arch_ret_to_user, tmp1, tmp2
93 .endm
94
89 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 95 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
90 mov \irqnr, #0 96 mov \irqnr, #0
91 mov \base, #io_p2v(0x80000000) @ APB registers 97 mov \base, #io_p2v(0x80000000) @ APB registers
@@ -105,6 +111,12 @@ branch_irq_lh7a400: b 1000f
105 .macro disable_fiq 111 .macro disable_fiq
106 .endm 112 .endm
107 113
114 .macro get_irqnr_preamble, base, tmp
115 .endm
116
117 .macro arch_ret_to_user, tmp1, tmp2
118 .endm
119
108 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 120 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
109 mov \irqnr, #0 @ VIC1 irq base 121 mov \irqnr, #0 @ VIC1 irq base
110 mov \base, #io_p2v(0x80000000) @ APB registers 122 mov \base, #io_p2v(0x80000000) @ APB registers
diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h
index 4371a485db47..a7c5ab3d9011 100644
--- a/include/asm-arm/arch-ns9xxx/clock.h
+++ b/include/asm-arm/arch-ns9xxx/clock.h
@@ -11,6 +11,7 @@
11#ifndef __ASM_ARCH_CLOCK_H 11#ifndef __ASM_ARCH_CLOCK_H
12#define __ASM_ARCH_CLOCK_H 12#define __ASM_ARCH_CLOCK_H
13 13
14static inline u32 ns9xxx_systemclock(void) __attribute__((const));
14static inline u32 ns9xxx_systemclock(void) 15static inline u32 ns9xxx_systemclock(void)
15{ 16{
16 /* 17 /*
@@ -19,17 +20,20 @@ static inline u32 ns9xxx_systemclock(void)
19 return 353894400; 20 return 353894400;
20} 21}
21 22
22static inline const u32 ns9xxx_cpuclock(void) 23static inline u32 ns9xxx_cpuclock(void) __attribute__((const));
24static inline u32 ns9xxx_cpuclock(void)
23{ 25{
24 return ns9xxx_systemclock() / 2; 26 return ns9xxx_systemclock() / 2;
25} 27}
26 28
27static inline const u32 ns9xxx_ahbclock(void) 29static inline u32 ns9xxx_ahbclock(void) __attribute__((const));
30static inline u32 ns9xxx_ahbclock(void)
28{ 31{
29 return ns9xxx_systemclock() / 4; 32 return ns9xxx_systemclock() / 4;
30} 33}
31 34
32static inline const u32 ns9xxx_bbusclock(void) 35static inline u32 ns9xxx_bbusclock(void) __attribute__((const));
36static inline u32 ns9xxx_bbusclock(void)
33{ 37{
34 return ns9xxx_systemclock() / 8; 38 return ns9xxx_systemclock() / 8;
35} 39}
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
index 3762a6ae6a7f..590917efc94a 100644
--- a/include/asm-arm/arch-omap/gpio.h
+++ b/include/asm-arm/arch-omap/gpio.h
@@ -113,8 +113,9 @@ static inline int gpio_direction_input(unsigned gpio)
113 return __gpio_set_direction(gpio, 1); 113 return __gpio_set_direction(gpio, 1);
114} 114}
115 115
116static inline int gpio_direction_output(unsigned gpio) 116static inline int gpio_direction_output(unsigned gpio, int value)
117{ 117{
118 omap_set_gpio_dataout(gpio, value);
118 return __gpio_set_direction(gpio, 0); 119 return __gpio_set_direction(gpio, 0);
119} 120}
120 121
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
index 3d348a351157..aeba24347f8e 100644
--- a/include/asm-arm/arch-pxa/gpio.h
+++ b/include/asm-arm/arch-pxa/gpio.h
@@ -43,9 +43,9 @@ static inline int gpio_direction_input(unsigned gpio)
43 return pxa_gpio_mode(gpio | GPIO_IN); 43 return pxa_gpio_mode(gpio | GPIO_IN);
44} 44}
45 45
46static inline int gpio_direction_output(unsigned gpio) 46static inline int gpio_direction_output(unsigned gpio, int value)
47{ 47{
48 return pxa_gpio_mode(gpio | GPIO_OUT); 48 return pxa_gpio_mode(gpio | GPIO_OUT | (value ? 0 : GPIO_DFLT_LOW));
49} 49}
50 50
51static inline int __gpio_get_value(unsigned gpio) 51static inline int __gpio_get_value(unsigned gpio)
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index aec835b6f057..139c9d954818 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1476,7 +1476,7 @@
1476#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) 1476#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT)
1477#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) 1477#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
1478#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) 1478#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT)
1479#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT) 1479#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN)
1480#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) 1480#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN)
1481 1481
1482/* 1482/*
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h
index d47ae453f8ca..7583895fd336 100644
--- a/include/asm-arm/arch-s3c2410/gpio.h
+++ b/include/asm-arm/arch-s3c2410/gpio.h
@@ -44,9 +44,11 @@ static inline int gpio_direction_input(unsigned gpio)
44 return 0; 44 return 0;
45} 45}
46 46
47static inline int gpio_direction_output(unsigned gpio) 47static inline int gpio_direction_output(unsigned gpio, int value)
48{ 48{
49 s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT); 49 s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT);
50 /* REVISIT can we write the value first, to avoid glitching? */
51 s3c2410_gpio_setpin(gpio, value);
50 return 0; 52 return 0;
51} 53}
52 54
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h
index da7575b0e5d0..e7a9d26e22a8 100644
--- a/include/asm-arm/arch-sa1100/gpio.h
+++ b/include/asm-arm/arch-sa1100/gpio.h
@@ -38,7 +38,7 @@ static inline void gpio_free(unsigned gpio)
38} 38}
39 39
40extern int gpio_direction_input(unsigned gpio); 40extern int gpio_direction_input(unsigned gpio);
41extern int gpio_direction_output(unsigned gpio); 41extern int gpio_direction_output(unsigned gpio, int value);
42 42
43 43
44static inline int gpio_get_value(unsigned gpio) 44static inline int gpio_get_value(unsigned gpio)
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index ea88aa6bfc78..f266c2795124 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -103,9 +103,9 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
103 unsigned long tmp, tmp2; 103 unsigned long tmp, tmp2;
104 104
105 __asm__ __volatile__("@ atomic_clear_mask\n" 105 __asm__ __volatile__("@ atomic_clear_mask\n"
106"1: ldrex %0, %2\n" 106"1: ldrex %0, [%2]\n"
107" bic %0, %0, %3\n" 107" bic %0, %0, %3\n"
108" strex %1, %0, %2\n" 108" strex %1, %0, [%2]\n"
109" teq %1, #0\n" 109" teq %1, #0\n"
110" bne 1b" 110" bne 1b"
111 : "=&r" (tmp), "=&r" (tmp2) 111 : "=&r" (tmp), "=&r" (tmp2)
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index f06d8a43fdee..69134c7518c1 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -3,6 +3,7 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <asm/memory.h>
6 7
7#define CPU_ARCH_UNKNOWN 0 8#define CPU_ARCH_UNKNOWN 0
8#define CPU_ARCH_ARMv3 1 9#define CPU_ARCH_ARMv3 1
@@ -154,7 +155,7 @@ extern unsigned int user_debug;
154#define vectors_high() (0) 155#define vectors_high() (0)
155#endif 156#endif
156 157
157#if __LINUX_ARM_ARCH__ >= 6 158#if defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ >= 6
158#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ 159#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
159 : : "r" (0) : "memory") 160 : : "r" (0) : "memory")
160#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ 161#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \
@@ -168,22 +169,23 @@ extern unsigned int user_debug;
168#define dmb() __asm__ __volatile__ ("" : : : "memory") 169#define dmb() __asm__ __volatile__ ("" : : : "memory")
169#endif 170#endif
170 171
171#define mb() barrier() 172#ifndef CONFIG_SMP
172#define rmb() barrier() 173#define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
173#define wmb() barrier() 174#define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
174#define read_barrier_depends() do { } while(0) 175#define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
175 176#define smp_mb() barrier()
176#ifdef CONFIG_SMP 177#define smp_rmb() barrier()
177#define smp_mb() dmb() 178#define smp_wmb() barrier()
178#define smp_rmb() dmb()
179#define smp_wmb() dmb()
180#define smp_read_barrier_depends() read_barrier_depends()
181#else 179#else
182#define smp_mb() barrier() 180#define mb() dmb()
183#define smp_rmb() barrier() 181#define rmb() dmb()
184#define smp_wmb() barrier() 182#define wmb() dmb()
185#define smp_read_barrier_depends() read_barrier_depends() 183#define smp_mb() dmb()
186#endif /* CONFIG_SMP */ 184#define smp_rmb() dmb()
185#define smp_wmb() dmb()
186#endif
187#define read_barrier_depends() do { } while(0)
188#define smp_read_barrier_depends() do { } while(0)
187 189
188#define set_mb(var, value) do { var = value; smp_mb(); } while (0) 190#define set_mb(var, value) do { var = value; smp_mb(); } while (0)
189#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); 191#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index 0991b7bc3f78..c025ab47e4b9 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -372,7 +372,7 @@
372#define __NR_move_pages (__NR_SYSCALL_BASE+344) 372#define __NR_move_pages (__NR_SYSCALL_BASE+344)
373#define __NR_getcpu (__NR_SYSCALL_BASE+345) 373#define __NR_getcpu (__NR_SYSCALL_BASE+345)
374 /* 346 for epoll_pwait */ 374 /* 346 for epoll_pwait */
375#define __NR_sys_kexec_load (__NR_SYSCALL_BASE+347) 375#define __NR_kexec_load (__NR_SYSCALL_BASE+347)
376 376
377/* 377/*
378 * The following SWIs are ARM private. 378 * The following SWIs are ARM private.