diff options
| -rw-r--r-- | arch/arm/mach-shmobile/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-bonito.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-g3evm.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-g4evm.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-kota2.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/common.c | 24 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/cpuidle.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 14 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/suspend.c | 3 |
13 files changed, 49 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index e7c2590b75d9..93d62fb215b7 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | # Common objects | 5 | # Common objects |
| 6 | obj-y := timer.o console.o clock.o | 6 | obj-y := timer.o console.o clock.o common.o |
| 7 | 7 | ||
| 8 | # CPU objects | 8 | # CPU objects |
| 9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o | 9 | obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index cb224a344af0..a99e7e617268 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
| @@ -598,5 +598,6 @@ MACHINE_START(AG5EVM, "ag5evm") | |||
| 598 | .init_irq = sh73a0_init_irq, | 598 | .init_irq = sh73a0_init_irq, |
| 599 | .handle_irq = gic_handle_irq, | 599 | .handle_irq = gic_handle_irq, |
| 600 | .init_machine = ag5evm_init, | 600 | .init_machine = ag5evm_init, |
| 601 | .init_late = shmobile_init_late, | ||
| 601 | .timer = &shmobile_timer, | 602 | .timer = &shmobile_timer, |
| 602 | MACHINE_END | 603 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index b56dde2732bb..522866d0cf7e 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
| @@ -1440,5 +1440,6 @@ MACHINE_START(AP4EVB, "ap4evb") | |||
| 1440 | .init_irq = sh7372_init_irq, | 1440 | .init_irq = sh7372_init_irq, |
| 1441 | .handle_irq = shmobile_handle_irq_intc, | 1441 | .handle_irq = shmobile_handle_irq_intc, |
| 1442 | .init_machine = ap4evb_init, | 1442 | .init_machine = ap4evb_init, |
| 1443 | .init_late = shmobile_init_late, | ||
| 1443 | .timer = &shmobile_timer, | 1444 | .timer = &shmobile_timer, |
| 1444 | MACHINE_END | 1445 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c index 81fd95f7f52a..e6b1fd38e72f 100644 --- a/arch/arm/mach-shmobile/board-bonito.c +++ b/arch/arm/mach-shmobile/board-bonito.c | |||
| @@ -500,5 +500,6 @@ MACHINE_START(BONITO, "bonito") | |||
| 500 | .init_irq = r8a7740_init_irq, | 500 | .init_irq = r8a7740_init_irq, |
| 501 | .handle_irq = shmobile_handle_irq_intc, | 501 | .handle_irq = shmobile_handle_irq_intc, |
| 502 | .init_machine = bonito_init, | 502 | .init_machine = bonito_init, |
| 503 | .init_late = shmobile_init_late, | ||
| 503 | .timer = &shmobile_timer, | 504 | .timer = &shmobile_timer, |
| 504 | MACHINE_END | 505 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 39b6cf85ced6..796fa00ad3c4 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c | |||
| @@ -338,5 +338,6 @@ MACHINE_START(G3EVM, "g3evm") | |||
| 338 | .init_irq = sh7367_init_irq, | 338 | .init_irq = sh7367_init_irq, |
| 339 | .handle_irq = shmobile_handle_irq_intc, | 339 | .handle_irq = shmobile_handle_irq_intc, |
| 340 | .init_machine = g3evm_init, | 340 | .init_machine = g3evm_init, |
| 341 | .init_late = shmobile_init_late, | ||
| 341 | .timer = &shmobile_timer, | 342 | .timer = &shmobile_timer, |
| 342 | MACHINE_END | 343 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index 0e5a39c670bc..f1257321999a 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c | |||
| @@ -381,5 +381,6 @@ MACHINE_START(G4EVM, "g4evm") | |||
| 381 | .init_irq = sh7377_init_irq, | 381 | .init_irq = sh7377_init_irq, |
| 382 | .handle_irq = shmobile_handle_irq_intc, | 382 | .handle_irq = shmobile_handle_irq_intc, |
| 383 | .init_machine = g4evm_init, | 383 | .init_machine = g4evm_init, |
| 384 | .init_late = shmobile_init_late, | ||
| 384 | .timer = &shmobile_timer, | 385 | .timer = &shmobile_timer, |
| 385 | MACHINE_END | 386 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index 200dcd42a3a0..f60f1b281cc4 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
| @@ -521,5 +521,6 @@ MACHINE_START(KOTA2, "kota2") | |||
| 521 | .init_irq = sh73a0_init_irq, | 521 | .init_irq = sh73a0_init_irq, |
| 522 | .handle_irq = gic_handle_irq, | 522 | .handle_irq = gic_handle_irq, |
| 523 | .init_machine = kota2_init, | 523 | .init_machine = kota2_init, |
| 524 | .init_late = shmobile_init_late, | ||
| 524 | .timer = &shmobile_timer, | 525 | .timer = &shmobile_timer, |
| 525 | MACHINE_END | 526 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index f49e28abe0ab..4cd438f948a8 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
| @@ -1623,5 +1623,6 @@ MACHINE_START(MACKEREL, "mackerel") | |||
| 1623 | .init_irq = sh7372_init_irq, | 1623 | .init_irq = sh7372_init_irq, |
| 1624 | .handle_irq = shmobile_handle_irq_intc, | 1624 | .handle_irq = shmobile_handle_irq_intc, |
| 1625 | .init_machine = mackerel_init, | 1625 | .init_machine = mackerel_init, |
| 1626 | .init_late = shmobile_init_late, | ||
| 1626 | .timer = &shmobile_timer, | 1627 | .timer = &shmobile_timer, |
| 1627 | MACHINE_END | 1628 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index ef0e13bf0b3a..14de3787cafc 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
| @@ -98,5 +98,6 @@ MACHINE_START(MARZEN, "marzen") | |||
| 98 | .init_irq = r8a7779_init_irq, | 98 | .init_irq = r8a7779_init_irq, |
| 99 | .handle_irq = gic_handle_irq, | 99 | .handle_irq = gic_handle_irq, |
| 100 | .init_machine = marzen_init, | 100 | .init_machine = marzen_init, |
| 101 | .init_late = shmobile_init_late, | ||
| 101 | .timer = &shmobile_timer, | 102 | .timer = &shmobile_timer, |
| 102 | MACHINE_END | 103 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/common.c b/arch/arm/mach-shmobile/common.c new file mode 100644 index 000000000000..608aba9d60d7 --- /dev/null +++ b/arch/arm/mach-shmobile/common.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License as published by | ||
| 4 | * the Free Software Foundation; version 2 of the License. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, | ||
| 7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 9 | * GNU General Public License for more details. | ||
| 10 | * | ||
| 11 | * You should have received a copy of the GNU General Public License | ||
| 12 | * along with this program; if not, write to the Free Software | ||
| 13 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 14 | * | ||
| 15 | */ | ||
| 16 | #include <linux/kernel.h> | ||
| 17 | #include <linux/init.h> | ||
| 18 | #include <mach/common.h> | ||
| 19 | |||
| 20 | void __init shmobile_init_late(void) | ||
| 21 | { | ||
| 22 | shmobile_suspend_init(); | ||
| 23 | shmobile_cpuidle_init(); | ||
| 24 | } | ||
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 7e6559105d40..7b541e911ab4 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c | |||
| @@ -46,7 +46,7 @@ static struct cpuidle_driver shmobile_cpuidle_driver = { | |||
| 46 | 46 | ||
| 47 | void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); | 47 | void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); |
| 48 | 48 | ||
| 49 | static int shmobile_cpuidle_init(void) | 49 | int shmobile_cpuidle_init(void) |
| 50 | { | 50 | { |
| 51 | struct cpuidle_device *dev = &shmobile_cpuidle_dev; | 51 | struct cpuidle_device *dev = &shmobile_cpuidle_dev; |
| 52 | struct cpuidle_driver *drv = &shmobile_cpuidle_driver; | 52 | struct cpuidle_driver *drv = &shmobile_cpuidle_driver; |
| @@ -65,4 +65,3 @@ static int shmobile_cpuidle_init(void) | |||
| 65 | 65 | ||
| 66 | return 0; | 66 | return 0; |
| 67 | } | 67 | } |
| 68 | late_initcall(shmobile_cpuidle_init); | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 83ad3fe0a75f..2a527c4de36c 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
| @@ -83,4 +83,18 @@ extern void r8a7779_secondary_init(unsigned int cpu); | |||
| 83 | extern int r8a7779_boot_secondary(unsigned int cpu); | 83 | extern int r8a7779_boot_secondary(unsigned int cpu); |
| 84 | extern void r8a7779_smp_prepare_cpus(void); | 84 | extern void r8a7779_smp_prepare_cpus(void); |
| 85 | 85 | ||
| 86 | extern void shmobile_init_late(void); | ||
| 87 | |||
| 88 | #ifdef CONFIG_SUSPEND | ||
| 89 | int shmobile_suspend_init(void); | ||
| 90 | #else | ||
| 91 | static inline int shmobile_suspend_init(void) { return 0; } | ||
| 92 | #endif | ||
| 93 | |||
| 94 | #ifdef CONFIG_CPU_IDLE | ||
| 95 | int shmobile_cpuidle_init(void); | ||
| 96 | #else | ||
| 97 | static inline int shmobile_cpuidle_init(void) { return 0; } | ||
| 98 | #endif | ||
| 99 | |||
| 86 | #endif /* __ARCH_MACH_COMMON_H */ | 100 | #endif /* __ARCH_MACH_COMMON_H */ |
diff --git a/arch/arm/mach-shmobile/suspend.c b/arch/arm/mach-shmobile/suspend.c index 4d1b86a49923..47d83f7a70b6 100644 --- a/arch/arm/mach-shmobile/suspend.c +++ b/arch/arm/mach-shmobile/suspend.c | |||
| @@ -39,9 +39,8 @@ struct platform_suspend_ops shmobile_suspend_ops = { | |||
| 39 | .valid = suspend_valid_only_mem, | 39 | .valid = suspend_valid_only_mem, |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | static int __init shmobile_suspend_init(void) | 42 | int __init shmobile_suspend_init(void) |
| 43 | { | 43 | { |
| 44 | suspend_set_ops(&shmobile_suspend_ops); | 44 | suspend_set_ops(&shmobile_suspend_ops); |
| 45 | return 0; | 45 | return 0; |
| 46 | } | 46 | } |
| 47 | late_initcall(shmobile_suspend_init); | ||
