1 /* 2 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * http://www.samsung.com 4 * 5 * Common Header for EXYNOS machines 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 */ 11 12 #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H 13 #define __ARCH_ARM_MACH_EXYNOS_COMMON_H 14 15 #include <linux/of.h> 16 17 extern void mct_init(void); 18 void exynos_init_time(void); 19 20 struct map_desc; 21 void exynos_init_io(struct map_desc *mach_desc, int size); 22 void exynos4_init_irq(void); 23 void exynos5_init_irq(void); 24 void exynos4_restart(char mode, const char *cmd); 25 void exynos5_restart(char mode, const char *cmd); 26 void exynos_init_late(void); 27 28 /* ToDo: remove these after migrating legacy exynos4 platforms to dt */ 29 void exynos4_clk_init(struct device_node *np); 30 void exynos4_clk_register_fixed_ext(unsigned long, unsigned long); 31 32 #ifdef CONFIG_PM_GENERIC_DOMAINS 33 int exynos_pm_late_initcall(void); 34 #else 35 static inline int exynos_pm_late_initcall(void) { return 0; } 36 #endif 37 38 #ifdef CONFIG_ARCH_EXYNOS4 39 void exynos4_register_clocks(void); 40 void exynos4_setup_clocks(void); 41 42 #else 43 #define exynos4_register_clocks() 44 #define exynos4_setup_clocks() 45 #endif 46 47 #ifdef CONFIG_ARCH_EXYNOS5 48 void exynos5_register_clocks(void); 49 void exynos5_setup_clocks(void); 50 51 #else 52 #define exynos5_register_clocks() 53 #define exynos5_setup_clocks() 54 #endif 55 56 #ifdef CONFIG_CPU_EXYNOS4210 57 void exynos4210_register_clocks(void); 58 59 #else 60 #define exynos4210_register_clocks() 61 #endif 62 63 #ifdef CONFIG_SOC_EXYNOS4212 64 void exynos4212_register_clocks(void); 65 66 #else 67 #define exynos4212_register_clocks() 68 #endif 69 70 struct device_node; 71 void combiner_init(void __iomem *combiner_base, struct device_node *np); 72 73 extern struct smp_operations exynos_smp_ops; 74 75 extern void exynos_cpu_die(unsigned int cpu); 76 77 /* PMU(Power Management Unit) support */ 78 79 #define PMU_TABLE_END NULL 80 81 enum sys_powerdown { 82 SYS_AFTR, 83 SYS_LPA, 84 SYS_SLEEP, 85 NUM_SYS_POWERDOWN, 86 }; 87 88 extern unsigned long l2x0_regs_phys; 89 struct exynos_pmu_conf { 90 void __iomem *reg; 91 unsigned int val[NUM_SYS_POWERDOWN]; 92 }; 93 94 extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); 95 extern void s3c_cpu_resume(void); 96 97 #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 98