rcar-mstp.h 2.5 KB

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