18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2015 Samsung Electronics Co., Ltd. 48c2ecf20Sopenharmony_ci * http://www.samsung.com 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Header for Exynos PMU Driver support 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __EXYNOS_PMU_H 108c2ecf20Sopenharmony_ci#define __EXYNOS_PMU_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/io.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define PMU_TABLE_END (-1U) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_cistruct exynos_pmu_conf { 178c2ecf20Sopenharmony_ci unsigned int offset; 188c2ecf20Sopenharmony_ci u8 val[NUM_SYS_POWERDOWN]; 198c2ecf20Sopenharmony_ci}; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistruct exynos_pmu_data { 228c2ecf20Sopenharmony_ci const struct exynos_pmu_conf *pmu_config; 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci void (*pmu_init)(void); 258c2ecf20Sopenharmony_ci void (*powerdown_conf)(enum sys_powerdown); 268c2ecf20Sopenharmony_ci void (*powerdown_conf_extra)(enum sys_powerdown); 278c2ecf20Sopenharmony_ci}; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciextern void __iomem *pmu_base_addr; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS 328c2ecf20Sopenharmony_ci/* list of all exported SoC specific data */ 338c2ecf20Sopenharmony_ciextern const struct exynos_pmu_data exynos3250_pmu_data; 348c2ecf20Sopenharmony_ciextern const struct exynos_pmu_data exynos4210_pmu_data; 358c2ecf20Sopenharmony_ciextern const struct exynos_pmu_data exynos4412_pmu_data; 368c2ecf20Sopenharmony_ciextern const struct exynos_pmu_data exynos5250_pmu_data; 378c2ecf20Sopenharmony_ciextern const struct exynos_pmu_data exynos5420_pmu_data; 388c2ecf20Sopenharmony_ci#endif 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ciextern void pmu_raw_writel(u32 val, u32 offset); 418c2ecf20Sopenharmony_ciextern u32 pmu_raw_readl(u32 offset); 428c2ecf20Sopenharmony_ci#endif /* __EXYNOS_PMU_H */ 43