1 #ifndef __ARCH_MACH_COMMON_H 2 #define __ARCH_MACH_COMMON_H 3 4 extern void shmobile_earlytimer_init(void); 5 extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, 6 unsigned int mult, unsigned int div); 7 extern void shmobile_init_delay(void); 8 struct twd_local_timer; 9 extern void shmobile_setup_console(void); 10 extern void shmobile_boot_vector(void); 11 extern unsigned long shmobile_boot_fn; 12 extern unsigned long shmobile_boot_arg; 13 extern unsigned long shmobile_boot_size; 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); 18 extern int shmobile_smp_cpu_disable(unsigned int cpu); 19 extern void shmobile_invalidate_start(void); 20 extern void shmobile_boot_scu(void); 21 extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); 22 extern void shmobile_smp_scu_cpu_die(unsigned int cpu); 23 extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); 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); 29 struct clk; 30 extern int shmobile_clk_init(void); 31 extern void shmobile_handle_irq_intc(struct pt_regs *); 32 extern struct platform_suspend_ops shmobile_suspend_ops; 33 struct cpuidle_driver; 34 extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); 35 36 #ifdef CONFIG_SUSPEND 37 int shmobile_suspend_init(void); 38 void shmobile_smp_apmu_suspend_init(void); 39 #else 40 static inline int shmobile_suspend_init(void) { return 0; } 41 static inline void shmobile_smp_apmu_suspend_init(void) { } 42 #endif 43 44 #ifdef CONFIG_CPU_IDLE 45 int shmobile_cpuidle_init(void); 46 #else 47 static inline int shmobile_cpuidle_init(void) { return 0; } 48 #endif 49 50 #ifdef CONFIG_CPU_FREQ 51 int shmobile_cpufreq_init(void); 52 #else 53 static inline int shmobile_cpufreq_init(void) { return 0; } 54 #endif 55 56 extern void __iomem *shmobile_scu_base; 57 58 static inline void __init shmobile_init_late(void) 59 { 60 shmobile_suspend_init(); 61 shmobile_cpuidle_init(); 62 shmobile_cpufreq_init(); 63 } 64 65 #endif /* __ARCH_MACH_COMMON_H */ 66