18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ARCH_MACH_COMMON_H
38c2ecf20Sopenharmony_ci#define __ARCH_MACH_COMMON_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciextern void shmobile_init_delay(void);
68c2ecf20Sopenharmony_ciextern void shmobile_boot_vector(void);
78c2ecf20Sopenharmony_ciextern unsigned long shmobile_boot_fn;
88c2ecf20Sopenharmony_ciextern unsigned long shmobile_boot_size;
98c2ecf20Sopenharmony_ciextern void shmobile_boot_vector_gen2(void);
108c2ecf20Sopenharmony_ciextern unsigned long shmobile_boot_fn_gen2;
118c2ecf20Sopenharmony_ciextern unsigned long shmobile_boot_cpu_gen2;
128c2ecf20Sopenharmony_ciextern unsigned long shmobile_boot_size_gen2;
138c2ecf20Sopenharmony_ciextern void shmobile_smp_boot(void);
148c2ecf20Sopenharmony_ciextern void shmobile_smp_sleep(void);
158c2ecf20Sopenharmony_ciextern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
168c2ecf20Sopenharmony_ci			      unsigned long arg);
178c2ecf20Sopenharmony_ciextern bool shmobile_smp_cpu_can_disable(unsigned int cpu);
188c2ecf20Sopenharmony_ciextern void shmobile_boot_apmu(void);
198c2ecf20Sopenharmony_ciextern void shmobile_boot_scu(void);
208c2ecf20Sopenharmony_ciextern void shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
218c2ecf20Sopenharmony_ci					  unsigned int max_cpus);
228c2ecf20Sopenharmony_ciextern void shmobile_smp_scu_cpu_die(unsigned int cpu);
238c2ecf20Sopenharmony_ciextern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
248c2ecf20Sopenharmony_ciextern struct platform_suspend_ops shmobile_suspend_ops;
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#ifdef CONFIG_SUSPEND
278c2ecf20Sopenharmony_ciint shmobile_suspend_init(void);
288c2ecf20Sopenharmony_civoid shmobile_smp_apmu_suspend_init(void);
298c2ecf20Sopenharmony_ci#else
308c2ecf20Sopenharmony_cistatic inline int shmobile_suspend_init(void) { return 0; }
318c2ecf20Sopenharmony_cistatic inline void shmobile_smp_apmu_suspend_init(void) { }
328c2ecf20Sopenharmony_ci#endif
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_cistatic inline void __init shmobile_init_late(void)
358c2ecf20Sopenharmony_ci{
368c2ecf20Sopenharmony_ci	shmobile_suspend_init();
378c2ecf20Sopenharmony_ci}
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci#endif /* __ARCH_MACH_COMMON_H */
40