reset.h 635 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __MACH_MMP_CLK_RESET_H
  2. #define __MACH_MMP_CLK_RESET_H
  3. #include <linux/reset-controller.h>
  4. #define MMP_RESET_INVERT 1
  5. struct mmp_clk_reset_cell {
  6. unsigned int clk_id;
  7. void __iomem *reg;
  8. u32 bits;
  9. unsigned int flags;
  10. spinlock_t *lock;
  11. };
  12. struct mmp_clk_reset_unit {
  13. struct reset_controller_dev rcdev;
  14. struct mmp_clk_reset_cell *cells;
  15. };
  16. #ifdef CONFIG_RESET_CONTROLLER
  17. void mmp_clk_reset_register(struct device_node *np,
  18. struct mmp_clk_reset_cell *cells, int nr_resets);
  19. #else
  20. static inline void mmp_clk_reset_register(struct device_node *np,
  21. struct mmp_clk_reset_cell *cells, int nr_resets)
  22. {
  23. }
  24. #endif
  25. #endif