Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 1 | #ifndef __ARCH_MACH_COMMON_H |
| 2 | #define __ARCH_MACH_COMMON_H |
| 3 | |
Magnus Damm | 08ad42f | 2012-03-06 17:36:14 +0900 | [diff] [blame] | 4 | extern void shmobile_earlytimer_init(void); |
Magnus Damm | 0f2c9f2 | 2012-03-28 19:22:30 +0900 | [diff] [blame] | 5 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 6 | unsigned int mult, unsigned int div); |
Marc Zyngier | 4200b16 | 2012-01-10 19:44:19 +0000 | [diff] [blame] | 7 | struct twd_local_timer; |
Magnus Damm | 4ae04ac | 2010-02-08 11:02:54 +0000 | [diff] [blame] | 8 | extern void shmobile_setup_console(void); |
Magnus Damm | ebe72ab | 2013-06-10 18:19:36 +0900 | [diff] [blame] | 9 | extern void shmobile_boot_vector(void); |
| 10 | extern unsigned long shmobile_boot_fn; |
| 11 | extern unsigned long shmobile_boot_arg; |
Magnus Damm | cc61591 | 2013-08-01 03:38:18 +0900 | [diff] [blame] | 12 | extern void shmobile_smp_boot(void); |
| 13 | extern void shmobile_smp_sleep(void); |
| 14 | extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn, |
| 15 | unsigned long arg); |
Magnus Damm | 5c4dfcd | 2013-08-08 07:13:30 +0900 | [diff] [blame^] | 16 | extern int shmobile_smp_cpu_disable(unsigned int cpu); |
Magnus Damm | bfabbcc | 2013-06-10 18:19:46 +0900 | [diff] [blame] | 17 | extern void shmobile_boot_scu(void); |
Magnus Damm | c970d4e | 2013-07-31 16:07:12 +0900 | [diff] [blame] | 18 | extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); |
| 19 | extern int shmobile_smp_scu_boot_secondary(unsigned int cpu, |
| 20 | struct task_struct *idle); |
Magnus Damm | e7b1c96 | 2013-07-31 16:07:49 +0900 | [diff] [blame] | 21 | extern void shmobile_smp_scu_cpu_die(unsigned int cpu); |
| 22 | extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); |
Magnus Damm | 83ca5c8 | 2010-05-20 14:45:03 +0000 | [diff] [blame] | 23 | struct clk; |
Magnus Damm | 6b6a4c0 | 2012-02-29 21:41:30 +0900 | [diff] [blame] | 24 | extern int shmobile_clk_init(void); |
Magnus Damm | 863b171 | 2010-12-28 08:27:01 +0000 | [diff] [blame] | 25 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
Magnus Damm | c3dada1 | 2011-04-29 02:23:28 +0900 | [diff] [blame] | 26 | extern struct platform_suspend_ops shmobile_suspend_ops; |
Magnus Damm | b73b5c4 | 2011-11-11 14:01:30 +0900 | [diff] [blame] | 27 | struct cpuidle_driver; |
Rafael J. Wysocki | 5b41147 | 2012-08-15 20:58:19 +0200 | [diff] [blame] | 28 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); |
Magnus Damm | e47bb51 | 2010-05-12 14:21:24 +0000 | [diff] [blame] | 29 | |
Shawn Guo | 21cc1b7 | 2012-04-26 21:58:41 +0800 | [diff] [blame] | 30 | #ifdef CONFIG_SUSPEND |
| 31 | int shmobile_suspend_init(void); |
| 32 | #else |
| 33 | static inline int shmobile_suspend_init(void) { return 0; } |
| 34 | #endif |
| 35 | |
| 36 | #ifdef CONFIG_CPU_IDLE |
| 37 | int shmobile_cpuidle_init(void); |
| 38 | #else |
| 39 | static inline int shmobile_cpuidle_init(void) { return 0; } |
| 40 | #endif |
| 41 | |
Magnus Damm | 4c82284 | 2013-02-13 22:47:17 +0900 | [diff] [blame] | 42 | extern void __iomem *shmobile_scu_base; |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 43 | extern void shmobile_smp_init_cpus(unsigned int ncores); |
| 44 | |
Arnd Bergmann | b3796d9 | 2012-09-23 22:36:35 +0000 | [diff] [blame] | 45 | static inline void __init shmobile_init_late(void) |
Rafael J. Wysocki | 35f2b0b | 2012-08-15 20:57:27 +0200 | [diff] [blame] | 46 | { |
| 47 | shmobile_suspend_init(); |
| 48 | shmobile_cpuidle_init(); |
| 49 | } |
| 50 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 51 | #endif /* __ARCH_MACH_COMMON_H */ |