rcar-sysc.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Renesas R-Car System Controller
  3. *
  4. * Copyright (C) 2016 Glider bvba
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; version 2 of the License.
  9. */
  10. #ifndef __SOC_RENESAS_RCAR_SYSC_H__
  11. #define __SOC_RENESAS_RCAR_SYSC_H__
  12. #include <linux/types.h>
  13. /*
  14. * Power Domain flags
  15. */
  16. #define PD_CPU BIT(0) /* Area contains main CPU core */
  17. #define PD_SCU BIT(1) /* Area contains SCU and L2 cache */
  18. #define PD_NO_CR BIT(2) /* Area lacks PWR{ON,OFF}CR registers */
  19. #define PD_BUSY BIT(3) /* Busy, for internal use only */
  20. #define PD_CPU_CR PD_CPU /* CPU area has CR (R-Car H1) */
  21. #define PD_CPU_NOCR PD_CPU | PD_NO_CR /* CPU area lacks CR (R-Car Gen2/3) */
  22. #define PD_ALWAYS_ON PD_NO_CR /* Always-on area */
  23. /*
  24. * Description of a Power Area
  25. */
  26. struct rcar_sysc_area {
  27. const char *name;
  28. u16 chan_offs; /* Offset of PWRSR register for this area */
  29. u8 chan_bit; /* Bit in PWR* (except for PWRUP in PWRSR) */
  30. u8 isr_bit; /* Bit in SYSCI*R */
  31. int parent; /* -1 if none */
  32. unsigned int flags; /* See PD_* */
  33. };
  34. /*
  35. * SoC-specific Power Area Description
  36. */
  37. struct rcar_sysc_info {
  38. const struct rcar_sysc_area *areas;
  39. unsigned int num_areas;
  40. };
  41. extern const struct rcar_sysc_info r8a7779_sysc_info;
  42. extern const struct rcar_sysc_info r8a7790_sysc_info;
  43. extern const struct rcar_sysc_info r8a7791_sysc_info;
  44. extern const struct rcar_sysc_info r8a7792_sysc_info;
  45. extern const struct rcar_sysc_info r8a7794_sysc_info;
  46. extern const struct rcar_sysc_info r8a7795_sysc_info;
  47. extern const struct rcar_sysc_info r8a7796_sysc_info;
  48. #endif /* __SOC_RENESAS_RCAR_SYSC_H__ */