diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/Makefile | 6 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 29 | ||||
-rw-r--r-- | arch/sh/kernel/idle.c | 23 |
3 files changed, 34 insertions, 24 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile index 96ea09ca8cc1..ebdd391d5f42 100644 --- a/arch/sh/kernel/cpu/sh4a/Makefile +++ b/arch/sh/kernel/cpu/sh4a/Makefile | |||
@@ -16,7 +16,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7366) += setup-sh7366.o | |||
16 | obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o | 16 | obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o |
17 | 17 | ||
18 | # SMP setup | 18 | # SMP setup |
19 | smp-$(CONFIG_CPU_SUBTYPE_SHX3) := smp-shx3.o | 19 | smp-$(CONFIG_CPU_SHX3) := smp-shx3.o |
20 | 20 | ||
21 | # Primary on-chip clocks (common) | 21 | # Primary on-chip clocks (common) |
22 | clock-$(CONFIG_CPU_SUBTYPE_SH7763) := clock-sh7763.o | 22 | clock-$(CONFIG_CPU_SUBTYPE_SH7763) := clock-sh7763.o |
@@ -38,6 +38,6 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SH7724) := pinmux-sh7724.o | |||
38 | pinmux-$(CONFIG_CPU_SUBTYPE_SH7785) := pinmux-sh7785.o | 38 | pinmux-$(CONFIG_CPU_SUBTYPE_SH7785) := pinmux-sh7785.o |
39 | pinmux-$(CONFIG_CPU_SUBTYPE_SH7786) := pinmux-sh7786.o | 39 | pinmux-$(CONFIG_CPU_SUBTYPE_SH7786) := pinmux-sh7786.o |
40 | 40 | ||
41 | obj-y += $(clock-y) | 41 | obj-y += $(clock-y) |
42 | obj-$(CONFIG_SMP) += $(smp-y) | 42 | obj-$(CONFIG_SMP) += $(smp-y) |
43 | obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) | 43 | obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 93e0d2c017e8..b70049470a0b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
@@ -595,9 +595,8 @@ enum { | |||
595 | HSPI, | 595 | HSPI, |
596 | GPIO0, GPIO1, | 596 | GPIO0, GPIO1, |
597 | Thermal, | 597 | Thermal, |
598 | INTC0, INTC1, INTC2, INTC3, INTC4, INTC5, INTC6, INTC7, | 598 | INTICI0, INTICI1, INTICI2, INTICI3, |
599 | 599 | INTICI4, INTICI5, INTICI6, INTICI7, | |
600 | /* interrupt groups */ | ||
601 | }; | 600 | }; |
602 | 601 | ||
603 | static struct intc_vect vectors[] __initdata = { | 602 | static struct intc_vect vectors[] __initdata = { |
@@ -638,10 +637,12 @@ static struct intc_vect vectors[] __initdata = { | |||
638 | INTC_VECT(HSPI, 0xe80), | 637 | INTC_VECT(HSPI, 0xe80), |
639 | INTC_VECT(GPIO0, 0xea0), INTC_VECT(GPIO1, 0xec0), | 638 | INTC_VECT(GPIO0, 0xea0), INTC_VECT(GPIO1, 0xec0), |
640 | INTC_VECT(Thermal, 0xee0), | 639 | INTC_VECT(Thermal, 0xee0), |
640 | INTC_VECT(INTICI0, 0xf00), INTC_VECT(INTICI1, 0xf20), | ||
641 | INTC_VECT(INTICI2, 0xf40), INTC_VECT(INTICI3, 0xf60), | ||
642 | INTC_VECT(INTICI4, 0xf80), INTC_VECT(INTICI5, 0xfa0), | ||
643 | INTC_VECT(INTICI6, 0xfc0), INTC_VECT(INTICI7, 0xfe0), | ||
641 | }; | 644 | }; |
642 | 645 | ||
643 | /* FIXME: Main CPU support only now */ | ||
644 | #if 1 /* Main CPU */ | ||
645 | #define CnINTMSK0 0xfe410030 | 646 | #define CnINTMSK0 0xfe410030 |
646 | #define CnINTMSK1 0xfe410040 | 647 | #define CnINTMSK1 0xfe410040 |
647 | #define CnINTMSKCLR0 0xfe410050 | 648 | #define CnINTMSKCLR0 0xfe410050 |
@@ -654,21 +655,6 @@ static struct intc_vect vectors[] __initdata = { | |||
654 | #define CnINT2MSKCR1 0xfe410a34 | 655 | #define CnINT2MSKCR1 0xfe410a34 |
655 | #define CnINT2MSKCR2 0xfe410a38 | 656 | #define CnINT2MSKCR2 0xfe410a38 |
656 | #define CnINT2MSKCR3 0xfe410a3c | 657 | #define CnINT2MSKCR3 0xfe410a3c |
657 | #else /* Sub CPU */ | ||
658 | #define CnINTMSK0 0xfe410034 | ||
659 | #define CnINTMSK1 0xfe410044 | ||
660 | #define CnINTMSKCLR0 0xfe410054 | ||
661 | #define CnINTMSKCLR1 0xfe410064 | ||
662 | #define CnINT2MSKR0 0xfe410b20 | ||
663 | #define CnINT2MSKR1 0xfe410b24 | ||
664 | #define CnINT2MSKR2 0xfe410b28 | ||
665 | #define CnINT2MSKR3 0xfe410b2c | ||
666 | #define CnINT2MSKCR0 0xfe410b30 | ||
667 | #define CnINT2MSKCR1 0xfe410b34 | ||
668 | #define CnINT2MSKCR2 0xfe410b38 | ||
669 | #define CnINT2MSKCR3 0xfe410b3c | ||
670 | #endif | ||
671 | |||
672 | #define INTMSK2 0xfe410068 | 658 | #define INTMSK2 0xfe410068 |
673 | #define INTMSKCLR2 0xfe41006c | 659 | #define INTMSKCLR2 0xfe41006c |
674 | 660 | ||
@@ -753,6 +739,9 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
753 | GPIO1, Thermal } }, | 739 | GPIO1, Thermal } }, |
754 | { 0xfe41085c, 0, 32, 8, /* INT2PRI23 */ { 0, 0, 0, 0 } }, | 740 | { 0xfe41085c, 0, 32, 8, /* INT2PRI23 */ { 0, 0, 0, 0 } }, |
755 | { 0xfe410860, 0, 32, 8, /* INT2PRI24 */ { 0, 0, 0, 0 } }, | 741 | { 0xfe410860, 0, 32, 8, /* INT2PRI24 */ { 0, 0, 0, 0 } }, |
742 | { 0xfe410090, 0xfe4100a0, 32, 4, /* CnICIPRI / CnICIPRICLR */ | ||
743 | { INTICI7, INTICI6, INTICI5, INTICI4, | ||
744 | INTICI3, INTICI2, INTICI1, INTICI0 }, INTC_SMP(4, 2) }, | ||
756 | }; | 745 | }; |
757 | 746 | ||
758 | static DECLARE_INTC_DESC(intc_desc, "sh7786", vectors, NULL, | 747 | static DECLARE_INTC_DESC(intc_desc, "sh7786", vectors, NULL, |
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index f35ed0348850..27ff2dc093c7 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * The idle loop for all SuperH platforms. | 2 | * The idle loop for all SuperH platforms. |
3 | * | 3 | * |
4 | * Copyright (C) 2002 - 2008 Paul Mundt | 4 | * Copyright (C) 2002 - 2009 Paul Mundt |
5 | * | 5 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
7 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/preempt.h> | 15 | #include <linux/preempt.h> |
16 | #include <linux/thread_info.h> | 16 | #include <linux/thread_info.h> |
17 | #include <linux/irqflags.h> | 17 | #include <linux/irqflags.h> |
18 | #include <linux/smp.h> | ||
18 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
19 | #include <asm/system.h> | 20 | #include <asm/system.h> |
20 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
@@ -79,3 +80,23 @@ void cpu_idle(void) | |||
79 | check_pgt_cache(); | 80 | check_pgt_cache(); |
80 | } | 81 | } |
81 | } | 82 | } |
83 | |||
84 | static void do_nothing(void *unused) | ||
85 | { | ||
86 | } | ||
87 | |||
88 | /* | ||
89 | * cpu_idle_wait - Used to ensure that all the CPUs discard old value of | ||
90 | * pm_idle and update to new pm_idle value. Required while changing pm_idle | ||
91 | * handler on SMP systems. | ||
92 | * | ||
93 | * Caller must have changed pm_idle to the new value before the call. Old | ||
94 | * pm_idle value will not be used by any CPU after the return of this function. | ||
95 | */ | ||
96 | void cpu_idle_wait(void) | ||
97 | { | ||
98 | smp_mb(); | ||
99 | /* kick all the CPUs so that they exit out of pm_idle */ | ||
100 | smp_call_function(do_nothing, NULL, 1); | ||
101 | } | ||
102 | EXPORT_SYMBOL_GPL(cpu_idle_wait); | ||