exynos-pmu.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  3. * http://www.samsung.com
  4. *
  5. * Header for EXYNOS PMU Driver support
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef __EXYNOS_PMU_H
  12. #define __EXYNOS_PMU_H
  13. #include <linux/io.h>
  14. #define PMU_TABLE_END (-1U)
  15. struct exynos_pmu_conf {
  16. unsigned int offset;
  17. u8 val[NUM_SYS_POWERDOWN];
  18. };
  19. struct exynos_pmu_data {
  20. const struct exynos_pmu_conf *pmu_config;
  21. const struct exynos_pmu_conf *pmu_config_extra;
  22. void (*pmu_init)(void);
  23. void (*powerdown_conf)(enum sys_powerdown);
  24. void (*powerdown_conf_extra)(enum sys_powerdown);
  25. };
  26. extern void __iomem *pmu_base_addr;
  27. /* list of all exported SoC specific data */
  28. extern const struct exynos_pmu_data exynos3250_pmu_data;
  29. extern const struct exynos_pmu_data exynos4210_pmu_data;
  30. extern const struct exynos_pmu_data exynos4212_pmu_data;
  31. extern const struct exynos_pmu_data exynos4412_pmu_data;
  32. extern const struct exynos_pmu_data exynos5250_pmu_data;
  33. extern const struct exynos_pmu_data exynos5420_pmu_data;
  34. extern void pmu_raw_writel(u32 val, u32 offset);
  35. extern u32 pmu_raw_readl(u32 offset);
  36. #endif /* __EXYNOS_PMU_H */