xref: /OK3568_Linux_fs/kernel/arch/arm/mach-shmobile/common.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __ARCH_MACH_COMMON_H
3*4882a593Smuzhiyun #define __ARCH_MACH_COMMON_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun extern void shmobile_init_delay(void);
6*4882a593Smuzhiyun extern void shmobile_boot_vector(void);
7*4882a593Smuzhiyun extern unsigned long shmobile_boot_fn;
8*4882a593Smuzhiyun extern unsigned long shmobile_boot_size;
9*4882a593Smuzhiyun extern void shmobile_boot_vector_gen2(void);
10*4882a593Smuzhiyun extern unsigned long shmobile_boot_fn_gen2;
11*4882a593Smuzhiyun extern unsigned long shmobile_boot_cpu_gen2;
12*4882a593Smuzhiyun extern unsigned long shmobile_boot_size_gen2;
13*4882a593Smuzhiyun extern void shmobile_smp_boot(void);
14*4882a593Smuzhiyun extern void shmobile_smp_sleep(void);
15*4882a593Smuzhiyun extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
16*4882a593Smuzhiyun 			      unsigned long arg);
17*4882a593Smuzhiyun extern bool shmobile_smp_cpu_can_disable(unsigned int cpu);
18*4882a593Smuzhiyun extern void shmobile_boot_apmu(void);
19*4882a593Smuzhiyun extern void shmobile_boot_scu(void);
20*4882a593Smuzhiyun extern void shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
21*4882a593Smuzhiyun 					  unsigned int max_cpus);
22*4882a593Smuzhiyun extern void shmobile_smp_scu_cpu_die(unsigned int cpu);
23*4882a593Smuzhiyun extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
24*4882a593Smuzhiyun extern struct platform_suspend_ops shmobile_suspend_ops;
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #ifdef CONFIG_SUSPEND
27*4882a593Smuzhiyun int shmobile_suspend_init(void);
28*4882a593Smuzhiyun void shmobile_smp_apmu_suspend_init(void);
29*4882a593Smuzhiyun #else
shmobile_suspend_init(void)30*4882a593Smuzhiyun static inline int shmobile_suspend_init(void) { return 0; }
shmobile_smp_apmu_suspend_init(void)31*4882a593Smuzhiyun static inline void shmobile_smp_apmu_suspend_init(void) { }
32*4882a593Smuzhiyun #endif
33*4882a593Smuzhiyun 
shmobile_init_late(void)34*4882a593Smuzhiyun static inline void __init shmobile_init_late(void)
35*4882a593Smuzhiyun {
36*4882a593Smuzhiyun 	shmobile_suspend_init();
37*4882a593Smuzhiyun }
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun #endif /* __ARCH_MACH_COMMON_H */
40