blob: 5e851f32307e6c495d4c488db322e404cde3a1c2 [file] [log] [blame]
Krzysztof Kozlowski06512c52017-12-25 21:17:59 +01001/* SPDX-License-Identifier: GPL-2.0 */
Pankaj Dubeyc21100c2015-12-18 09:02:12 +05302/*
3 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
Krzysztof Kozlowski94500542020-01-04 16:20:52 +01006 * Header for Exynos PMU Driver support
Pankaj Dubeyc21100c2015-12-18 09:02:12 +05307 */
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
16struct exynos_pmu_conf {
17 unsigned int offset;
18 u8 val[NUM_SYS_POWERDOWN];
19};
20
21struct exynos_pmu_data {
22 const struct exynos_pmu_conf *pmu_config;
Pankaj Dubeyc21100c2015-12-18 09:02:12 +053023
24 void (*pmu_init)(void);
25 void (*powerdown_conf)(enum sys_powerdown);
26 void (*powerdown_conf_extra)(enum sys_powerdown);
27};
28
29extern void __iomem *pmu_base_addr;
Krzysztof Kozlowskia0ebf662017-03-14 19:10:27 +020030
31#ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS
Pankaj Dubeyc21100c2015-12-18 09:02:12 +053032/* list of all exported SoC specific data */
33extern const struct exynos_pmu_data exynos3250_pmu_data;
Pankaj Dubey73d72ed2015-12-18 09:02:13 +053034extern const struct exynos_pmu_data exynos4210_pmu_data;
Pankaj Dubey73d72ed2015-12-18 09:02:13 +053035extern const struct exynos_pmu_data exynos4412_pmu_data;
Pankaj Dubey3900d6a2015-12-18 09:02:14 +053036extern const struct exynos_pmu_data exynos5250_pmu_data;
Pankaj Dubey92c4bf02015-12-18 09:02:15 +053037extern const struct exynos_pmu_data exynos5420_pmu_data;
Krzysztof Kozlowskia0ebf662017-03-14 19:10:27 +020038#endif
Pankaj Dubeyc21100c2015-12-18 09:02:12 +053039
40extern void pmu_raw_writel(u32 val, u32 offset);
41extern u32 pmu_raw_readl(u32 offset);
42#endif /* __EXYNOS_PMU_H */