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