diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-11 03:22:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 03:22:04 -0500 |
commit | 95fd4845ed0ffcab305b4f30ce1c12dc34f1b56c (patch) | |
tree | aa2aac22a5b329b778a6771a87bbf1945ad49bbd /arch/blackfin/include | |
parent | d278c48435625cb6b7edcf6a547620768b175709 (diff) | |
parent | 8e4921515c1a379539607eb443d51c30f4f7f338 (diff) |
Merge commit 'v2.6.29-rc4' into perfcounters/core
Conflicts:
arch/x86/kernel/setup_percpu.c
arch/x86/mm/fault.c
drivers/acpi/processor_idle.c
kernel/irq/handle.c
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r-- | arch/blackfin/include/asm/checksum.h | 34 | ||||
-rw-r--r-- | arch/blackfin/include/asm/delay.h | 35 | ||||
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 58 | ||||
-rw-r--r-- | arch/blackfin/include/asm/kgdb.h | 53 | ||||
-rw-r--r-- | arch/blackfin/include/asm/mem_init.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/pda.h | 1 | ||||
-rw-r--r-- | arch/blackfin/include/asm/reboot.h | 2 |
7 files changed, 41 insertions, 144 deletions
diff --git a/arch/blackfin/include/asm/checksum.h b/arch/blackfin/include/asm/checksum.h index f67289a0d8d2..793581fc9556 100644 --- a/arch/blackfin/include/asm/checksum.h +++ b/arch/blackfin/include/asm/checksum.h | |||
@@ -63,23 +63,23 @@ static inline __wsum | |||
63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | 63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
64 | unsigned short proto, __wsum sum) | 64 | unsigned short proto, __wsum sum) |
65 | { | 65 | { |
66 | 66 | unsigned int carry; | |
67 | __asm__ ("%0 = %0 + %1;\n\t" | 67 | |
68 | "CC = AC0;\n\t" | 68 | __asm__ ("%0 = %0 + %2;\n\t" |
69 | "if !CC jump 4;\n\t" | 69 | "CC = AC0;\n\t" |
70 | "%0 = %0 + %4;\n\t" | 70 | "%1 = CC;\n\t" |
71 | "%0 = %0 + %2;\n\t" | 71 | "%0 = %0 + %1;\n\t" |
72 | "CC = AC0;\n\t" | 72 | "%0 = %0 + %3;\n\t" |
73 | "if !CC jump 4;\n\t" | 73 | "CC = AC0;\n\t" |
74 | "%0 = %0 + %4;\n\t" | 74 | "%1 = CC;\n\t" |
75 | "%0 = %0 + %3;\n\t" | 75 | "%0 = %0 + %1;\n\t" |
76 | "CC = AC0;\n\t" | 76 | "%0 = %0 + %4;\n\t" |
77 | "if !CC jump 4;\n\t" | 77 | "CC = AC0;\n\t" |
78 | "%0 = %0 + %4;\n\t" | 78 | "%1 = CC;\n\t" |
79 | "NOP;\n\t" | 79 | "%0 = %0 + %1;\n\t" |
80 | : "=d" (sum) | 80 | : "=d" (sum), "=&d" (carry) |
81 | : "d" (daddr), "d" (saddr), "d" ((ntohs(len)<<16)+proto*256), "d" (1), "0"(sum) | 81 | : "d" (daddr), "d" (saddr), "d" ((len + proto) << 8), "0"(sum) |
82 | : "CC"); | 82 | : "CC"); |
83 | 83 | ||
84 | return (sum); | 84 | return (sum); |
85 | } | 85 | } |
diff --git a/arch/blackfin/include/asm/delay.h b/arch/blackfin/include/asm/delay.h index 0889c3abb593..c31f91cc1d5d 100644 --- a/arch/blackfin/include/asm/delay.h +++ b/arch/blackfin/include/asm/delay.h | |||
@@ -13,29 +13,7 @@ | |||
13 | 13 | ||
14 | static inline void __delay(unsigned long loops) | 14 | static inline void __delay(unsigned long loops) |
15 | { | 15 | { |
16 | if (ANOMALY_05000312) { | 16 | __asm__ __volatile__ ( |
17 | /* Interrupted loads to loop registers -> bad */ | ||
18 | unsigned long tmp; | ||
19 | __asm__ __volatile__( | ||
20 | "[--SP] = LC0;" | ||
21 | "[--SP] = LT0;" | ||
22 | "[--SP] = LB0;" | ||
23 | "LSETUP (1f,1f) LC0 = %1;" | ||
24 | "1: NOP;" | ||
25 | /* We take advantage of the fact that LC0 is 0 at | ||
26 | * the end of the loop. Otherwise we'd need some | ||
27 | * NOPs after the CLI here. | ||
28 | */ | ||
29 | "CLI %0;" | ||
30 | "LB0 = [SP++];" | ||
31 | "LT0 = [SP++];" | ||
32 | "LC0 = [SP++];" | ||
33 | "STI %0;" | ||
34 | : "=d" (tmp) | ||
35 | : "a" (loops) | ||
36 | ); | ||
37 | } else | ||
38 | __asm__ __volatile__ ( | ||
39 | "LSETUP(1f, 1f) LC0 = %0;" | 17 | "LSETUP(1f, 1f) LC0 = %0;" |
40 | "1: NOP;" | 18 | "1: NOP;" |
41 | : | 19 | : |
@@ -47,16 +25,15 @@ static inline void __delay(unsigned long loops) | |||
47 | #include <linux/param.h> /* needed for HZ */ | 25 | #include <linux/param.h> /* needed for HZ */ |
48 | 26 | ||
49 | /* | 27 | /* |
50 | * Use only for very small delays ( < 1 msec). Should probably use a | 28 | * close approximation borrowed from m68knommu to avoid 64-bit math |
51 | * lookup table, really, as the multiplications take much too long with | ||
52 | * short delays. This is a "reasonable" implementation, though (and the | ||
53 | * first constant multiplications gets optimized away if the delay is | ||
54 | * a constant) | ||
55 | */ | 29 | */ |
30 | |||
31 | #define HZSCALE (268435456 / (1000000/HZ)) | ||
32 | |||
56 | static inline void udelay(unsigned long usecs) | 33 | static inline void udelay(unsigned long usecs) |
57 | { | 34 | { |
58 | extern unsigned long loops_per_jiffy; | 35 | extern unsigned long loops_per_jiffy; |
59 | __delay(usecs * loops_per_jiffy / (1000000 / HZ)); | 36 | __delay((((usecs * HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6); |
60 | } | 37 | } |
61 | 38 | ||
62 | #endif | 39 | #endif |
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 9477d82fcad2..d4a082ef75b4 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -27,60 +27,6 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | ||
31 | * Number BF537/6/4 BF561 BF533/2/1 | ||
32 | * BF527/5/2 | ||
33 | * | ||
34 | * GPIO_0 PF0 PF0 PF0 | ||
35 | * GPIO_1 PF1 PF1 PF1 | ||
36 | * GPIO_2 PF2 PF2 PF2 | ||
37 | * GPIO_3 PF3 PF3 PF3 | ||
38 | * GPIO_4 PF4 PF4 PF4 | ||
39 | * GPIO_5 PF5 PF5 PF5 | ||
40 | * GPIO_6 PF6 PF6 PF6 | ||
41 | * GPIO_7 PF7 PF7 PF7 | ||
42 | * GPIO_8 PF8 PF8 PF8 | ||
43 | * GPIO_9 PF9 PF9 PF9 | ||
44 | * GPIO_10 PF10 PF10 PF10 | ||
45 | * GPIO_11 PF11 PF11 PF11 | ||
46 | * GPIO_12 PF12 PF12 PF12 | ||
47 | * GPIO_13 PF13 PF13 PF13 | ||
48 | * GPIO_14 PF14 PF14 PF14 | ||
49 | * GPIO_15 PF15 PF15 PF15 | ||
50 | * GPIO_16 PG0 PF16 | ||
51 | * GPIO_17 PG1 PF17 | ||
52 | * GPIO_18 PG2 PF18 | ||
53 | * GPIO_19 PG3 PF19 | ||
54 | * GPIO_20 PG4 PF20 | ||
55 | * GPIO_21 PG5 PF21 | ||
56 | * GPIO_22 PG6 PF22 | ||
57 | * GPIO_23 PG7 PF23 | ||
58 | * GPIO_24 PG8 PF24 | ||
59 | * GPIO_25 PG9 PF25 | ||
60 | * GPIO_26 PG10 PF26 | ||
61 | * GPIO_27 PG11 PF27 | ||
62 | * GPIO_28 PG12 PF28 | ||
63 | * GPIO_29 PG13 PF29 | ||
64 | * GPIO_30 PG14 PF30 | ||
65 | * GPIO_31 PG15 PF31 | ||
66 | * GPIO_32 PH0 PF32 | ||
67 | * GPIO_33 PH1 PF33 | ||
68 | * GPIO_34 PH2 PF34 | ||
69 | * GPIO_35 PH3 PF35 | ||
70 | * GPIO_36 PH4 PF36 | ||
71 | * GPIO_37 PH5 PF37 | ||
72 | * GPIO_38 PH6 PF38 | ||
73 | * GPIO_39 PH7 PF39 | ||
74 | * GPIO_40 PH8 PF40 | ||
75 | * GPIO_41 PH9 PF41 | ||
76 | * GPIO_42 PH10 PF42 | ||
77 | * GPIO_43 PH11 PF43 | ||
78 | * GPIO_44 PH12 PF44 | ||
79 | * GPIO_45 PH13 PF45 | ||
80 | * GPIO_46 PH14 PF46 | ||
81 | * GPIO_47 PH15 PF47 | ||
82 | */ | ||
83 | |||
84 | #ifndef __ARCH_BLACKFIN_GPIO_H__ | 30 | #ifndef __ARCH_BLACKFIN_GPIO_H__ |
85 | #define __ARCH_BLACKFIN_GPIO_H__ | 31 | #define __ARCH_BLACKFIN_GPIO_H__ |
86 | 32 | ||
@@ -295,10 +241,6 @@ int bfin_gpio_direction_output(unsigned gpio, int value); | |||
295 | int bfin_gpio_get_value(unsigned gpio); | 241 | int bfin_gpio_get_value(unsigned gpio); |
296 | void bfin_gpio_set_value(unsigned gpio, int value); | 242 | void bfin_gpio_set_value(unsigned gpio, int value); |
297 | 243 | ||
298 | #ifndef BF548_FAMILY | ||
299 | #define bfin_gpio_set_value(gpio, value) set_gpio_data(gpio, value) | ||
300 | #endif | ||
301 | |||
302 | #ifdef CONFIG_GPIOLIB | 244 | #ifdef CONFIG_GPIOLIB |
303 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 245 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
304 | 246 | ||
diff --git a/arch/blackfin/include/asm/kgdb.h b/arch/blackfin/include/asm/kgdb.h index 26ebac6646d8..c8b256d2ea30 100644 --- a/arch/blackfin/include/asm/kgdb.h +++ b/arch/blackfin/include/asm/kgdb.h | |||
@@ -1,32 +1,8 @@ | |||
1 | /* | 1 | /* Blackfin KGDB header |
2 | * File: include/asm-blackfin/kgdb.h | ||
3 | * Based on: | ||
4 | * Author: Sonic Zhang | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2005-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | 2 | * |
16 | * This program is free software; you can redistribute it and/or modify | 3 | * Copyright 2005-2009 Analog Devices Inc. |
17 | * it under the terms of the GNU General Public License as published by | ||
18 | * the Free Software Foundation; either version 2 of the License, or | ||
19 | * (at your option) any later version. | ||
20 | * | 4 | * |
21 | * This program is distributed in the hope that it will be useful, | 5 | * Licensed under the GPL-2 or later. |
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
24 | * GNU General Public License for more details. | ||
25 | * | ||
26 | * You should have received a copy of the GNU General Public License | ||
27 | * along with this program; if not, see the file COPYING, or write | ||
28 | * to the Free Software Foundation, Inc., | ||
29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
30 | */ | 6 | */ |
31 | 7 | ||
32 | #ifndef __ASM_BLACKFIN_KGDB_H__ | 8 | #ifndef __ASM_BLACKFIN_KGDB_H__ |
@@ -37,17 +13,18 @@ | |||
37 | /* gdb locks */ | 13 | /* gdb locks */ |
38 | #define KGDB_MAX_NO_CPUS 8 | 14 | #define KGDB_MAX_NO_CPUS 8 |
39 | 15 | ||
40 | /************************************************************************/ | 16 | /* |
41 | /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ | 17 | * BUFMAX defines the maximum number of characters in inbound/outbound buffers. |
42 | /* at least NUMREGBYTES*2 are needed for register packets */ | 18 | * At least NUMREGBYTES*2 are needed for register packets. |
43 | /* Longer buffer is needed to list all threads */ | 19 | * Longer buffer is needed to list all threads. |
20 | */ | ||
44 | #define BUFMAX 2048 | 21 | #define BUFMAX 2048 |
45 | 22 | ||
46 | /* | 23 | /* |
47 | * Note that this register image is different from | 24 | * Note that this register image is different from |
48 | * the register image that Linux produces at interrupt time. | 25 | * the register image that Linux produces at interrupt time. |
49 | * | 26 | * |
50 | * Linux's register image is defined by struct pt_regs in ptrace.h. | 27 | * Linux's register image is defined by struct pt_regs in ptrace.h. |
51 | */ | 28 | */ |
52 | enum regnames { | 29 | enum regnames { |
53 | /* Core Registers */ | 30 | /* Core Registers */ |
@@ -104,14 +81,14 @@ enum regnames { | |||
104 | BFIN_RETX, | 81 | BFIN_RETX, |
105 | BFIN_RETN, | 82 | BFIN_RETN, |
106 | BFIN_RETE, | 83 | BFIN_RETE, |
107 | 84 | ||
108 | /* Pseudo Registers */ | 85 | /* Pseudo Registers */ |
109 | BFIN_PC, | 86 | BFIN_PC, |
110 | BFIN_CC, | 87 | BFIN_CC, |
111 | BFIN_EXTRA1, /* Address of .text section. */ | 88 | BFIN_EXTRA1, /* Address of .text section. */ |
112 | BFIN_EXTRA2, /* Address of .data section. */ | 89 | BFIN_EXTRA2, /* Address of .data section. */ |
113 | BFIN_EXTRA3, /* Address of .bss section. */ | 90 | BFIN_EXTRA3, /* Address of .bss section. */ |
114 | BFIN_FDPIC_EXEC, | 91 | BFIN_FDPIC_EXEC, |
115 | BFIN_FDPIC_INTERP, | 92 | BFIN_FDPIC_INTERP, |
116 | 93 | ||
117 | /* MMRs */ | 94 | /* MMRs */ |
@@ -126,7 +103,7 @@ enum regnames { | |||
126 | 103 | ||
127 | static inline void arch_kgdb_breakpoint(void) | 104 | static inline void arch_kgdb_breakpoint(void) |
128 | { | 105 | { |
129 | asm(" EXCPT 2;"); | 106 | asm("EXCPT 2;"); |
130 | } | 107 | } |
131 | #define BREAK_INSTR_SIZE 2 | 108 | #define BREAK_INSTR_SIZE 2 |
132 | #define CACHE_FLUSH_IS_SAFE 1 | 109 | #define CACHE_FLUSH_IS_SAFE 1 |
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h index 255a9316ad36..61f7487fbf12 100644 --- a/arch/blackfin/include/asm/mem_init.h +++ b/arch/blackfin/include/asm/mem_init.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) | 115 | #define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) |
116 | 116 | ||
117 | /* Enable SCLK Out */ | 117 | /* Enable SCLK Out */ |
118 | #define mem_SDGCTL (0x80000000 | SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS) | 118 | #define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS) |
119 | #else | 119 | #else |
120 | #define mem_SDRRC CONFIG_MEM_SDRRC | 120 | #define mem_SDRRC CONFIG_MEM_SDRRC |
121 | #define mem_SDGCTL CONFIG_MEM_SDGCTL | 121 | #define mem_SDGCTL CONFIG_MEM_SDGCTL |
diff --git a/arch/blackfin/include/asm/pda.h b/arch/blackfin/include/asm/pda.h index bd8d4a7efeb2..a67142740df0 100644 --- a/arch/blackfin/include/asm/pda.h +++ b/arch/blackfin/include/asm/pda.h | |||
@@ -59,6 +59,7 @@ struct blackfin_pda { /* Per-processor Data Area */ | |||
59 | unsigned long icplb_fault_addr; | 59 | unsigned long icplb_fault_addr; |
60 | unsigned long retx; | 60 | unsigned long retx; |
61 | unsigned long seqstat; | 61 | unsigned long seqstat; |
62 | unsigned int __nmi_count; /* number of times NMI asserted on this CPU */ | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | extern struct blackfin_pda cpu_pda[]; | 65 | extern struct blackfin_pda cpu_pda[]; |
diff --git a/arch/blackfin/include/asm/reboot.h b/arch/blackfin/include/asm/reboot.h index 4856d62b7467..ae1e36329bec 100644 --- a/arch/blackfin/include/asm/reboot.h +++ b/arch/blackfin/include/asm/reboot.h | |||
@@ -15,6 +15,6 @@ extern void native_machine_halt(void); | |||
15 | extern void native_machine_power_off(void); | 15 | extern void native_machine_power_off(void); |
16 | 16 | ||
17 | /* common reboot workarounds */ | 17 | /* common reboot workarounds */ |
18 | extern void bfin_gpio_reset_spi0_ssel1(void); | 18 | extern void bfin_reset_boot_spi_cs(unsigned short pin); |
19 | 19 | ||
20 | #endif | 20 | #endif |