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); |
Magnus Damm | c39dae3 | 2014-03-06 12:28:24 +0900 | [diff] [blame] | 7 | extern void shmobile_init_delay(void); |
Marc Zyngier | 4200b16 | 2012-01-10 19:44:19 +0000 | [diff] [blame] | 8 | struct twd_local_timer; |
Magnus Damm | 4ae04ac | 2010-02-08 11:02:54 +0000 | [diff] [blame] | 9 | extern void shmobile_setup_console(void); |
Magnus Damm | ebe72ab | 2013-06-10 18:19:36 +0900 | [diff] [blame] | 10 | extern void shmobile_boot_vector(void); |
| 11 | extern unsigned long shmobile_boot_fn; |
| 12 | extern unsigned long shmobile_boot_arg; |
Magnus Damm | a84a5ab | 2013-08-08 07:14:07 +0900 | [diff] [blame] | 13 | extern unsigned long shmobile_boot_size; |
Magnus Damm | cc61591 | 2013-08-01 03:38:18 +0900 | [diff] [blame] | 14 | extern void shmobile_smp_boot(void); |
| 15 | extern void shmobile_smp_sleep(void); |
| 16 | extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn, |
| 17 | unsigned long arg); |
Magnus Damm | 5c4dfcd | 2013-08-08 07:13:30 +0900 | [diff] [blame] | 18 | extern int shmobile_smp_cpu_disable(unsigned int cpu); |
Magnus Damm | 87a08ca | 2013-08-08 07:13:58 +0900 | [diff] [blame] | 19 | extern void shmobile_invalidate_start(void); |
Magnus Damm | bfabbcc | 2013-06-10 18:19:46 +0900 | [diff] [blame] | 20 | extern void shmobile_boot_scu(void); |
Magnus Damm | c970d4e | 2013-07-31 16:07:12 +0900 | [diff] [blame] | 21 | extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); |
Magnus Damm | e7b1c96 | 2013-07-31 16:07:49 +0900 | [diff] [blame] | 22 | extern void shmobile_smp_scu_cpu_die(unsigned int cpu); |
| 23 | extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); |
Magnus Damm | a112de8 | 2013-08-29 08:21:58 +0900 | [diff] [blame] | 24 | extern void shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus); |
| 25 | extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu, |
| 26 | struct task_struct *idle); |
| 27 | extern void shmobile_smp_apmu_cpu_die(unsigned int cpu); |
| 28 | extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu); |
Magnus Damm | 83ca5c8 | 2010-05-20 14:45:03 +0000 | [diff] [blame] | 29 | struct clk; |
Magnus Damm | 6b6a4c0 | 2012-02-29 21:41:30 +0900 | [diff] [blame] | 30 | extern int shmobile_clk_init(void); |
Magnus Damm | 863b171 | 2010-12-28 08:27:01 +0000 | [diff] [blame] | 31 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
Magnus Damm | c3dada1 | 2011-04-29 02:23:28 +0900 | [diff] [blame] | 32 | extern struct platform_suspend_ops shmobile_suspend_ops; |
Magnus Damm | b73b5c4 | 2011-11-11 14:01:30 +0900 | [diff] [blame] | 33 | struct cpuidle_driver; |
Rafael J. Wysocki | 5b41147 | 2012-08-15 20:58:19 +0200 | [diff] [blame] | 34 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); |
Magnus Damm | e47bb51 | 2010-05-12 14:21:24 +0000 | [diff] [blame] | 35 | |
Shawn Guo | 21cc1b7 | 2012-04-26 21:58:41 +0800 | [diff] [blame] | 36 | #ifdef CONFIG_SUSPEND |
| 37 | int shmobile_suspend_init(void); |
| 38 | #else |
| 39 | static inline int shmobile_suspend_init(void) { return 0; } |
| 40 | #endif |
| 41 | |
| 42 | #ifdef CONFIG_CPU_IDLE |
| 43 | int shmobile_cpuidle_init(void); |
| 44 | #else |
| 45 | static inline int shmobile_cpuidle_init(void) { return 0; } |
| 46 | #endif |
| 47 | |
Gaku Inami | 06e32c9 | 2014-06-03 21:02:45 +0900 | [diff] [blame^] | 48 | #ifdef CONFIG_CPU_FREQ |
| 49 | int shmobile_cpufreq_init(void); |
| 50 | #else |
| 51 | static inline int shmobile_cpufreq_init(void) { return 0; } |
| 52 | #endif |
| 53 | |
Magnus Damm | 4c82284 | 2013-02-13 22:47:17 +0900 | [diff] [blame] | 54 | extern void __iomem *shmobile_scu_base; |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 55 | |
Arnd Bergmann | b3796d9 | 2012-09-23 22:36:35 +0000 | [diff] [blame] | 56 | static inline void __init shmobile_init_late(void) |
Rafael J. Wysocki | 35f2b0b | 2012-08-15 20:57:27 +0200 | [diff] [blame] | 57 | { |
| 58 | shmobile_suspend_init(); |
| 59 | shmobile_cpuidle_init(); |
Gaku Inami | 06e32c9 | 2014-06-03 21:02:45 +0900 | [diff] [blame^] | 60 | shmobile_cpufreq_init(); |
Rafael J. Wysocki | 35f2b0b | 2012-08-15 20:57:27 +0200 | [diff] [blame] | 61 | } |
| 62 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 63 | #endif /* __ARCH_MACH_COMMON_H */ |