rcar-mstp.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * arch/arm/include/asm/arch-rmobile/rcar-mstp.h
  4. *
  5. * Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
  6. * Copyright (C) 2013, 2014 Renesas Electronics Corporation
  7. */
  8. #ifndef __ASM_ARCH_RCAR_MSTP_H
  9. #define __ASM_ARCH_RCAR_MSTP_H
  10. #define mstp_setbits(type, addr, saddr, set) \
  11. out_##type((saddr), in_##type(addr) | (set))
  12. #define mstp_clrbits(type, addr, saddr, clear) \
  13. out_##type((saddr), in_##type(addr) & ~(clear))
  14. #define mstp_setclrbits(type, addr, set, clear) \
  15. out_##type((addr), (in_##type(addr) | (set)) & ~(clear))
  16. #define mstp_setbits_le32(addr, saddr, set) \
  17. mstp_setbits(le32, addr, saddr, set)
  18. #define mstp_clrbits_le32(addr, saddr, clear) \
  19. mstp_clrbits(le32, addr, saddr, clear)
  20. #define mstp_setclrbits_le32(addr, set, clear) \
  21. mstp_setclrbits(le32, addr, set, clear)
  22. #ifndef CONFIG_SMSTP0_ENA
  23. #define CONFIG_SMSTP0_ENA 0x00
  24. #endif
  25. #ifndef CONFIG_SMSTP1_ENA
  26. #define CONFIG_SMSTP1_ENA 0x00
  27. #endif
  28. #ifndef CONFIG_SMSTP2_ENA
  29. #define CONFIG_SMSTP2_ENA 0x00
  30. #endif
  31. #ifndef CONFIG_SMSTP3_ENA
  32. #define CONFIG_SMSTP3_ENA 0x00
  33. #endif
  34. #ifndef CONFIG_SMSTP4_ENA
  35. #define CONFIG_SMSTP4_ENA 0x00
  36. #endif
  37. #ifndef CONFIG_SMSTP5_ENA
  38. #define CONFIG_SMSTP5_ENA 0x00
  39. #endif
  40. #ifndef CONFIG_SMSTP6_ENA
  41. #define CONFIG_SMSTP6_ENA 0x00
  42. #endif
  43. #ifndef CONFIG_SMSTP7_ENA
  44. #define CONFIG_SMSTP7_ENA 0x00
  45. #endif
  46. #ifndef CONFIG_SMSTP8_ENA
  47. #define CONFIG_SMSTP8_ENA 0x00
  48. #endif
  49. #ifndef CONFIG_SMSTP9_ENA
  50. #define CONFIG_SMSTP9_ENA 0x00
  51. #endif
  52. #ifndef CONFIG_SMSTP10_ENA
  53. #define CONFIG_SMSTP10_ENA 0x00
  54. #endif
  55. #ifndef CONFIG_SMSTP11_ENA
  56. #define CONFIG_SMSTP11_ENA 0x00
  57. #endif
  58. #ifndef CONFIG_RMSTP0_ENA
  59. #define CONFIG_RMSTP0_ENA 0x00
  60. #endif
  61. #ifndef CONFIG_RMSTP1_ENA
  62. #define CONFIG_RMSTP1_ENA 0x00
  63. #endif
  64. #ifndef CONFIG_RMSTP2_ENA
  65. #define CONFIG_RMSTP2_ENA 0x00
  66. #endif
  67. #ifndef CONFIG_RMSTP3_ENA
  68. #define CONFIG_RMSTP3_ENA 0x00
  69. #endif
  70. #ifndef CONFIG_RMSTP4_ENA
  71. #define CONFIG_RMSTP4_ENA 0x00
  72. #endif
  73. #ifndef CONFIG_RMSTP5_ENA
  74. #define CONFIG_RMSTP5_ENA 0x00
  75. #endif
  76. #ifndef CONFIG_RMSTP6_ENA
  77. #define CONFIG_RMSTP6_ENA 0x00
  78. #endif
  79. #ifndef CONFIG_RMSTP7_ENA
  80. #define CONFIG_RMSTP7_ENA 0x00
  81. #endif
  82. #ifndef CONFIG_RMSTP8_ENA
  83. #define CONFIG_RMSTP8_ENA 0x00
  84. #endif
  85. #ifndef CONFIG_RMSTP9_ENA
  86. #define CONFIG_RMSTP9_ENA 0x00
  87. #endif
  88. #ifndef CONFIG_RMSTP10_ENA
  89. #define CONFIG_RMSTP10_ENA 0x00
  90. #endif
  91. #ifndef CONFIG_RMSTP11_ENA
  92. #define CONFIG_RMSTP11_ENA 0x00
  93. #endif
  94. struct mstp_ctl {
  95. u32 s_addr;
  96. u32 s_dis;
  97. u32 s_ena;
  98. u32 r_addr;
  99. u32 r_dis;
  100. u32 r_ena;
  101. };
  102. #endif /* __ASM_ARCH_RCAR_MSTP_H */