xref: /linux/drivers/soc/samsung/exynos-pmu.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4  *		http://www.samsung.com
5  *
6  * Header for Exynos PMU Driver support
7  */
8 
9 #ifndef __EXYNOS_PMU_H
10 #define __EXYNOS_PMU_H
11 
12 #include <linux/io.h>
13 
14 #define PMU_TABLE_END	(-1U)
15 
16 struct exynos_pmu_conf {
17 	unsigned int offset;
18 	u8 val[NUM_SYS_POWERDOWN];
19 };
20 
21 struct exynos_pmu_data {
22 	const struct exynos_pmu_conf *pmu_config;
23 	const struct exynos_pmu_conf *pmu_config_extra;
24 	bool pmu_secure;
25 
26 	void (*pmu_init)(void);
27 	void (*powerdown_conf)(enum sys_powerdown);
28 	void (*powerdown_conf_extra)(enum sys_powerdown);
29 };
30 
31 extern void __iomem *pmu_base_addr;
32 
33 #ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS
34 /* list of all exported SoC specific data */
35 extern const struct exynos_pmu_data exynos3250_pmu_data;
36 extern const struct exynos_pmu_data exynos4210_pmu_data;
37 extern const struct exynos_pmu_data exynos4212_pmu_data;
38 extern const struct exynos_pmu_data exynos4412_pmu_data;
39 extern const struct exynos_pmu_data exynos5250_pmu_data;
40 extern const struct exynos_pmu_data exynos5420_pmu_data;
41 #endif
42 
43 extern void pmu_raw_writel(u32 val, u32 offset);
44 extern u32 pmu_raw_readl(u32 offset);
45 #endif /* __EXYNOS_PMU_H */
46