diff options
author | Tejun Heo <tj@kernel.org> | 2010-01-04 19:17:33 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-01-04 19:17:33 -0500 |
commit | 32032df6c2f6c9c6b2ada2ce42322231824f70c2 (patch) | |
tree | b1ce838a37044bb38dfc128e2116ca35630e629a /arch/blackfin/mach-common | |
parent | 22b737f4c75197372d64afc6ed1bccd58c00e549 (diff) | |
parent | c5974b835a909ff15c3b7e6cf6789b5eb919f419 (diff) |
Merge branch 'master' into percpu
Conflicts:
arch/powerpc/platforms/pseries/hvCall.S
include/linux/percpu.h
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r-- | arch/blackfin/mach-common/arch_checks.c | 32 | ||||
-rw-r--r-- | arch/blackfin/mach-common/cache-c.c | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-common/cache.S | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-common/clocks-init.c | 1 | ||||
-rw-r--r-- | arch/blackfin/mach-common/cpufreq.c | 32 | ||||
-rw-r--r-- | arch/blackfin/mach-common/dpmc_modes.S | 30 | ||||
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 38 | ||||
-rw-r--r-- | arch/blackfin/mach-common/head.S | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-common/interrupt.S | 30 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 50 | ||||
-rw-r--r-- | arch/blackfin/mach-common/irqpanic.c | 27 | ||||
-rw-r--r-- | arch/blackfin/mach-common/pm.c | 34 | ||||
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 44 |
13 files changed, 101 insertions, 223 deletions
diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c index 5998d8632a73..f2ca211a76a0 100644 --- a/arch/blackfin/mach-common/arch_checks.c +++ b/arch/blackfin/mach-common/arch_checks.c | |||
@@ -1,30 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/arch_checks.c | 2 | * Do some checking to make sure things are OK |
3 | * Based on: | ||
4 | * Author: Robin Getz <rgetz@blackfin.uclinux.org> | ||
5 | * | 3 | * |
6 | * Created: 25Jul07 | 4 | * Copyright 2007-2009 Analog Devices Inc. |
7 | * Description: Do some checking to make sure things are OK | ||
8 | * | 5 | * |
9 | * Modified: | 6 | * Licensed under the GPL-2 or later. |
10 | * Copyright 2004-2007 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | 7 | */ |
29 | 8 | ||
30 | #include <asm/fixed_code.h> | 9 | #include <asm/fixed_code.h> |
@@ -78,3 +57,8 @@ | |||
78 | (!defined(CONFIG_BFIN_EXTMEM_DCACHEABLE) && defined(CONFIG_BFIN_L2_WRITEBACK))) | 57 | (!defined(CONFIG_BFIN_EXTMEM_DCACHEABLE) && defined(CONFIG_BFIN_L2_WRITEBACK))) |
79 | # error You are exposing Anomaly 220 in this config, either config L2 as Write Through, or make External Memory WB. | 58 | # error You are exposing Anomaly 220 in this config, either config L2 as Write Through, or make External Memory WB. |
80 | #endif | 59 | #endif |
60 | |||
61 | #if ANOMALY_05000475 && \ | ||
62 | (defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK)) | ||
63 | # error "Anomaly 475 does not allow you to use Write Back cache with L2 or External Memory" | ||
64 | #endif | ||
diff --git a/arch/blackfin/mach-common/cache-c.c b/arch/blackfin/mach-common/cache-c.c index 4ebbd78db3a4..a60a24f5035d 100644 --- a/arch/blackfin/mach-common/cache-c.c +++ b/arch/blackfin/mach-common/cache-c.c | |||
@@ -3,8 +3,6 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2004-2009 Analog Devices Inc. | 4 | * Copyright 2004-2009 Analog Devices Inc. |
5 | * | 5 | * |
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
9 | */ | 7 | */ |
10 | 8 | ||
diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S index d9666fe6c3d6..ea540318a228 100644 --- a/arch/blackfin/mach-common/cache.S +++ b/arch/blackfin/mach-common/cache.S | |||
@@ -3,8 +3,6 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2004-2008 Analog Devices Inc. | 4 | * Copyright 2004-2008 Analog Devices Inc. |
5 | * | 5 | * |
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
9 | */ | 7 | */ |
10 | 8 | ||
diff --git a/arch/blackfin/mach-common/clocks-init.c b/arch/blackfin/mach-common/clocks-init.c index ef6870e9eea6..d5cfe611b778 100644 --- a/arch/blackfin/mach-common/clocks-init.c +++ b/arch/blackfin/mach-common/clocks-init.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/dma.h> | 13 | #include <asm/dma.h> |
14 | #include <asm/clocks.h> | 14 | #include <asm/clocks.h> |
15 | #include <asm/mem_init.h> | 15 | #include <asm/mem_init.h> |
16 | #include <asm/dpmc.h> | ||
16 | 17 | ||
17 | #define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */ | 18 | #define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */ |
18 | #define PLL_CTL_VAL \ | 19 | #define PLL_CTL_VAL \ |
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c index 85c658083279..777582897253 100644 --- a/arch/blackfin/mach-common/cpufreq.c +++ b/arch/blackfin/mach-common/cpufreq.c | |||
@@ -1,30 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/cpufreq.c | 2 | * Blackfin core clock scaling |
3 | * Based on: | ||
4 | * Author: | ||
5 | * | 3 | * |
6 | * Created: | 4 | * Copyright 2008-2009 Analog Devices Inc. |
7 | * Description: Blackfin core clock scaling | ||
8 | * | 5 | * |
9 | * Modified: | 6 | * Licensed under the GPL-2 or later. |
10 | * Copyright 2004-2008 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | 7 | */ |
29 | 8 | ||
30 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
@@ -34,7 +13,7 @@ | |||
34 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
35 | #include <asm/blackfin.h> | 14 | #include <asm/blackfin.h> |
36 | #include <asm/time.h> | 15 | #include <asm/time.h> |
37 | 16 | #include <asm/dpmc.h> | |
38 | 17 | ||
39 | /* this is the table of CCLK frequencies, in Hz */ | 18 | /* this is the table of CCLK frequencies, in Hz */ |
40 | /* .index is the entry in the auxillary dpm_state_table[] */ | 19 | /* .index is the entry in the auxillary dpm_state_table[] */ |
@@ -159,7 +138,8 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy) | |||
159 | dpm_state_table[index].tscale); | 138 | dpm_state_table[index].tscale); |
160 | } | 139 | } |
161 | 140 | ||
162 | policy->cpuinfo.transition_latency = (bfin_read_PLL_LOCKCNT() / (sclk / 1000000)) * 1000; | 141 | policy->cpuinfo.transition_latency = 50000; /* 50us assumed */ |
142 | |||
163 | /*Now ,only support one cpu */ | 143 | /*Now ,only support one cpu */ |
164 | policy->cur = cclk; | 144 | policy->cur = cclk; |
165 | cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu); | 145 | cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu); |
diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S index 8009a512fb11..b03716896051 100644 --- a/arch/blackfin/mach-common/dpmc_modes.S +++ b/arch/blackfin/mach-common/dpmc_modes.S | |||
@@ -404,6 +404,21 @@ ENTRY(_do_hibernate) | |||
404 | PM_SYS_PUSH(EBIU_FCTL) | 404 | PM_SYS_PUSH(EBIU_FCTL) |
405 | #endif | 405 | #endif |
406 | 406 | ||
407 | #ifdef PORTCIO_FER | ||
408 | PM_SYS_PUSH16(PORTCIO_DIR) | ||
409 | PM_SYS_PUSH16(PORTCIO_INEN) | ||
410 | PM_SYS_PUSH16(PORTCIO) | ||
411 | PM_SYS_PUSH16(PORTCIO_FER) | ||
412 | PM_SYS_PUSH16(PORTDIO_DIR) | ||
413 | PM_SYS_PUSH16(PORTDIO_INEN) | ||
414 | PM_SYS_PUSH16(PORTDIO) | ||
415 | PM_SYS_PUSH16(PORTDIO_FER) | ||
416 | PM_SYS_PUSH16(PORTEIO_DIR) | ||
417 | PM_SYS_PUSH16(PORTEIO_INEN) | ||
418 | PM_SYS_PUSH16(PORTEIO) | ||
419 | PM_SYS_PUSH16(PORTEIO_FER) | ||
420 | #endif | ||
421 | |||
407 | PM_SYS_PUSH16(SYSCR) | 422 | PM_SYS_PUSH16(SYSCR) |
408 | 423 | ||
409 | /* Save Core MMRs */ | 424 | /* Save Core MMRs */ |
@@ -716,6 +731,21 @@ ENTRY(_do_hibernate) | |||
716 | P0.L = lo(PLL_CTL); | 731 | P0.L = lo(PLL_CTL); |
717 | PM_SYS_POP16(SYSCR) | 732 | PM_SYS_POP16(SYSCR) |
718 | 733 | ||
734 | #ifdef PORTCIO_FER | ||
735 | PM_SYS_POP16(PORTEIO_FER) | ||
736 | PM_SYS_POP16(PORTEIO) | ||
737 | PM_SYS_POP16(PORTEIO_INEN) | ||
738 | PM_SYS_POP16(PORTEIO_DIR) | ||
739 | PM_SYS_POP16(PORTDIO_FER) | ||
740 | PM_SYS_POP16(PORTDIO) | ||
741 | PM_SYS_POP16(PORTDIO_INEN) | ||
742 | PM_SYS_POP16(PORTDIO_DIR) | ||
743 | PM_SYS_POP16(PORTCIO_FER) | ||
744 | PM_SYS_POP16(PORTCIO) | ||
745 | PM_SYS_POP16(PORTCIO_INEN) | ||
746 | PM_SYS_POP16(PORTCIO_DIR) | ||
747 | #endif | ||
748 | |||
719 | #ifdef EBIU_FCTL | 749 | #ifdef EBIU_FCTL |
720 | PM_SYS_POP(EBIU_FCTL) | 750 | PM_SYS_POP(EBIU_FCTL) |
721 | PM_SYS_POP(EBIU_MODE) | 751 | PM_SYS_POP(EBIU_MODE) |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index a3ea7e9fe43b..01b2f58dfb95 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -1,32 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/entry.S | 2 | * Contains the system-call and fault low-level handling routines. |
3 | * Based on: | 3 | * This also contains the timer-interrupt handler, as well as all |
4 | * Author: Linus Torvalds | 4 | * interrupts and faults that can result in a task-switch. |
5 | * | 5 | * |
6 | * Created: ? | 6 | * Copyright 2005-2009 Analog Devices Inc. |
7 | * Description: contains the system-call and fault low-level handling routines. | ||
8 | * This also contains the timer-interrupt handler, as well as all | ||
9 | * interrupts and faults that can result in a task-switch. | ||
10 | * | 7 | * |
11 | * Modified: | 8 | * Licensed under the GPL-2 or later. |
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | * This program is free software; you can redistribute it and/or modify | ||
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 | * | ||
21 | * This program is distributed in the hope that it will be useful, | ||
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 | */ | 9 | */ |
31 | 10 | ||
32 | /* NOTE: This code handles signal-recognition, which happens every time | 11 | /* NOTE: This code handles signal-recognition, which happens every time |
@@ -734,6 +713,8 @@ ENTRY(_system_call) | |||
734 | cc = BITTST(r7, TIF_RESTORE_SIGMASK); | 713 | cc = BITTST(r7, TIF_RESTORE_SIGMASK); |
735 | if cc jump .Lsyscall_do_signals; | 714 | if cc jump .Lsyscall_do_signals; |
736 | cc = BITTST(r7, TIF_SIGPENDING); | 715 | cc = BITTST(r7, TIF_SIGPENDING); |
716 | if cc jump .Lsyscall_do_signals; | ||
717 | cc = BITTST(r7, TIF_NOTIFY_RESUME); | ||
737 | if !cc jump .Lsyscall_really_exit; | 718 | if !cc jump .Lsyscall_really_exit; |
738 | .Lsyscall_do_signals: | 719 | .Lsyscall_do_signals: |
739 | /* Reenable interrupts. */ | 720 | /* Reenable interrupts. */ |
@@ -742,7 +723,7 @@ ENTRY(_system_call) | |||
742 | 723 | ||
743 | r0 = sp; | 724 | r0 = sp; |
744 | SP += -12; | 725 | SP += -12; |
745 | call _do_signal; | 726 | call _do_notify_resume; |
746 | SP += 12; | 727 | SP += 12; |
747 | 728 | ||
748 | .Lsyscall_really_exit: | 729 | .Lsyscall_really_exit: |
@@ -1443,7 +1424,7 @@ ENTRY(_sys_call_table) | |||
1443 | .long _sys_ni_syscall /* streams2 */ | 1424 | .long _sys_ni_syscall /* streams2 */ |
1444 | .long _sys_vfork /* 190 */ | 1425 | .long _sys_vfork /* 190 */ |
1445 | .long _sys_getrlimit | 1426 | .long _sys_getrlimit |
1446 | .long _sys_mmap2 | 1427 | .long _sys_mmap_pgoff |
1447 | .long _sys_truncate64 | 1428 | .long _sys_truncate64 |
1448 | .long _sys_ftruncate64 | 1429 | .long _sys_ftruncate64 |
1449 | .long _sys_stat64 /* 195 */ | 1430 | .long _sys_stat64 /* 195 */ |
@@ -1621,6 +1602,7 @@ ENTRY(_sys_call_table) | |||
1621 | .long _sys_pwritev | 1602 | .long _sys_pwritev |
1622 | .long _sys_rt_tgsigqueueinfo | 1603 | .long _sys_rt_tgsigqueueinfo |
1623 | .long _sys_perf_event_open | 1604 | .long _sys_perf_event_open |
1605 | .long _sys_recvmmsg /* 370 */ | ||
1624 | 1606 | ||
1625 | .rept NR_syscalls-(.-_sys_call_table)/4 | 1607 | .rept NR_syscalls-(.-_sys_call_table)/4 |
1626 | .long _sys_ni_syscall | 1608 | .long _sys_ni_syscall |
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 9c79dfea2a53..cab0a0031eee 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -3,8 +3,6 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2004-2008 Analog Devices Inc. | 4 | * Copyright 2004-2008 Analog Devices Inc. |
5 | * | 5 | * |
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
9 | */ | 7 | */ |
10 | 8 | ||
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index 82d417ef4b5b..8085ff1cce00 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
@@ -1,31 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/interrupt.S | 2 | * Interrupt Entries |
3 | * Based on: | ||
4 | * Author: D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca> | ||
5 | * Kenneth Albanowski <kjahds@kjahds.com> | ||
6 | * | ||
7 | * Created: ? | ||
8 | * Description: Interrupt Entries | ||
9 | * | ||
10 | * Modified: | ||
11 | * Copyright 2004-2006 Analog Devices Inc. | ||
12 | * | 3 | * |
13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 4 | * Copyright 2005-2009 Analog Devices Inc. |
14 | * | 5 | * D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca> |
15 | * This program is free software; you can redistribute it and/or modify | 6 | * Kenneth Albanowski <kjahds@kjahds.com> |
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2 of the License, or | ||
18 | * (at your option) any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
23 | * GNU General Public License for more details. | ||
24 | * | 7 | * |
25 | * You should have received a copy of the GNU General Public License | 8 | * Licensed under the GPL-2 or later. |
26 | * along with this program; if not, see the file COPYING, or write | ||
27 | * to the Free Software Foundation, Inc., | ||
28 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
29 | */ | 9 | */ |
30 | 10 | ||
31 | #include <asm/blackfin.h> | 11 | #include <asm/blackfin.h> |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 6ffda78aaf9d..1873b2c1fede 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -1,33 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/ints-priority.c | 2 | * Set up the interrupt priorities |
3 | * | 3 | * |
4 | * Description: Set up the interrupt priorities | 4 | * Copyright 2004-2009 Analog Devices Inc. |
5 | * 2003 Bas Vermeulen <bas@buyways.nl> | ||
6 | * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca> | ||
7 | * 2000-2001 Lineo, Inc. D. Jefff Dionne <jeff@lineo.ca> | ||
8 | * 1999 D. Jeff Dionne <jeff@uclinux.org> | ||
9 | * 1996 Roman Zippel | ||
5 | * | 10 | * |
6 | * Modified: | 11 | * Licensed under the GPL-2 |
7 | * 1996 Roman Zippel | ||
8 | * 1999 D. Jeff Dionne <jeff@uclinux.org> | ||
9 | * 2000-2001 Lineo, Inc. D. Jefff Dionne <jeff@lineo.ca> | ||
10 | * 2002 Arcturus Networks Inc. MaTed <mated@sympatico.ca> | ||
11 | * 2003 Metrowerks/Motorola | ||
12 | * 2003 Bas Vermeulen <bas@buyways.nl> | ||
13 | * Copyright 2004-2008 Analog Devices Inc. | ||
14 | * | ||
15 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License as published by | ||
19 | * the Free Software Foundation; either version 2 of the License, or | ||
20 | * (at your option) any later version. | ||
21 | * | ||
22 | * This program is distributed in the hope that it will be useful, | ||
23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 | * GNU General Public License for more details. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License | ||
28 | * along with this program; if not, see the file COPYING, or write | ||
29 | * to the Free Software Foundation, Inc., | ||
30 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
31 | */ | 12 | */ |
32 | 13 | ||
33 | #include <linux/module.h> | 14 | #include <linux/module.h> |
@@ -44,11 +25,20 @@ | |||
44 | #include <asm/blackfin.h> | 25 | #include <asm/blackfin.h> |
45 | #include <asm/gpio.h> | 26 | #include <asm/gpio.h> |
46 | #include <asm/irq_handler.h> | 27 | #include <asm/irq_handler.h> |
28 | #include <asm/dpmc.h> | ||
29 | #include <asm/bfin5xx_spi.h> | ||
30 | #include <asm/bfin_sport.h> | ||
47 | 31 | ||
48 | #define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1)) | 32 | #define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1)) |
49 | 33 | ||
50 | #ifdef BF537_FAMILY | 34 | #ifdef BF537_FAMILY |
51 | # define BF537_GENERIC_ERROR_INT_DEMUX | 35 | # define BF537_GENERIC_ERROR_INT_DEMUX |
36 | # define SPI_ERR_MASK (BIT_STAT_TXCOL | BIT_STAT_RBSY | BIT_STAT_MODF | BIT_STAT_TXE) /* SPI_STAT */ | ||
37 | # define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF) /* SPORT_STAT */ | ||
38 | # define PPI_ERR_MASK (0xFFFF & ~FLD) /* PPI_STATUS */ | ||
39 | # define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE) /* EMAC_SYSTAT */ | ||
40 | # define UART_ERR_MASK (0x6) /* UART_IIR */ | ||
41 | # define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF) /* CAN_GIF */ | ||
52 | #else | 42 | #else |
53 | # undef BF537_GENERIC_ERROR_INT_DEMUX | 43 | # undef BF537_GENERIC_ERROR_INT_DEMUX |
54 | #endif | 44 | #endif |
@@ -343,11 +333,9 @@ static void bfin_demux_error_irq(unsigned int int_err_irq, | |||
343 | irq = IRQ_CAN_ERROR; | 333 | irq = IRQ_CAN_ERROR; |
344 | else if (bfin_read_SPI_STAT() & SPI_ERR_MASK) | 334 | else if (bfin_read_SPI_STAT() & SPI_ERR_MASK) |
345 | irq = IRQ_SPI_ERROR; | 335 | irq = IRQ_SPI_ERROR; |
346 | else if ((bfin_read_UART0_IIR() & UART_ERR_MASK_STAT1) && | 336 | else if ((bfin_read_UART0_IIR() & UART_ERR_MASK) == UART_ERR_MASK) |
347 | (bfin_read_UART0_IIR() & UART_ERR_MASK_STAT0)) | ||
348 | irq = IRQ_UART0_ERROR; | 337 | irq = IRQ_UART0_ERROR; |
349 | else if ((bfin_read_UART1_IIR() & UART_ERR_MASK_STAT1) && | 338 | else if ((bfin_read_UART1_IIR() & UART_ERR_MASK) == UART_ERR_MASK) |
350 | (bfin_read_UART1_IIR() & UART_ERR_MASK_STAT0)) | ||
351 | irq = IRQ_UART1_ERROR; | 339 | irq = IRQ_UART1_ERROR; |
352 | 340 | ||
353 | if (irq) { | 341 | if (irq) { |
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c index 883e3241b17e..c6496249e2bc 100644 --- a/arch/blackfin/mach-common/irqpanic.c +++ b/arch/blackfin/mach-common/irqpanic.c | |||
@@ -1,30 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/irqpanic.c | 2 | * panic kernel with dump information |
3 | * Based on: | ||
4 | * Author: | ||
5 | * | 3 | * |
6 | * Created: ? | 4 | * Copyright 2005-2009 Analog Devices Inc. |
7 | * Description: panic kernel with dump information | ||
8 | * | 5 | * |
9 | * Modified: rgetz - added cache checking code 14Feb06 | 6 | * Licensed under the GPL-2 or later. |
10 | * Copyright 2004-2006 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | 7 | */ |
29 | 8 | ||
30 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 0e3d4ff9d8b6..8837be4edb4a 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -1,35 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mach-common/pm.c | 2 | * Blackfin power management |
3 | * Based on: arm/mach-omap/pm.c | ||
4 | * Author: Cliff Brake <cbrake@accelent.com> Copyright (c) 2001 | ||
5 | * | 3 | * |
6 | * Created: 2001 | 4 | * Copyright 2006-2009 Analog Devices Inc. |
7 | * Description: Blackfin power management | ||
8 | * | 5 | * |
9 | * Modified: Nicolas Pitre - PXA250 support | 6 | * Licensed under the GPL-2 |
10 | * Copyright (c) 2002 Monta Vista Software, Inc. | 7 | * based on arm/mach-omap/pm.c |
11 | * David Singleton - OMAP1510 | 8 | * Copyright 2001, Cliff Brake <cbrake@accelent.com> and others |
12 | * Copyright (c) 2002 Monta Vista Software, Inc. | ||
13 | * Dirk Behme <dirk.behme@de.bosch.com> - OMAP1510/1610 | ||
14 | * Copyright 2004 | ||
15 | * Copyright 2004-2008 Analog Devices Inc. | ||
16 | * | ||
17 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
18 | * | ||
19 | * This program is free software; you can redistribute it and/or modify | ||
20 | * it under the terms of the GNU General Public License as published by | ||
21 | * the Free Software Foundation; either version 2 of the License, or | ||
22 | * (at your option) any later version. | ||
23 | * | ||
24 | * This program is distributed in the hope that it will be useful, | ||
25 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
26 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
27 | * GNU General Public License for more details. | ||
28 | * | ||
29 | * You should have received a copy of the GNU General Public License | ||
30 | * along with this program; if not, see the file COPYING, or write | ||
31 | * to the Free Software Foundation, Inc., | ||
32 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
33 | */ | 9 | */ |
34 | 10 | ||
35 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 349ee3f5466a..369e687582b7 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -1,24 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/kernel/smp.c | 2 | * IPI management based on arch/arm/kernel/smp.c (Copyright 2002 ARM Limited) |
3 | * Author: Philippe Gerum <rpm@xenomai.org> | ||
4 | * IPI management based on arch/arm/kernel/smp.c. | ||
5 | * | 3 | * |
6 | * Copyright 2007 Analog Devices Inc. | 4 | * Copyright 2007-2009 Analog Devices Inc. |
5 | * Philippe Gerum <rpm@xenomai.org> | ||
7 | * | 6 | * |
8 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under the GPL-2. |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, see the file COPYING, or write | ||
20 | * to the Free Software Foundation, Inc., | ||
21 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | */ | 8 | */ |
23 | 9 | ||
24 | #include <linux/module.h> | 10 | #include <linux/module.h> |
@@ -290,10 +276,9 @@ void smp_send_reschedule(int cpu) | |||
290 | if (cpu_is_offline(cpu)) | 276 | if (cpu_is_offline(cpu)) |
291 | return; | 277 | return; |
292 | 278 | ||
293 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 279 | msg = kzalloc(sizeof(*msg), GFP_ATOMIC); |
294 | if (!msg) | 280 | if (!msg) |
295 | return; | 281 | return; |
296 | memset(msg, 0, sizeof(msg)); | ||
297 | INIT_LIST_HEAD(&msg->list); | 282 | INIT_LIST_HEAD(&msg->list); |
298 | msg->type = BFIN_IPI_RESCHEDULE; | 283 | msg->type = BFIN_IPI_RESCHEDULE; |
299 | 284 | ||
@@ -319,10 +304,9 @@ void smp_send_stop(void) | |||
319 | if (cpus_empty(callmap)) | 304 | if (cpus_empty(callmap)) |
320 | return; | 305 | return; |
321 | 306 | ||
322 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 307 | msg = kzalloc(sizeof(*msg), GFP_ATOMIC); |
323 | if (!msg) | 308 | if (!msg) |
324 | return; | 309 | return; |
325 | memset(msg, 0, sizeof(msg)); | ||
326 | INIT_LIST_HEAD(&msg->list); | 310 | INIT_LIST_HEAD(&msg->list); |
327 | msg->type = BFIN_IPI_CPU_STOP; | 311 | msg->type = BFIN_IPI_CPU_STOP; |
328 | 312 | ||
@@ -352,13 +336,6 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
352 | 336 | ||
353 | ret = platform_boot_secondary(cpu, idle); | 337 | ret = platform_boot_secondary(cpu, idle); |
354 | 338 | ||
355 | if (ret) { | ||
356 | cpu_clear(cpu, cpu_present_map); | ||
357 | printk(KERN_CRIT "CPU%u: processor failed to boot (%d)\n", cpu, ret); | ||
358 | free_task(idle); | ||
359 | } else | ||
360 | cpu_set(cpu, cpu_online_map); | ||
361 | |||
362 | secondary_stack = NULL; | 339 | secondary_stack = NULL; |
363 | 340 | ||
364 | return ret; | 341 | return ret; |
@@ -434,9 +411,16 @@ void __cpuinit secondary_start_kernel(void) | |||
434 | 411 | ||
435 | setup_secondary(cpu); | 412 | setup_secondary(cpu); |
436 | 413 | ||
414 | platform_secondary_init(cpu); | ||
415 | |||
437 | local_irq_enable(); | 416 | local_irq_enable(); |
438 | 417 | ||
439 | platform_secondary_init(cpu); | 418 | /* |
419 | * Calibrate loops per jiffy value. | ||
420 | * IRQs need to be enabled here - D-cache can be invalidated | ||
421 | * in timer irq handler, so core B can read correct jiffies. | ||
422 | */ | ||
423 | calibrate_delay(); | ||
440 | 424 | ||
441 | cpu_idle(); | 425 | cpu_idle(); |
442 | } | 426 | } |