blob: 1e811999557d84e25340b91902d24e626a3e2989 [file] [log] [blame]
Magnus Dammc793c1b2010-02-05 11:14:49 +00001#ifndef __ARCH_MACH_COMMON_H
2#define __ARCH_MACH_COMMON_H
3
Magnus Damm08ad42f2012-03-06 17:36:14 +09004extern void shmobile_earlytimer_init(void);
Magnus Damm0f2c9f22012-03-28 19:22:30 +09005extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
Marc Zyngiera62580e2011-09-08 13:15:22 +01006 unsigned int mult, unsigned int div);
Magnus Dammc39dae32014-03-06 12:28:24 +09007extern void shmobile_init_delay(void);
Marc Zyngier4200b162012-01-10 19:44:19 +00008struct twd_local_timer;
Magnus Damm4ae04ac2010-02-08 11:02:54 +00009extern void shmobile_setup_console(void);
Magnus Dammebe72ab2013-06-10 18:19:36 +090010extern void shmobile_boot_vector(void);
11extern unsigned long shmobile_boot_fn;
12extern unsigned long shmobile_boot_arg;
Magnus Damma84a5ab2013-08-08 07:14:07 +090013extern unsigned long shmobile_boot_size;
Magnus Dammcc615912013-08-01 03:38:18 +090014extern void shmobile_smp_boot(void);
15extern void shmobile_smp_sleep(void);
16extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
17 unsigned long arg);
Magnus Damm5c4dfcd2013-08-08 07:13:30 +090018extern int shmobile_smp_cpu_disable(unsigned int cpu);
Magnus Damm87a08ca2013-08-08 07:13:58 +090019extern void shmobile_invalidate_start(void);
Magnus Dammbfabbcc2013-06-10 18:19:46 +090020extern void shmobile_boot_scu(void);
Magnus Dammc970d4e2013-07-31 16:07:12 +090021extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);
Magnus Damme7b1c962013-07-31 16:07:49 +090022extern void shmobile_smp_scu_cpu_die(unsigned int cpu);
23extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
Magnus Damma112de82013-08-29 08:21:58 +090024extern void shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus);
25extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
26 struct task_struct *idle);
27extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
28extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
Magnus Damm83ca5c82010-05-20 14:45:03 +000029struct clk;
Magnus Damm6b6a4c02012-02-29 21:41:30 +090030extern int shmobile_clk_init(void);
Magnus Damm863b1712010-12-28 08:27:01 +000031extern void shmobile_handle_irq_intc(struct pt_regs *);
Magnus Dammc3dada12011-04-29 02:23:28 +090032extern struct platform_suspend_ops shmobile_suspend_ops;
Magnus Dammb73b5c42011-11-11 14:01:30 +090033struct cpuidle_driver;
Rafael J. Wysocki5b411472012-08-15 20:58:19 +020034extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
Magnus Damme47bb512010-05-12 14:21:24 +000035
Shawn Guo21cc1b72012-04-26 21:58:41 +080036#ifdef CONFIG_SUSPEND
37int shmobile_suspend_init(void);
keita kobayashid6d757c2014-05-29 16:24:27 +090038void shmobile_smp_apmu_suspend_init(void);
Shawn Guo21cc1b72012-04-26 21:58:41 +080039#else
40static inline int shmobile_suspend_init(void) { return 0; }
Simon Hormanecdaca42014-06-16 20:21:13 +090041static inline void shmobile_smp_apmu_suspend_init(void) { }
Shawn Guo21cc1b72012-04-26 21:58:41 +080042#endif
43
44#ifdef CONFIG_CPU_IDLE
45int shmobile_cpuidle_init(void);
46#else
47static inline int shmobile_cpuidle_init(void) { return 0; }
48#endif
49
Magnus Damm4c822842013-02-13 22:47:17 +090050extern void __iomem *shmobile_scu_base;
Marc Zyngiera62580e2011-09-08 13:15:22 +010051
Arnd Bergmannb3796d92012-09-23 22:36:35 +000052static inline void __init shmobile_init_late(void)
Rafael J. Wysocki35f2b0b2012-08-15 20:57:27 +020053{
54 shmobile_suspend_init();
55 shmobile_cpuidle_init();
56}
57
Magnus Dammc793c1b2010-02-05 11:14:49 +000058#endif /* __ARCH_MACH_COMMON_H */