aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/bug.h29
-rw-r--r--arch/mips/include/asm/mach-rc32434/gpio.h2
-rw-r--r--arch/mips/include/asm/mach-rc32434/rb.h14
-rw-r--r--arch/mips/include/asm/ptrace.h4
-rw-r--r--arch/mips/include/asm/time.h2
5 files changed, 31 insertions, 20 deletions
diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
index 7eb63de808bc..08ea46863fe5 100644
--- a/arch/mips/include/asm/bug.h
+++ b/arch/mips/include/asm/bug.h
@@ -7,20 +7,31 @@
7 7
8#include <asm/break.h> 8#include <asm/break.h>
9 9
10#define BUG() \ 10static inline void __noreturn BUG(void)
11do { \ 11{
12 __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \ 12 __asm__ __volatile__("break %0" : : "i" (BRK_BUG));
13} while (0) 13 /* Fool GCC into thinking the function doesn't return. */
14 while (1)
15 ;
16}
14 17
15#define HAVE_ARCH_BUG 18#define HAVE_ARCH_BUG
16 19
17#if (_MIPS_ISA > _MIPS_ISA_MIPS1) 20#if (_MIPS_ISA > _MIPS_ISA_MIPS1)
18 21
19#define BUG_ON(condition) \ 22static inline void __BUG_ON(unsigned long condition)
20do { \ 23{
21 __asm__ __volatile__("tne $0, %0, %1" \ 24 if (__builtin_constant_p(condition)) {
22 : : "r" (condition), "i" (BRK_BUG)); \ 25 if (condition)
23} while (0) 26 BUG();
27 else
28 return;
29 }
30 __asm__ __volatile__("tne $0, %0, %1"
31 : : "r" (condition), "i" (BRK_BUG));
32}
33
34#define BUG_ON(C) __BUG_ON((unsigned long)(C))
24 35
25#define HAVE_ARCH_BUG_ON 36#define HAVE_ARCH_BUG_ON
26 37
diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/asm/mach-rc32434/gpio.h
index c8e554eafce3..b5cf6457305a 100644
--- a/arch/mips/include/asm/mach-rc32434/gpio.h
+++ b/arch/mips/include/asm/mach-rc32434/gpio.h
@@ -84,5 +84,7 @@ extern void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned
84extern unsigned get_434_reg(unsigned reg_offs); 84extern unsigned get_434_reg(unsigned reg_offs);
85extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); 85extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask);
86extern unsigned char get_latch_u5(void); 86extern unsigned char get_latch_u5(void);
87extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
88extern void rb532_gpio_set_istat(int bit, unsigned gpio);
87 89
88#endif /* _RC32434_GPIO_H_ */ 90#endif /* _RC32434_GPIO_H_ */
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h
index 79e8ef67d0d3..f25a84916703 100644
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -40,12 +40,14 @@
40#define BTCS 0x010040 40#define BTCS 0x010040
41#define BTCOMPARE 0x010044 41#define BTCOMPARE 0x010044
42#define GPIOBASE 0x050000 42#define GPIOBASE 0x050000
43#define GPIOCFG 0x050004 43/* Offsets relative to GPIOBASE */
44#define GPIOD 0x050008 44#define GPIOFUNC 0x00
45#define GPIOILEVEL 0x05000C 45#define GPIOCFG 0x04
46#define GPIOISTAT 0x050010 46#define GPIOD 0x08
47#define GPIONMIEN 0x050014 47#define GPIOILEVEL 0x0C
48#define IMASK6 0x038038 48#define GPIOISTAT 0x10
49#define GPIONMIEN 0x14
50#define IMASK6 0x38
49#define LO_WPX (1 << 0) 51#define LO_WPX (1 << 0)
50#define LO_ALE (1 << 1) 52#define LO_ALE (1 << 1)
51#define LO_CLE (1 << 2) 53#define LO_CLE (1 << 2)
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 813abd16255d..c2c8bac43307 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -9,10 +9,6 @@
9#ifndef _ASM_PTRACE_H 9#ifndef _ASM_PTRACE_H
10#define _ASM_PTRACE_H 10#define _ASM_PTRACE_H
11 11
12#ifdef CONFIG_64BIT
13#define __ARCH_WANT_COMPAT_SYS_PTRACE
14#endif
15
16/* 0 - 31 are integer registers, 32 - 63 are fp registers. */ 12/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
17#define FPR_BASE 32 13#define FPR_BASE 32
18#define PC 64 14#define PC 64
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
index d3bd5c5aa2ec..9601ea950542 100644
--- a/arch/mips/include/asm/time.h
+++ b/arch/mips/include/asm/time.h
@@ -63,7 +63,7 @@ static inline int mips_clockevent_init(void)
63/* 63/*
64 * Initialize the count register as a clocksource 64 * Initialize the count register as a clocksource
65 */ 65 */
66#ifdef CONFIG_CEVT_R4K 66#ifdef CONFIG_CSRC_R4K
67extern int init_mips_clocksource(void); 67extern int init_mips_clocksource(void);
68#else 68#else
69static inline int init_mips_clocksource(void) 69static inline int init_mips_clocksource(void)