reset.h 880 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Toshiba ARM SoC reset controller driver
  4. *
  5. * Copyright (c) 2021 TOSHIBA CORPORATION
  6. *
  7. * Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
  8. */
  9. #ifndef _VISCONTI_RESET_H_
  10. #define _VISCONTI_RESET_H_
  11. #include <linux/reset-controller.h>
  12. struct visconti_reset_data {
  13. u32 rson_offset;
  14. u32 rsoff_offset;
  15. u8 rs_idx;
  16. };
  17. struct visconti_reset {
  18. struct reset_controller_dev rcdev;
  19. struct regmap *regmap;
  20. const struct visconti_reset_data *resets;
  21. spinlock_t *lock;
  22. };
  23. extern const struct reset_control_ops visconti_reset_ops;
  24. int visconti_register_reset_controller(struct device *dev,
  25. struct regmap *regmap,
  26. const struct visconti_reset_data *resets,
  27. unsigned int num_resets,
  28. const struct reset_control_ops *reset_ops,
  29. spinlock_t *lock);
  30. #endif /* _VISCONTI_RESET_H_ */