exynos-pmu.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef __EXYNOS_PMU_H
  9. #define __EXYNOS_PMU_H
  10. #include <linux/io.h>
  11. #define PMU_TABLE_END (-1U)
  12. struct exynos_pmu_conf {
  13. unsigned int offset;
  14. u8 val[NUM_SYS_POWERDOWN];
  15. };
  16. struct exynos_pmu_data {
  17. const struct exynos_pmu_conf *pmu_config;
  18. void (*pmu_init)(void);
  19. void (*powerdown_conf)(enum sys_powerdown);
  20. void (*powerdown_conf_extra)(enum sys_powerdown);
  21. };
  22. extern void __iomem *pmu_base_addr;
  23. #ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS
  24. /* list of all exported SoC specific data */
  25. extern const struct exynos_pmu_data exynos3250_pmu_data;
  26. extern const struct exynos_pmu_data exynos4210_pmu_data;
  27. extern const struct exynos_pmu_data exynos4412_pmu_data;
  28. extern const struct exynos_pmu_data exynos5250_pmu_data;
  29. extern const struct exynos_pmu_data exynos5420_pmu_data;
  30. #endif
  31. extern void pmu_raw_writel(u32 val, u32 offset);
  32. extern u32 pmu_raw_readl(u32 offset);
  33. #endif /* __EXYNOS_PMU_H */